[Libav-user] Threading a h264 video decoder - timing is odd.
george at nsup.org
Fri Jun 3 16:18:41 CEST 2016
Le sextidi 16 prairial, an CCXXIV, Jesper Taxbøl a écrit :
> I am working on a threaded video reader to spread the decode workload on
> some more cores and gain some speed. My source is included below:
> The thing is that I dont see a time improvement when starting two processes
> instead of one. On a 80mb mp4 file it takes 6 seconds to decode the video,
> while doing two in parallel takes 12 seconds. I can see that two cores's
> are used 100 percent. Im on a fast SSD disk so I dont think im IO limited.
> What could be the case. Is it the same decoder taht is doing all the work?
> Do I perhaps need to instantiate a context or something?
The decoders for the most common codecs, including the ones you are probably
using in your MP4 files, are already threaded in FFmpeg. Unless you have a
lot of cores, a single instance of the decode probably already uses them all
completely. Running several instance in parallel will only add
Please remember that top-posting is not accepted on this list; if you do not
know what it means look it up.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the Libav-user