AS3's attachAudio lowers volume? - actionscript-3

I am having an issue with "attachAudio", any time I attach a microphone to netstream the audio goes down for the process I'm using (in the Volume Mixer). Is there any way around it?

Not sure. But maybe you mean this Windows 7 setting that reduces other applications sound.
http://www.mydigitallife.info/adjust-volume-level-when-place-or-receive-telephone-calls-in-windows-7/

Related

Why zoneminder monitor function utilizing camera constantly even when no one is monitoring

My IP camera has a LED which blink when someone is streaming from it. When I add the camera to zoneminder as monitor function, the LED keeps blinking constantly meaning zoneminder is streaming from it. It also keep blinking even when nobody is using it. I mean no one is using web site to watch the camera nor anybody is using any API to utilize it. The problem is, it's using network bandwidth constantly. It would make sense if it was on mocap or record function but monitor function doesn't need to stream unless someone is watching it. Wouldn't it be better to only read from camera when somebody is using it (app or website)? Is there any option that I'm missing?
Zoneminder convert/relay any stream from mjpeg or h264 to jpg images, so need consume the stream all the time. If you really want close the daemon, disable the camera, and so on.

My Sound object is using to much memory and causing my application to crash. How can I empty the first half of the objects data?

I'm currently working on a dynamic MP3 player in AS3. The player will also support continuous (in length) radio streams.
Because my player will include a 'seek' bar, I allow the user to seek through the Sound object's data. Now I know that with a continuous stream, data being stored on the users RAM will never stop, as downloading will never stop on a continuous stream. This means, after a few hours of streaming, allot of RAM is being used by my app. I've tested the app on my own machine, running a very high spec, and the app crashes in my browser. When i say the app crashes, I mean the whole of Flash, meaning I have to restart my browser in order to use Flash again. I know my app is the cause as Flash has never crashed in the past. It only does it when my app has been streaming for 2+ hours.
So what I want to do is only allow the user to cache up to an hours worth of audio. After an hour, I want to clear the first half of the sound objects data, meaning that only the most recent half hours audio is stored and available for seeking.
So I have my stream:
var soundObj:Sound = new Sound();
soundObj.load(new URLRequest('stream.mp3'));
//ect ect
and sound is where the data is stored. So my question: How would I clear the first 30 mins of audio from that object?
Perhaps the Sound class is not meant to reliably play "unlimited" MP3 files, which seems to be your case. It is made to play normal MP3 "songs". Two hours of MP3 sound can easily accumulate to be larger than 200 megabytes of data.
But there is a good solution - use NetConnection and NetStream classes to stream audio instead. There are many tutorials out there. You will also be able to stream your MP3s, just a bit differently - a central server will be involved, which will transcode these MP3s on the fly, delivering it to you in a true "streaming" manner. One of such servers is Adobe Flash Media Server, an overpriced piece of work from Adobe. A lot of free and open-source alternatives exist which will work fine for your purposes - Red5, nginx-rtmp to name a few, that I have tested myself.

Flash (Actionscript 3): Play 2 videos from 1 NetStream?

I'm streaming a video from an Amazon CloudFront RTMP source with
video.attachNetStream(myNetStream);
myNetStream.play(myVideoFileName,0,-1);
and it's working quite well. Now, what I want to do is something like this:
video1.attachNetStream(myNetStream);
video2.attachNetStream(myNetStream);
myNetStream.play(myVideoFileName,0,-1);
This doesn't work as written because only one of the two videos will play at a time for some unknown reason. I want video1 and video2 to play the same video from a single NetStream (to save bandwidth) and remain completely in-sync with each other. How can I accomplish this?
If you are playing an FLV file directly (not streaming it from FMS), you should be able to :
Load the file with URLStream
Wait for sufficient data to start copying the data to a ByteArray object
Create as many NetStream objects as you need and use the appendBytes(bytes) method
I haven't actually tested it, and the logic of appendBytes() needs to be looked at, but theoretically it should work.
Also, it deserves a benchmark. But it's probably better than re-drawing a bitmap copy at the same rate as the video, and keep the two videos in sync.
bitmapData can't be accessed at all because of security restrictions. I'm going with plan B which is playing 2 netstreams, but reducing the file size of the one the videos by removing its audio. I'll have to wait until Amazon allow security policy access to use the bitmapData solution.

Is there a way to influence automatic sound settings in Flash / AS3?

I am creating a voice enabled application in Flash using RTMFP and I noticed that the Flash plugin automatically regulates down the sound volume of other processes/applications (at least on Windows) as soon as a RTMFP stream is opened and starts playing - very similar to the way Skype does this. Furthermore it seems that Flash also regulates itself (!) down in volume as soon as the Microphone is accessed what is quite contraproductive in group conferences. See: http://i50.tinypic.com/2415r4k.jpg
So, what I am trying to do is to get access to the automatic sound settings, either to disable or to set my own rules for them because the defaults don't work out very well in my oppinion. Unfortunately, searching on this topic did not raise any usable results so I hope that maybe someone else has managed to do this already and is able to give me a hint.
If this is not possible in general it would still be sufficient to disable automatic sound settings on every NetStream opened so that at least these are always at 100% volume or more, depending on the case. Does anyone know if manually setting the volume/gain on a NetStream instance overrides the automatic settings made by the plugin? Or is the automatic sound setting always overriding that/adding to that settings and entirely out of a developer's influence?
Thanks in advance
It's more of a Windows 7 problem and not directly related to Flash. You can change this behavior if you check your settings in the Control Panel: Sound - Communications - "When Windows detects communications activity".
There is no workaround from the Flash point of view, as the operating system itself controls this volume adjustment. If you use SoundTransform(1) on your NetStream, the Flash Player outputs the full volume, but the Windows sound manager is one level above and turns it down again.

Post-processing captured video in AS3, creating slow motion

I have an interesting project wherein I need to allow users to capture video of themselves with a webcam at a kiosk, after which I email them a link to their video. The trick is the resulting video needs to be a 'slow motion' version of the captured video. So for example, if someone creates a 2 minute movie, the resulting movie will be 4 minutes.
I'd like to build this in Flex / AS3 if possible. I don't have issues capturing the video and storing it / generating and emailing a link, but slowing down the video is the real mind bender. I'm unsure how to approach 'batch post-processing' a set of videos using Adobe tools.
Has anyone had a project similar to this or have suggestions on routes to take in order to do this?
Thanks!
-Josh
This is absolutely feasible from the client side, contrary to what some may believe. :)
http://code.google.com/p/flvrecorder/
Just adjust the capture rate, which shouldn't be too difficult all the source is there.
Alternatively, you could write an AIR app that launches Adobe Media Encoder after writing a file and launch it with a preset that has FTP info etc. Or you can just use the socket class to connect and upload over FTP.
http://code.google.com/p/fl-ftp/
It is not feasible to do this client-side.
Capture the video and send it to the server.
Use a library like FFMpeg to do your coneversions