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. |
|
|
Thread Tools | Search this Thread | Display Modes |
1st December 2018, 04:23 | #1 | Link |
Registered User
Join Date: May 2002
Posts: 167
|
Trying to cut the first few seconds of a MP4 video on a non-keyframe
So, this has been driving me nuts. I have a video that I went to cut out the first 30-40 or so seconds without re-encoding the entire thing. Issue is, the part I want to cut on is not on a keyframe, so most software I used either cuts on the keyframe before the part I want (such as Avidemux) leaving in a few moments of garbage video, or gives me a video that is just bank for the first few moments (ffmpeg) until the next keyframe.
I couldn't figure out a way to make anything read the previous seconds of the video and generate a new keyframe at the beginning of the cut, so I figured my next best bet would be to actually split the video on that keyframe, then trim the part I want from the beginning by re-encoding just the half or so segment I want, and then joining that with the rest of the video. Issue is, I have no idea how to attempt to duplicate the settings of the second half of the video so I can join it. All attempted have just resulted in it rejecting the second half of the video to join (mp4box) or spitting out a video that after that first half second or so is just corrupted and does not play the rest (avidemux). Does anybody have any suggestions on this? I am assuming the re-encoding route is my only option, but how would I duplicate the settings of the original video so I can re-join it?
__________________
"A train station is where a train stops. A bus station is where a bus stops. On my desk I have a workstation..." - ComradOtter |
Thread Tools | Search this Thread |
Display Modes | |
|
|