PDA

View Full Version : Splitting an encoding process into multiple parts (like pause and resume or so)


moviefan
11th August 2008, 20:40
Hey guys,

is there a way to split an encoding process into multiple parts so that I can shut down the computer from time to time and resume later? Something similar is possible in DVD-Rebuilder where a movie is split into multiple parts where the encoding process can be aborted and "resumed" (so starting again at the beginning of the part). The problem is that I have a very expensive filter script that probably takes a couple of weeks to encode and I can't dispense the computer for such a long time without pause.

Thanks for help!

Regards

Dark Shikari
11th August 2008, 20:42
Run the filter script through Virtualdub and save to a lossless file in chunks. I did this for MCBob+DFTtesting a concert clip a while back.

cacepi
11th August 2008, 22:13
Run the filter script through Virtualdub and save to a lossless file in chunks. I did this for MCBob+DFTtesting a concert clip a while back.
You could skip the lossless step entirely and use x264's --seek and --frames options instead. Just seek to a scene change for successive parts and you're all set.

Dark Shikari
11th August 2008, 22:14
You could skip the lossless step entirely and use x264's --seek and --frames options instead. Just seek to a scene change for successive parts and you're all set.Except for that whole "two pass" thing, maybe? :p

moviefan
11th August 2008, 22:39
I only aim at encoding in CRF mode. About the lossless chunks: I don't get what you mean... As far as I know, x264 estimates motion so not every frame is entirely stored somewhere (explained in very simple terms, I don't know much about the encoding techniques). So I think I cannot make a cut at any frame without losing compression... I think what cacepi is talking about sounds like something I am looking for, but how do I use it?

Edit: Ah okay, I think I get it... scene changes cause x264 to set a new "reference frame" (don't know what this is actually called... I-frame, P, B...?) so that I don't lose compression... And the --seek and --frames options are something like trim in avisynth

cacepi
11th August 2008, 22:46
Except for that whole "two pass" thing, maybe? :p
--seek and --frames have always worked for me in two pass; is there some reason it wouldn't?

Dark Shikari
11th August 2008, 22:49
I only aim at encoding in CRF mode. About the lossless chunks: I don't get what you mean...You encode to a bunch of lossless chunks using a lossless format, and then piece them together and do the final x264 encode directly from the lossless video.

moviefan
11th August 2008, 22:52
How do you identify scene changes except for analysis by eye?
@ Dark Shikari: Why do I need to encode to lossless first?

ajp_anton
12th August 2008, 00:38
What DS is saying is that you can split up the filtering process into multiple lossless pieces, then put them together and encode the whole thing. (You said the problem was "a very expensive filter script".)

Ranguvar
12th August 2008, 00:48
Since it's slightly related, is there any way to pause x264 for a little bit (full pause, not just lower priority), or (best yet) to fully stop it and resume later, without the use of a GUI or the PC's Suspend, etc.?

J_Darnley
12th August 2008, 00:59
The pause key. Focus the cmd window and press it. Oh, space starts it up again.

Ranguvar
12th August 2008, 02:28
Thanks :) Any ideas about a full stop? Would definitely be an interesting feature to add to x264; dumping all memory in use to a file and exiting upon a certain hotkey being pressed, and then the ability to resume (--resume "resume.dat" anyone?) a previous operation. I have no clue as to whether this would be simple or difficult to implement. Of course, since I will be switching to GNU/Linux, this should become less important to me... reboot? What reboot? ;)

Snowknight26
12th August 2008, 05:18
DS told me thats basically implossible, Ranguvar.

Similar to what J_Darnley said, Ctrl + S works too, but it only takes affect after 0.1% has gone by.

Ranguvar
12th August 2008, 20:56
Hmm? Why should it be impossible?

A full-on dump-RAM-to-disk suspend obviously works, so why wouldn't narrowing down the suspend a little to just x264 work? It's fine if it's a little rough.

Just intrigued :)

slavickas
12th August 2008, 21:50
err and whats wrong with using hibernate?

ajp_anton
12th August 2008, 23:07
Hibernate isn't the same as a Windows restart, which some updates needs/wants, or when you make changes to the hardware etc.

buba king
16th August 2008, 12:41
You could run the encode in a virtual machine like vmware. Then you could just dump the state of the vm when you want to stop, then load the state again when you resume.

hehe.. :stupid:

Ranguvar
16th August 2008, 22:49
:p :rolleyes: :p