View Full Version : FFMPEG+x264


ivan_alias
3rd February 2005, 17:37
Now we have mencoder+x264, which for me has replaced the need for Virtualdub (almost completely). Mencoder has auto cropping, filtering, deinterlacing etc.. loads of cool stuff.

For people following the Virtualdubmod forum, you'll know development has pretty much stopped. :(

So where next?

Hitbit posted at the begining of this thread

Linky (http://forum.doom9.org/showthread.php?s=&threadid=83039&highlight=x264+compile+ffmpeg)

about hacking FFMPEG to support x264. This seems quite a good idea to me as there is no support for mp4 container in mencoder, alternatively more container support for mencoder.

And then there is VideoLan which is bursting with capabilities and not a few bugs ;)

There are soooo many cool features tied up in these tools, they just need bringing together. :)

The future of backup/transcoding tools are more likely to be in GUIs that use these commandline tools rather than bespoke applications like Vdub - GK and AGK prove that.


So my question is this:

Has anyone else done the ffmpeg+x264 thing - is it hard? Or any idea if the ffmpeg devs will add x264 to libavcodec, or indeed if mencoder will get more container support for h264 like MPEG-TS or MP4?

Cheers

gotaserena
3rd February 2005, 17:59
As far as my limited knowledge on the matter goes, the situation is as thus:

1) AVC in mp4 support for ffmpeg came recently. I think it's just a question of time now until they port x264 into libavcodec.

2) Akupenguin and others mentioned that mplayer's developers don't want to mess around with anything other than AVI. The situation is not as good as one may hope since higher profiles of x264 simply cannot be put into avi, and mplayer as of now can easily produce AVIs which will not play anywhere else.

It is a real shame about Veedub and VDM, but life goes on. I for one remain hopeful that the next version of avidemux will bring everything that ffmpeg offers :)

bond
3rd February 2005, 18:51
Originally posted by gotaserena
1) AVC in mp4 support for ffmpeg came recently. I think it's just a question of time now until they port x264 into libavcodec.where exactly do you find that .mp4 avc code in ffmpeg?

akupenguin
3rd February 2005, 18:58
Originally posted by gotaserena
Akupenguin and others mentioned that mplayer's developers don't want to mess around with anything other than AVI. It's not that they're satisfied with AVI (see the creation of NUT), it's that mencoder.c is an ugly mess. All improvements are going into MPlayer G2, but that won't be stable for a long time.

gotaserena
3rd February 2005, 19:06
Probably I didn't explain myself well. FFMPEG can read avc in .mp4 files for ages, but recently it did manage to *mux* avc streams into .mp4 in a way that wouldn't confound mp4creator or MP4Box. If you look at the source, you'll find among the mov_video_tags our chap "avc1".

It still cannot encode to h.264, though. I imagine it wouldn't be that hard to implement a x264 interface for it, maybe using a similar code that enabled the xvid interface -- which amounts to the grand total of one extra file and -- I expect -- some other minor additions to the interface. I wish I knew enough programming to accomplish this.

bond
3rd February 2005, 19:39
Originally posted by gotaserena
Probably I didn't explain myself well. FFMPEG can read avc in .mp4 files for ages, but recently it did manage to *mux* avc streams into .mp4 in a way that wouldn't confound mp4creator or MP4Box. If you look at the source, you'll find among the mov_video_tags our chap "avc1"what commandline exactly did you use?

gotaserena
3rd February 2005, 19:57
ffmpeg -i input.avi -vcodec copy -acodec copy output.mp4

Only works if the avi fourcc is h264.

Neo Neko listed this as a way of muxing avc to mp4 in another thread, but I wouldn't vouch for its compatibility, though. Right now this may seem fine because pretty much every tool available is based on libavcodec.

Ok, now I realised what is wrong with this approach. I'll post the problem in the corresponding thread in the container forum.

bond
4th February 2005, 02:24
from my point of view thats absolutely not compliant and shouldnt be used

lets all wait till a ffmpeg dev explicitely adds avc-in-mp4 muxing support