How do I record video to a local disk in AIR?

前端 未结 5 1801
孤街浪徒
孤街浪徒 2021-02-04 15:27

I\'m trying to record a webcam\'s video and audio to a FLV file stored on the users local hard disk. I have a version of this code working which uses NetConnection and NetStrea

5条回答
  •  情书的邮戳
    2021-02-04 16:09

    Sadly video support in flash from cameras is very poor. When you stream its raw so the issue is that you have to encode to FLV and doing it in real time takes a very fast computer. First gen concepts would write raw bitmaps to a file (or serialize an array) then a second method would convert the file to an FLV. Basically you have to poll the camera and save each frame as a bitmap then stack in an array. This is very limited and could not do audio. It was also very hard to get above 5-10fps.

    The gent at zero point nine, came up with a new version and your on the right path. Look at the new flv recorder. I spent a lot of time working with this but never quite got it to work for my needs (two cameras). I just could not get the FPS i needed. But it might work for you. It was much faster than the original method.

    The only other working option I know of is to have the Red5 save the video and download it back to the app.

提交回复
热议问题