How can I record and save flash video's with a

2019-07-19 18:13发布

问题:

Right now I am working on an AIR 3.2 application which lets you stream a video to a Flash Media Server and saves it on a hard drive.

This sequence works fine with the standard Sorenson codec but I want to use H.264 for my videos. I found lots example code and implemented it in my code, but when I record a video of myself I am unable to re-watch it afterwards.

I found how to implement a H.264 encoding in a realeyes blog post here. My code is here.

It saves the video as a .f4v file, but my browser (I've tried the latest versions of both Chrome and Firefox, with the latest Flash) and also VLC are unable to load the video. I also used a program called Movie Player which is able to open the file but can only show the first frame and the audio. Neither am I able to upload the video to YouTube because they do not support the file extension.

Here is an example video file it saved: H264Test1.f4v.

My question is: How do I stream and save the movie with a file extension that I am able to re-watch while using the H.264 codec?

回答1:

This is because of how FMS records the mp4 content, quite a few players won't be able to play the videos.

Download the Adobe F4V Postprocessor at this URL: http://www.adobe.com/products/flashmediaserver/tool_downloads/

This should convert the video so it will be playable in other players.

Edit: I just tested the tool with some videos, it will indeed solve the issue of recorded f4v videos not playing in other players



回答2:

Use ffmpeg to convert the f4v file to flv using the following command:

ffmpeg -i file1.f4v -sameq file1.flv


回答3:

Check the enter link description here from Pavel Langweil. He have a great Theora / Vorbis encoder that generates small ovg files that you can easily convert to mp4 using ffmpeg.