[FFmpeg-user] Using FFMPEG to encode multiple outputs in 'parallel' (doesn't work?)

shalin shalin186 at gmail.com
Fri Jun 30 02:56:51 EEST 2017


Cley Faye wrote
> More to the point, as far as I know, ffmpeg will not do parallel treatment
> on either input or output, as you deduced. It certainly is doable, but
> don't seem trivial to implement in the ffmpeg CLI tool itself since that
> tool must handle various cases, and introducing (more) special cases would
> add complexity for not much benefits.
> 
> You should look in using the various ffmpeg libraries directly; with that
> you could probably write it to decode once, encode multiple time. But
> unless you have shockingly similar settings and unlimited processing
> power,
> you'll most likely stall some of your encodings while other catch up with
> them. I don't know how well ffmpeg libraries handle multithreading (I
> suppose fairly well since most of it's operations are based on context
> structures) but you'll have to do a fair amount of synchronization by
> hand.

Thank you for your answer to my original question. So from this, I am
assuming that ffmpeg in its current form doesn't support output level
parallelism. Actually I have 'shockingly' similar transcodings to perform on
a given input stream (I need to crop different parts of the input video and
encode them at same bitrate and also cropped parts are same in size for each
stream). With that each encode should roughly run at the same rate and I
believe multithreading should be really helpful.

I will probably check with ffmpeg developers to know their thoughts on this
one. Let me know if anyone has tried some thing like this.

Thanks.



--
View this message in context: http://www.ffmpeg-archive.org/Using-FFMPEG-to-encode-multiple-outputs-in-parallel-doesn-t-work-tp4680420p4680436.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list