[MEncoder-users] encode to h264 (flash support)

Grozdan Nikolov (openSUSE Linux) microchip at telenet.be
Mon Mar 3 21:14:46 CET 2008


On Monday 03 March 2008 20:47, Alex Samad wrote:
> On Mon, Mar 03, 2008 at 08:40:42PM +0100, Grozdan Nikolov (openSUSE Linux) 
wrote:
> > On Monday 03 March 2008 20:35, Alex Samad wrote:
> > > On Mon, Mar 03, 2008 at 01:39:14PM +0100, Grozdan Nikolov (openSUSE
> > > Linux)
> >
> > wrote:
> > > > On Monday 03 March 2008 13:33, Ing. Branislav Gerzo wrote:
> > > > > GN> mencoder generates broken files when used with the lavf muxer
> > > > > and b-frames. If
> > > > >
> > > > > I see. is there some workaround for this (except using other
> > > > > programs, if possible)? I think not using b-frames in h.264 is not
> > > > > good idea. Or I will wait for some next release of mencoder, where
> > > > > it will be fixed?
> > > >
> > > > not at the moment, this won't be fixed any time soon. If you want to
> > > > directly output to h264+b-frames MP4 then use ffmpeg, not mencoder
> > >
> > > (being a newbie to encoding), why would you suggest ffmpeg and not x264
> > > to do the encoding.
> >
> > I don't know, it was the first thing that popped into my mind. :) x264 is
> > perfectly fine too but it only accepts raw yuv sources and must be
> > compiled with gpac support for mp4 output
>
> yep, which is why I had to go to transcode. I use this on debian so it
> is a simple apt-get install...
>
> What bugs me about making x264 in avi containers and then moving them to
> mp4 containers is why move them over to mp4, if it is for better support
> of h264, then isn't something lost by creating them in avi containers
> and if you can create that on the fly with tools like MP4Box, why don't
> players do that instead of having to pre encode (I am probably missing
> something obvious to the experienced pro, like I said I am a weekend
> cowboy when it come to encoding)

the thing with AVI is that it wasn't designed to use multiple frame references 
and can't "see" that far when you go above 8 framerefs. Also AVI wasn't 
designed to handle out of order frames and b-frames as well. AVI is a simple 
and limited container which is out of this century (here limited doesn't mean 
the amount of audio/video codecs it can support rather which features it can 
support of modern codecs). AVI also has a huge overhead compared to mp4 or 
matroska. I'm sure MEncoder uses nasty hacks to allow more than 8 frame 
references and b-frames/out of order/packed frames

>
> > > I recently went through the process of trying to encode some avi files,
> > > that would not play with mplayer or mencoder (it would bomb out), I had
> > > to use transcode with import lav not ffmpeg (just realised i could have
> > > probably done the same with mencoder) export to yuv4mpeg and then
> > > process with x264, process the audio and then merge back together with
> > > MP4Box
> > >
> > > Is there any time frame on when mencoder will be able to handle mp4
> > > files directly ?
> >
> > mencoder already handles mp4's just fine, if you don't use b-frames that
> > is. I'm no mencoder expert/coder but I think someone just needs to
> > rewrite mencoder.c and add proper lavc support into it... fix the damn
> > timestamps :)
> >
> > > > > GN> you want to use b-frames, then encode to AVI using the standard
> > > > > way (don't GN> use lavf) and then use MP4Box to remux the AVI into
> > > > > the MP4 container
> > > > >
> > > > > yes, this worked quite OK (I get A/V sync errors...), so in other
> > > > > words I _have_ to use mp4box if I want h.264 with b-frames, right ?
> > > >
> > > > no, see above, you can use ffmpeg which does proper muxing
> > > >
> > > > you get A/V sync errors because you have to append the harddup video
> > > > filter at the end of the filter chain
> > > >
> > > > > also for encoding HE-AAC I can use mencoder using faac, or I have
> > > > > use neroAacEnc?
> > > >
> > > > mencoder/faac don't support yet HE-AAC, so you have to use neroAacEnc
> > > > or aacplusenc
> > > >
> > > > http://teknoraver.campuslife.it/software/mp4tools/aacplusenc-0.16.3.t
> > > >ar.b z2
> > > >
> > > > > Thank you.
> > > > >
> > > > > /Brano
> > > > > _______________________________________________
> > > > > MEncoder-users mailing list
> > > > > MEncoder-users at mplayerhq.hu
> > > > > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > > >
> > > > --
> > > > Regards
> > > > _______________________________________________
> > > > MEncoder-users mailing list
> > > > MEncoder-users at mplayerhq.hu
> > > > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> >
> > --
> > Regards
> > _______________________________________________
> > MEncoder-users mailing list
> > MEncoder-users at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

-- 
Regards



More information about the MEncoder-users mailing list