News:

--

Main Menu

H264 and Flash

Started by hgurol, August 01, 2012, 05:08:25 PM

Previous topic - Next topic

hgurol

Hi,

Why I can not encode a video file with H.264 & AAC into a Flash container?

I want to use h264 & aac when encoding my video files but the mp4 container locks me the HTML5 support when I use this files on the web for streaming. I can care less about the HTML5 right at the moment. I would like to use a flash container so the video file plays with flash player on all browsers.

If, in the future I decide to go with mp4 and HTML5 then I dont need to encode anything. All I need to do is change the container to mp4, which I think is an easy and fast process rather then the encoding the whole movie file.

However, when I try to do this I get this error message "Unsupported Video: Only FLV1 and VP6 video are supported".
Why?

Jan Gruuthuse

Because H.264 & AAC  are not supposed to be in .flv container?
QuoteThere are functional limits with the FLV structure when streaming H.264 or AAC which could not be overcome without a redesign of the file format. This is one reason why Adobe Systems is moving away from the traditional FLV file structure.
QuoteUse of the H.264 and AAC compression formats in the FLV file format has some limitations and authors of Flash Player strongly encourage everyone to embrace the new standard F4V file format.[7]
source: Flash Video: History

hgurol

Very good point.

How does Youtube manage to flash stream h264 videos recently?
I guess they started to use that new f4v format.

Jan, do you know if the new 2.6 version will be supporting this f4v format when it is released?

Thanks...


Jan Gruuthuse

not sure if this is still valid: see reply #11 in this thread: Codex VP6F and Resizing. The whole thread gives some interesting reading.

hgurol

Just for future reference, renaming the file extension from mp4 to f4v simply doesn't work. I mean the video file still acts and plays the same as if its mp4. Well, actually it is mp4 and renaming the extension doesn't make it behave like f4v. It still plays with HTML5 player where supported, not with a flash player.

If anyone else needs something similar, extension changing is not a feasible solution.
For your info....


Quote from: Jan Gruuthuse on August 01, 2012, 06:04:16 PM
not sure if this is still valid: see reply #11 in this thread: Codex VP6F and Resizing. The whole thread gives some interesting reading.

Jan Gruuthuse

Thanks for sharing your findings. If your lucky and request FV4 encoding support, you never know, you might get it someday. Can't make any promises on behalf of the developers.

styrol

QuoteThere are functional limits with the FLV structure when streaming H.264 or AAC which could not be overcome without a redesign of the file format.
This is certainly true, but  h.264/aac inside FLV is nonetheless supported by FlashPlayer.

QuoteI would like to use a flash container so the video file plays with flash player on all browsers.
MP4 files are also handled by FlashPlayer (Version 8 or 9 and newer).

QuoteAll I need to do is change the container to mp4, which I think is an easy and fast process rather then the encoding the whole movie file.
You can do this with ffmpeg.


hgurol

Quote
You can do this with ffmpeg.

How ?

styrol

by using the command line:

ffmpeg -y -i "input_video.flv" -vcodec copy -acodec copy "output_video.mp4"

If you use OS X there is a script here: http://appdrive.net/mediathek/flv2mp4/flv2mp4.html

hgurol

Thanks styrol, it works :)

The correct command is like this....
ffmpeg -y -i "input_video.mp4" -vcodec copy -acodec copy "output_video.flv"