[theora] Broken Theora integration in FFMPEG

Jason Self jason.self at gmail.com
Mon May 25 21:56:28 PDT 2009

On May 20, 2009, at 2:39 AM, j at v2v.cc wrote:

> On 05/19/2009 11:41 PM, Jason Self wrote:
>> As to ffmpeg2theora, I'm using version 0.24 from http://v2v.cc/~j/ffmpeg2theora/
>> When using FFmpeg proper, I'm using their recent version 0.5 and have
>> found that it does decode the 5.1 audio correctly. IIRC, older
>> versions needed liba52, to do this correctly (although I may be  
>> wrong,
>> since it's been a while.) However, FFmpeg 0.5 no longer needs this
>> (indeed... the configure command barfs when you try because
>> enable-liba52 is no longer a valid option during compile.)
>> According to the changelog ffmpeg2theora, was bumped to ffmpeg 0.5  
>> on 3-12.
> sampling 5.1 to stereo is broken in 0.5, or there is no api for it.
> there was a patch on the list to fix this in libavcodec, this patch  
> is not in svn, i will however apply it to the next version of  
> ffmpeg2theora that i release. if you compile it yourself, apply
> <http://svn.xiph.org/trunk/ffmpeg2theora/patches/6to2channel-resample.patch 
> >
> to ffmpeg before compiling.
> j

Thanks -- Perhaps it's just that there's no API for it, because it  
definitely does work in 0.5 when I compile ffmpeg and run it from the  
command line.

I had an opportunity to apply the patch this weekend, and now instead  
of the previous output (with the garbled audio) when I run  
ffmpeg2theora -v 5 --optimize --width 640 --height 480 --cropbottom 18  
--cropleft 258 --cropright 254 -A 64 -c 2 -H 44100 --deinterlace it  
just throws an error "Resampling with input channels greater than 2  
unsupported" and refuses to encode. Sigh. Perhaps I should run the  
audio through ffmpeg first and resample it to 2 channels before using  

Input #0, mpeg, from '/Users/jason/Desktop/jj_052509_1.mpg':
   Duration: 00:19:21.15, start: 0.112000, bitrate: 9606 kb/s
     Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR  
1:1 DAR 16:9], 38810 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
   Pixel Aspect Ratio: 1.00/1   Frame Aspect Ratio: 1.33/1
   Deinterlace: on
   Resize: 1920x1080 => 1408x1062 => 640x480
Resampling with input channels greater than 2 unsupported.
   Resample: 48000Hz => 44100Hz
The Vorbis encoder could not set up a mode according to
the requested quality or bitrate.

More information about the theora mailing list