Reputation: 701
I am trying to convert an MP4 video file into an f4v video file so that I can stream the video with Flash Media Server. Ideally, I would like to convert the mp4 into various bitrates, so that I can accomplish multi-bitrate streaming of the video. I am pretty sure that ffmpeg is capable of this, but I keep getting different error messages. Here is the latest that I tried:
ffmpeg.exe -i source.mp4 -ar 150 destination.f4v
I am getting the following error message with this: "Unable to find a suitable output format for 'destination.mp4' destination.mp4: Invalid argument
Thanks in advance!
Upvotes: 3
Views: 8780
Reputation: 1459
First, .f4v is not the official extension of F4V video format, at least in the eyes of ffmpeg.
If you want to stream an mp4 file, some implementations of flash players will allow you to seek to a place not yet downloaded. The normal resolution is to convert (actually just repackage) these files in an f4v container.
To convert to f4v that is compatible with streaming, you need to use a FLV metadata injector, such as Yamdi (http://yamdi.sourceforge.net/)
Steps you can take:
ffmpeg.exe -i source.mp4 -vcodec copy -acodec copy destination.flv
This will repackage the video and audio directly into an flv file. FFMPEG will automatically use the f4v format if your input is H.264.
yamdi -i destination.flv -o destination.f4v
After inserting the metadata, your f4v file is now ready for streaming. If you omit this last step, you can only navigate to parts where the file has been download.
FYI, if you can support variable bitrates, use the -crf option. Two-pass encoding will give u a bitrate close to the bitrate you specify, but will take twice the time. Constant rate factor though will give u a constant quality, but you'll probably have to test different values (sane for unperceivable loss: 18 - 24) to get the bitrate you want.
Upvotes: 4
Reputation: 13216
A few notes:
Upvotes: 5