Tuesday, May 09, 2006

Encoding to Xvid instead of DVD

After much struggle with audio sync, found a thread that suggested '-async 50' and this worked.

[root@be mythtv]# ffmpeg -y -i /mnt/finland.0000.mpg -t 60 -vcodec xvid -vtag
xvid -s 320x180 -b 1500 -copyts -deinterlace -acodec mp3 -ab 128 -async 50
finland_ff-xvid-noGOP-noRate-async50-vcodecXvid_h2m.avi

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man
--enable-mp3lame --enable-libogg --enable-vorbis --enable-theora
--enable-faadbin --enable-xvid --enable-a52 --enable-a52bin --enable-pp
--enable-shared --enable-pthreads --enable-dc1394 --enable-gpl --disable-strip
--extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32
-march=i386 -fasynchronous-unwind-tables
libavutil version: 49.0.0
libavcodec version: 51.7.0
libavformat version: 50.3.0
built on Mar 1 2006 06:18:11, gcc: 3.4.4 20050721 (Red Hat 3.4.4-2)
Input #0, mpeg, from '/mnt/finland.0000.mpg':
Duration: 00:58:36.6, start: 31022.294233, bitrate: 17116 kb/s
Stream #0.0[0x1e0], 29.97 fps(r): Video: mpeg2video, yuv420p, 1920x1080,
65000 kb/s
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5 channels, 384 kb/s
Output #0, avi, to 'finland_ff-xvid-noGOP-noRate-async50-vcodecXvid_h2m.avi':
Stream #0.0, 29.97 fps(c): Video: xvid, yuv420p, 320x180, q=2-31, 1500 kb/s
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s

Larger size encoding (16:9):

# nice ffmpeg -y -i finland_px-tom2p.m2p -vcodec xvid -vtag
xvid -s 720x406 -b 2500 -copyts -deinterlace -acodec mp3 -ab 128
-async 50 finland_ff-xvid-720x406-async50-2500bps-vcodecXvid_px-tom2p.avi

Sadly, after encoding the whole 1hr show, the audio would get out of sync when there were the usual atsc glitches. Gave up on xvid. Stick with conversion to DVD compliant mpg.

1 Comments:

At 10:32 PM, Blogger rob said...

thanks for this blog, its a useful reference.

i use mencoder to transcode shows to mpeg4 .avi and mostly its trouble-free.

 

Post a Comment

<< Home