Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th December 2013, 00:23   #1  |  Link
Nozdrum
Registered User
 
Join Date: May 2013
Posts: 31
How to trim during encoding, in x264?

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:

Code:
--zones 1100,2300,skip=1/7600,8900,skip=1
In MeWiki 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?
Nozdrum is offline   Reply With Quote
Old 13th December 2013, 02:24   #2  |  Link
nhakobian
Registered User
 
Join Date: Oct 2009
Location: San Francisco, CA
Posts: 101
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:
Code:
--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.
nhakobian is offline   Reply With Quote
Old 13th December 2013, 04:08   #3  |  Link
Nozdrum
Registered User
 
Join Date: May 2013
Posts: 31
Quote:
Originally Posted by nhakobian View Post
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:
Code:
--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
Nozdrum is offline   Reply With Quote
Old 13th December 2013, 09:52   #4  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 273
Remember to add "--stitchable" to the commandline so you don't get into trouble joining them together later.
__________________
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.” — Mark Twain
the_weirdo is offline   Reply With Quote
Old 13th December 2013, 20:40   #5  |  Link
Nozdrum
Registered User
 
Join Date: May 2013
Posts: 31
Quote:
Originally Posted by the_weirdo View Post
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!

Last edited by Nozdrum; 13th December 2013 at 22:14. Reason: typo
Nozdrum is offline   Reply With Quote
Old 13th December 2013, 20:50   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
--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.
sneaker_ger is offline   Reply With Quote
Reply

Tags
avisynth, seek, trim, x264, zones

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.