google-code-export / tovid

Automatically exported from code.google.com/p/tovid
1 stars 0 forks source link

Multiple videos should be converted in parallel #156

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Although mpeg2enc and ffmpeg can do certain things in multiple threads, in 
reality they can only keep a single processor busy (with the video stream) and 
another -- partially busy (with the audio stream).

Systems with even two CPUs and especially the bigger ones with 4+ processors 
would be much better utilized if the multiple videos were instead converted in 
parallel. The sample conversion script would be:

tovid ............. &
tovid ............. &
... up to the number of CPUs ...
tovid ............. &
wait

The above is imperfect -- different parts could finish much quicker, leading to 
underutilization -- but simple. A more efficient implementation could, for 
example, generate a makefile instead of a shell script and invoke make with the 
`-j' flag.

The number of CPUs can be determined automatically, but the user should be 
given an option to overwrite the value.

Original issue reported on code.google.com by virtuale...@gmail.com on 19 Nov 2011 at 12:17

GoogleCodeExporter commented 9 years ago
This could most easily be accomplished within the todisc script ('tovid disc') 
as this functions as a kind master script for the others in addition to its 
menu creation
mandate.  At present there exists an -encode-only option to todisc which will 
do just that.  It could easily background encoding tasks for the supplied 
videos.  Patches welcome :)

Original comment by grepper@gmail.com on 15 Jun 2012 at 6:38