Log in

View Full Version : How to mux h.264 into FLV?


TheUnforgiven
16th September 2007, 21:07
Hello,
Adobe Flash player 9 will support H.264 video in flash.
does anybody know how to mux existing H.264 video and if possible AAC audio to create files playable by the flash player (in beta now)?

Thank you

clsid
16th September 2007, 21:44
The MP4 container is used instead of FLV. Use the search and you will find a topic about this.

TheUnforgiven
16th September 2007, 22:53
I found that thread, thank you. what are people using to put the MP4 file online for streaming to flash players?

LoRd_MuldeR
16th September 2007, 23:00
Encoding your video to H.264 with x264/MeGUI will create an MP4 file. You can also mux RAW H.264 streams into MP4 container via MP4Box/YAMB...

TheUnforgiven
16th September 2007, 23:04
that does not answer my question. I do have the MP4 file but do i just put it online or i do have to use some script or a php player or whatever to make it streamable to flash?

LoRd_MuldeR
16th September 2007, 23:11
Flashplayer won't accept the H.264/MP4 directly! You will need a Flash file (.swf), which implements a simple video player and loads your video from an external MP4 file. You can either create the player yourself with a Flash Authoring tool (e.g. Adobe Flash) or you simply use an existing one. For FLV files there is "JW FLV PLAYER", which is available for free. No idea if there is a similar one that works with H.264/MP4 files yet. Of course you will have to upload both (the SWF/Player and the MP4/Video) to your webspace. Finally you can embed the SWF into your website via HTML and the <object> tag...

In order to get an Idea how it works, download JW FLV PLAYER and check out the sample files that come with it:
http://www.jeroenwijering.com/?item=Flash_video_Player

Again, JW FLV PLAYER is for FLV files, but playing H.264/MP4 should work in a similar way...

TheUnforgiven
16th September 2007, 23:49
jw flv player works! although you do need to change the filename from .mp4 to .flv. Thank you for your help

LoRd_MuldeR
16th September 2007, 23:56
jw flv player works! although you do need to change the filename from .mp4 to .flv. Thank you for your help

Good to hear :)

Drachir
17th September 2007, 09:19
jw flv player works! although you do need to change the filename from .mp4 to .flv. Thank you for your help

You can also use http://flowplayer.org/ .

kikounet
1st May 2008, 15:32
The MP4 container is used instead of FLV. Use the search and you will find a topic about this.

I do not find this topic!
I know how to make any FLV file playable in an HTML page.
What I would like to know is how to MUX a raw MPEG4 file (made with MeGUI) and a MP3 file.
MeGUI Tools doesn't seem to propose other than MKV or AVI

ajp_anton
2nd May 2008, 02:45
You can also use http://flowplayer.org/ .I've been using flowplayer for some time now and it doesn't need renaming .mp4 to .flv

BTW, is there any way to seek to any frame instead of jumping back to the previous keyframe?

kikounet
3rd May 2008, 17:37
Hello,
Adobe Flash player 9 will support H.264 video in flash.
does anybody know how to mux existing H.264 video and if possible AAC audio to create files playable by the flash player (in beta now)?
Still no simple answer ? And what about muxing x264 with MP3 ?
It's a pity the excellent MeGUI doesn't do that yet... ;-)
I guess Mr Doom9 should be very busy allready, so we have to be patient and just wait for a next version of MeGUI producing directly h264 Flash videol FLV4 from my camcorder's AVIs...
Thank you all

Placio74
3rd May 2008, 18:27
I do not find this topic!
...
This?
http://forum.doom9.org/showthread.php?t=132046

surfchen
5th May 2008, 07:33
why not muxing h264 with aac?Aac is better than mp3.

klipsil
5th May 2008, 21:57
Hi
adobe released

http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v9.pdf

which desribe how h.264 and aac can be contained in an flv file.
do u know any tool that cand do that ? ffmpeg ?

Kurtnoise
5th May 2008, 22:07
zdobe released

http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v9.pdf

which desribe how h.264 and aac can be contained in an flv file.
do u know any tool that cand do that ? ffmpeg ?
yes, it's planned...there are already some patches (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/046719.html) available but this needs some reviews first.

Placio74
5th May 2008, 22:16
Hi
...
which desribe how h.264 and aac can be contained in an flv file.
...
Not FLV.
F4V.
It's different.

The F4V format is based on the format specified by ISO/IEC 14496-12: ISO base media file format.

klipsil
5th May 2008, 22:20
according to the spec f4v is the mp4 flavour.
however they now desribe all the header and data types to insert into the old flv file to create an h.264 + aac flv file.
isn't that great ?

Placio74
5th May 2008, 22:33
...
isn't that great ?
Yes.
And more great: "the SWF and FLV/F4V formats are now totally open source".

smok3
5th May 2008, 23:48
however they now desribe all the header and data types to insert into the old flv file to create an h.264 + aac flv file.
why not mp4 (or f4v)? any reasons to use flv? cheap streaming?

klipsil
6th May 2008, 06:34
yes cheap streaming.
and get all rtmp stuff in http , even live :-)

Kurtnoise
30th May 2008, 18:51
yes, it's planned...there are already some patches (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/046719.html) available but this needs some reviews first.
since rev 13458 (http://svn.mplayerhq.hu/ffmpeg?view=rev&revision=13438), avc & aac streams can be muxed into FLV within FFmpeg...and it works fine. :)

Placio74
30th May 2008, 19:36
Confirmed.
I'm check this used latest Sherpya build (13537).
FLV with AVC/AAC, playable by Adobe Flash Player 9.

smok3
30th May 2008, 21:16
a. is there a rev 13458 win build? url?
b. anyone care to share ffmpeg command line from mp4(avc+aac) to flv?

Placio74
30th May 2008, 21:28
a. is there a rev 13458 win build? url?
13458, i'm don't know.
But 13537 i'm just get from here (https://sourceforge.net/project/showfiles.php?group_id=205275&package_id=248632).

b. anyone care to share ffmpeg command line from mp4(avc+aac) to flv?
ffmpeg -i name_file.mp4 -vcodec copy -acodec copy name_file.flv
FLV with AVC/AAC i'm just check used JW FLV Media Player.

smok3
30th May 2008, 21:51
tnx, i can confirm that php 'streaming' is working with files like that (using usual flvmdi file.flv /k as metadata injector), sweet.

ronnylov
5th June 2008, 15:59
Does it work better when muxing to flv compared to streaming mp4 format to a flash player like flowplayer?
I am sure there is a reason, but I have never streamed video on internet so I just don't know...

(Sorry for newbe question)

smok3
5th June 2008, 20:55
ronnylov;

a. there is streaming and there is progressive download, streaming basically means that you can jump to any location in the klip almost instantly, while progressive download would mean that you can only jump to the location of allready preloaded part of the klip.

b. php streaming is the cheapest way (it should work on classical apache+php) and you don't need any dedicated server software, that seems to be harder to do with mp4 for some reason (the cheapest way for mp4 at this moment is to use lighttpd + mp4streaming plugin).

c. examples;
php streaming: http://somestuff.org/flashAVC/flvplayer.php?moviename=movies/ED_huff-480kbps-stream-x640y352.flv
progressive download: http://somestuff.org/flashAVC/flvplayer.php?moviename=movies/ED_huff-480kbps-x640y352.mp4 (no, you don't need flv for that)

Lamb
16th June 2008, 17:22
I am looking desperately for an alternative to ffmpeg to mux h264 in an FLV container. Would anyone know a linux program which would be able to do such a thing?

Gew
25th November 2010, 11:51
I am looking desperately for an alternative to ffmpeg to mux h264 in an FLV container. Would anyone know a linux program which would be able to do such a thing?

My thoughts exactly!

I have some issues with precise frame seeking in the .FLV files which FFmpeg produces.
If I run the exact same '-vcodec copy -acodec copy' but with .MP4 as output, it's perfectly fine.
Therefore, I'm currently judging the Flash Video muxer. Any ideas?
Windoze apps would possibly be fine, since there's a good chance Wine covers them.
Avidemux is out of the question though, buggy engine won't mux 44.1Khz MP3.

Ty in adv~

Gavino
25th November 2010, 14:41
I have some issues with precise frame seeking in the .FLV files which FFmpeg produces.
If I run the exact same '-vcodec copy -acodec copy' but with .MP4 as output, it's perfectly fine.
How can you be sure that FFmpeg is at fault?
What player/program are you using to do your "precise frame seeking"?

Gew
25th November 2010, 15:48
Correct of you Gavino. It would be foul play to judge FFmpeg with no further evidence. Furthermore, to be consistent, I've tried playback in VLC/MPlayer/SMPlayer. I think all these three players are using the same "engine" (libav~) though, correct me if I'm wrong here. Also, I was getting comfortable again for a while. I Googl'd some more and found a thread dated 2008, when someone explained that "FLV container now supports H.264, although seeking is not possible yet". In my attempts, my x264 stream plays fine in FLV, it's just that when I click a certain seek point in VLC, it doesn't respect the click entirely, but jumps to the neighbourly (intra?) frame instead. Perhaps this is the expected slash correct behaviour? ..in opposite to the .mp4 container, which handles the seeking precise to the point.

Any ideas?

Much appreciated~
Ty in adv~