View Full Version : How to trim during encoding, in x264?
Nozdrum
13th December 2013, 00:23
I was trying to trim directly while encoding with x264, but I couldn't find any way, I wonder if there're any --zones settings to skip the given zones, something like:
--zones 1100,2300,skip=1/7600,8900,skip=1
In MeWiki (http://mewiki.project357.com/wiki/X264_Settings#zones) I didn't find anything similar to this, I know that it's possible with Avisynth but I think it could be nice if it were possible directly from x264.
Any ideas? :confused:
nhakobian
13th December 2013, 02:24
The setting --seek lets you indicate what the starting frame of the encode is, and --frames tells it how many frames to encode. For example:
--seek 2500 --frames 1000
tells x264 to start encoding at frame 2500 and end at frame 3500.
I am not sure how this interacts with the --zones feature.
Nozdrum
13th December 2013, 04:08
The setting --seek lets you indicate what the starting frame of the encode is, and --frames tells it how many frames to encode. For example:
--seek 2500 --frames 1000
tells x264 to start encoding at frame 2500 and end at frame 3500.
I am not sure how this interacts with the --zones feature.
I think this is good enough, I can make a batch file with multiple instances of x264 for each part that needs to be trimmed, I think it's really good actually!
Thanks I'll try it asap :devil:
the_weirdo
13th December 2013, 09:52
Remember to add "--stitchable" to the commandline so you don't get into trouble joining them together later.
Nozdrum
13th December 2013, 20:40
Remember to add "--stitchable" to the commandline so you don't get into trouble joining them together later.
I was thinking to foce some key frames using --qpfile but this sounds better, it's probably gonna save me some time, thanks!
sneaker_ger
13th December 2013, 20:50
--stitchable has nothing to do with keyframes, but if you do each encode separately you won't have trouble with keyframes when appending them in the end anyways. Keyframes are only a problem if you plan on splitting a long encode into smaller parts, not the other way around.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.