Log in

View Full Version : Splitting a big crf encode into chunks


Morte66
6th October 2006, 09:16
I want to run some huge crf encodes from MPEG2, that will each take about three days. I also want to run some deeply unreliable networked software, that makes me reboot every day or so. So I was wondering about splitting the encode into chunks lasting a few hours, which means that whenever I want to reboot I can wait for the current chunk to end then reboot and restart my encoder queue. If I were doing two pass encoding with a target size, this would mess up my bitrate distribution. But I'm doing crf, the bitrate is adjusted to suit the material on the fly. So far as I can see, this ought to be OK.

I figure I'll prepare the D2V, sound and AVS as normal. Then I'll open up the AVS in VirtualDubMod to get the frame count and pick scene changes to split on. I'll make a series of AVS scripts with trim() statements covering the file, and encode them all. Finally I'll concatenate the video segments in mkvmerge and mux in the sound.

Does anybody see a problem with this that I've missed?

{edit p.s.} Do I especially need to split on scene changes? If I split every 20,000 frames or whatever, that'll put about 10 extra I-Frames into the x264 encode. I can't see that really being a problem, my crf encode just be will be a very tiny bit bigger.

DarkZell666
6th October 2006, 11:00
IIRC, if avisynth will be in charge of decoding the MPEG2 stream (via the d2v file), you don't need to do anything, except add trim(x,y) to your script (trim(0,1999), trim(2000, 3999), etc...).

But, I do suggest you try indeed just in case avisynth would bork the mpeg2 decoding with green macroblocks at the beginning of each section.

Seems pretty straight forward for this one :)

Morte66
6th October 2006, 13:39
But, I do suggest you try indeed just in case avisynth would bork the mpeg2 decoding with green macroblocks at the beginning of each section.

Checked that, the "segment scripts" play back fine.

The first chunk is encoding now. I'll post results in a few days...

Morte66
9th October 2006, 19:30
Just in case anybody else is interested... this worked fine.