[mythtv-users] Little OT: RealTime Parallel Multi-PC Transcoding

belcampo belcampo at zonnet.nl
Tue Jun 15 16:22:47 UTC 2010


Hi,

I need some/a lot of help in how to script/achieve above mentioned.

In PAL-land, where I live, we've got 25fps and a GOP-size of 12frames.
None of my DualCore CPU's can transcode, with ffmpeg, in realtime to 
desired h264 quality. But I do have 2 more DualCores sitting there doing 
nothing.

The idea is let each individual Core encode 1 GOP, when ready, get on to 
the next GOP which is not "already worked on".

Encoding capacity of 1 Core = 7fps, h264-HD-Source, which translates to 
0.58333 GOP/sec.

To keep up I need 4 Cores, being able to encode 28fps, which is 
sufficient in my case.

1st Core starts at 0.00 and finishes 1stGOP at 1.71429 seconds.
2nd Core starts at 0.48 and finishes 2ndGOP at 2.19429 seconds.
3rd Core starts at 0.96 and finishes 2ndGOP at 2.67429 seconds.
4th Core starts at 1.44 and finishes 4thGOP at 3.15429 seconds.

The 5th GOP starts at 1.92, the 1st Core is available/ready because it 
finished its 1st job at 1.71429.

The 'lag-behind-realtime' in this case would be ~ 1.2 seconds.

Suggestions how to achieve this are VERY welcome.

I already transcode with 6 cores on existing recording like this:
ffmpeg -vframes total/6 -i source recording.ts .... 1stpart.ts
ffmpeg -ss 1/6totaltime -vframes total/6 -i source recording.ts .... 2n
etc.
Mux 1st... 2nd.. etc. to totalencoded.ts

Regards

Henk Schoneveld

PS. -threads 0 results in 11.9fps, so I can't keep up with 25fps with 
those 4Cores, using more Cores, would result in a smaller 
'lag-behind-realtime' at the cost of using additional energy.


More information about the mythtv-users mailing list