Avidemux Forum

Avidemux => Stable branch (2.5) discussion => Topic started by: hgurol on August 01, 2012, 05:08:25 PM

Title: H264 and Flash
Post by: hgurol on August 01, 2012, 05:08:25 PM
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?
Title: Re: H264 and Flash
Post by: Jan Gruuthuse on August 01, 2012, 05:39:33 PM
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 (http://en.wikipedia.org/wiki/Flash_Video)
Title: Re: H264 and Flash
Post by: hgurol on August 01, 2012, 05:51:07 PM
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...

Title: Re: H264 and Flash
Post by: 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 (http://www.avidemux.org/smf/index.php?topic=4913.msg28543#msg28543). The whole thread gives some interesting reading.
Title: Re: H264 and Flash
Post by: hgurol on August 02, 2012, 02:00:49 PM
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 (http://www.avidemux.org/smf/index.php?topic=4913.msg28543#msg28543). The whole thread gives some interesting reading.
Title: Re: H264 and Flash
Post by: Jan Gruuthuse on August 02, 2012, 02:49:02 PM
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.
Title: Re: H264 and Flash
Post by: styrol on August 02, 2012, 07:31:50 PM
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.

Title: Re: H264 and Flash
Post by: hgurol on August 02, 2012, 07:35:49 PM
Quote
You can do this with ffmpeg.

How ?
Title: Re: H264 and Flash
Post by: styrol on August 02, 2012, 07:46:42 PM
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
Title: Re: H264 and Flash
Post by: hgurol on August 02, 2012, 08:12:08 PM
Thanks styrol, it works :)

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