Open ROBERT-MCDOWELL opened 6 years ago
The RAM shouldn't grow all that much, though I don't know how long video you've got in mind. There was a time (like 1-2 yrs back) where I was really focused on RAM in FW Flash, and optimized it quite a bit. I didn't check the RAM usage since, though.
As long as the encoder is fast enough(consumes the raw video frames slower than the encoder can process them), then the only thing growing inside the RAM should be the mp4 ByteArray. Which hopefully isn't that huge. FW doesn't allow any "touching" of the accumulating data right now, you need to wait until its finished.
You might automatically stop recording / save mp4 / start new recording to get the mp4 from memory to multiple files.
ok gotcha, so maybe any way to get the entire ffmpeg command? as this rather than get a byteArray back to AS send the ffmpeg encoded data directly to any kind of output, like rtmp server for example? as this the user can be free to use any ffmpeg codec, options and output type too, also it would save the file in case of the browser window is closed by accident, especially if the recording is hour live.
If we're still talking Flash - FW for Flash is using ffmpeg libs - that is also what ffmpeg command is using, but FW doesn't know anything about the ffmpeg command, thats a separate app. Also FW ffmpeg is built only with one audio and video codec.
If you're doing a long hour recordings and got a server, I think you should just do some kind of streaming which will send the streaming video to the server right away (and can save it in case the connection is interrupted). I don't feel like FW client side recording is right in this case.
To avoid RAM to grow intensively for long video shot, is it possible while recording to: