Question

We convert uploaded video to MP4 and OGV, but while trying to speed up the process we've hit a wall. We found the bottleneck is the OGV encoding, While it might take 5 minutes to convert a 350mb AVI to MP4, it takes roughly 25-30 minutes to convert the same file to OGV.

avconv supports multithreading/multiple cores but it seems that libtheora doesn't, does anyone have any way of encoding over multiple cores? I found an old mail group which discussed a patch but I can't find much else about it, or if it even still works 5 years on.

So. Is multi-core theora processing possible and what should I use to do it?

For Reference:

avconv -y -i big_buck_bunny_720p_surround.avi -vcodec libtheora -qscale 10 -bufsize 20M -same_quant -acodec libvorbis -ac 2 -ar 44100 -ab 128k buck.ogv
Was it helpful?

Solution

There is a link to a multi-threaded version provided in the official site of libtheora:

theora-multithread: old, no longer developed, experimental encoder library based on the old encoder, optimized for SMP/multi core systems: theora-multithread svn. For more info sees all the thread here: Multi-Thread Theora Encoder.

Build that version, then try building ffmpeg using it. If newer versions of ffmpeg don't build with it, try older versions of the code.

There is also a multithreaded version of ffmpeg2theora.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top