0

I'm just trying to cut parts of an MP4 file. What I've looked at already:

  • VirtualDub was great but it doesn't support MP4 files. Even with the FFMpeg Input Plugin, it can't save in Direct Stream Copy mode because

    The source video stream uses a compression algorithm which is not compatible with AVI files. Direct stream copy cannot be used with this video stream.

  • ShotCut is open source but ridiculously large (600MB installed) and not exactly easy to use - I couldn't figure out how to cut without recompression.

  • MPEG Streamclip hasn't been updated since 2008 and crashes on many files.

2

I made a graphical tool that uses ffmpeg to let you losslessly trim videos by selecting the start and end points on the timeline: https://github.com/mifi/lossless-cut

It is open source and cross platform.

1

Turns out AviDemux can open MP4 files and save portions losslessly. I'm not sure if it can be told to skip to keyframes, so the first few frames may be corrupted, but after the first keyframe, you get a binary copy from the source file.

  • 1
    Any video can only start with an I-frame and end with I- or P-frame. When doing lossless editing ("copy" video codec) AviDemux can only start each segment at an I-frame and end at an I or P frame. If you have any edits that aren't on such a boundary it will refuse to save. VideoRedo on the other hand, lets you cut anywhere, and if it wasn't on such a boundary it will re-encode just those few frames needed to ensure it starts on an I-frame and ends on a P- or I-frame. Therefore VideoRedo allows frame-accurate editing while still being lossless for all but a few frames. – thomasrutter Sep 16 '16 at 1:38
  • 1
    This isn't a complaint of AviDemux which is a great tool, just information. The cost of VideoRedo may not make it worth it for frame-accurate editing. – thomasrutter Sep 16 '16 at 1:39
1

VideoReDo TVSuite V5

I use this all the time on my dvr recordings.

On each segment you want to remove place the starting and ending markers and click cut. Do this for each segment. When you click save, just pick MP4 and it will cut the segments without recompressing/transcoding the whole thing.

  • If you use it so much, it deserve a link, no? :) And even better, some details about it and how it handles the task in the question. – Dan Dascalescu Aug 7 '15 at 12:20
  • 1
    @DanDascalescu I have added the requested details. – cybernard Aug 7 '15 at 15:37
0

Using FFMpeg itself (without VirtualDub) might be possible.

I use it like this to add audio to a video without reencoding:

ffmpeg -i video.avi -i audio.mp3 -map 0 -map 1 -codec copy -shortest output.avi

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .