[theora] theora_encode is adding vertical pixels

Gregory Maxwell gmaxwell at gmail.com
Fri Jan 21 09:50:23 PST 2011

On Fri, Jan 21, 2011 at 12:41 PM, Leo Izen <leo.izen at gmail.com> wrote:
> I am using theora_encode along with ffmpeg:
> ffmpeg -an -s 1920x1080 -r 24 -i bigbuckbunny.mp4 -vcodec rawvideo \
> -pix_fmt yuv420p -f rawvideo - 2>/dev/null \
> | ffmpeg -an -f rawvideo -s 1920x1080 -r 24 -i - -f yuv4mpegpipe -
> 2>/dev/null \
> | theora_encode /dev/stdin 2>/dev/null | ffmpeg -y -f ogg -i - \
> -f mp4 -i bigbuckbunny.mp4 -map 0:0 -map 1:1 -vcodec copy \
> -acodec libvorbis -ab 256000 -f ogg bigbuckbunny.ogv
> I am running Linux x86_64, and I got theora_encode from the package
> theora-tools.
> Here's the error: My input file is 1920x1080. My pipes going into
> theora_encode are 1920x1080. BUT: The pipes coming out of theora_encode have
> the dimensions 1920x1088.

I recommend that you use ffmpeg2theora rather than the convoluted
command-line you have above.

It sounds like theora_encode (I'm not familiar with this tool) is not
correctly setting the crop/offset parameters, or that ffmpeg is
somehow mangling the headers.

You could also try using the encoder_example from the libtheora
distribution, which I know correctly sets the crop/offset but I'd
still discourage the technique you're currently using.

More information about the theora mailing list