i have an mp4 video file which has length of 3:48:10.594. a part of the video file is corrupted and blurry. i have another video file which and that part is ok in the second file
i need to cut out a part of the second file and i want to put the good part instead of the corrupted part in the first video file and the length of the first video file has to remain 3:48:10.594 after the replacement happens
both video files have different encoding
what is the simplest way to make the new video which has the good part and it allows me to precisely select frames? i tried to do by using avidemux. the new video file had different length than the original file and it gave me warning that the part that i want to add has different encoding
+ Reply to Thread
Results 1 to 8 of 8
-
-
If those video files have different parameters preventing them to be merged, and if you want the cut-and-paste to be perfectly accurate, then obviously, at least the replacement segment needs to be reencoded so as to match the parameters of the first video. As for how to precisely select cutting points with a 1 frame accuracy, it could be done with a non-linear editor, or with Avisynth + AVSPMod (first adjust the required parameters on the second video to match the first video, then use StackHorizontal or StackVertical to display both videos on the same frame, Trim some frames at the beginning to have both versions synchronized if needed, then scrub to the beginning of the problematic part, note the frame number – adding the number of trimmed frames if applicable, then the same for the end of the problematic part). The difficulty, if you want to avoid re-encoding the first video, is that you can only cut on key frames ; you could be lucky as key frames are often placed at scene changes, otherwise the transition may be noticeable ; you can also decide to re-encode both videos, which makes the editing easier, then it can be done entirely in Avisynth. If using the Avisynth method, then ffmpeg could be used (with the AVS script as input) to encode the replacement part, then merge it with the beginning and end of the first video, or to encode the whole fixed video in one go.
-
Cut into 2 parts with avidemux, starting on a keyframe for the second file. This is easy enough to do but you'll end up with 2 files.
If it is not satisfactory you need to re-encode. -
Only as an idea (not tested):
You could remux the two mp4 (from butterw's suggestion) as TS and merge the ts files. -
You could remux the two mp4 (from butterw's suggestion) as TS and merge the ts files.
-
-
TMPGenc Smart Renderer can be used to split up and reassemble the clips with minimal re-encoding. It is frame accurate. From what I understand videoredo will do the same but I am less familiar with it. Most free tools will have you hunting down keyframes for days.
Similar Threads
-
Faster Wrapping of .mkv H.264 or MPEG-4 Part 10 to .mp4
By carlarogers in forum Video ConversionReplies: 5Last Post: 14th Jun 2020, 22:04 -
Replace audio in MP4 and split
By Loulis in forum EditingReplies: 8Last Post: 14th Apr 2019, 20:03 -
How to Remove Some Middle Part From Video .mp4 File
By Daringbaaz in forum Newbie / General discussionsReplies: 2Last Post: 12th Feb 2019, 06:02 -
MP4Box: How to extract a given part of a mp4 video
By semantics in forum Newbie / General discussionsReplies: 1Last Post: 9th Jan 2017, 17:38 -
Looking for free tools to cut part of mp4 without re encoding it ?
By method in forum EditingReplies: 5Last Post: 9th May 2016, 13:11