? How to Cut/Trim m4v-mp4 without re-encoding ?

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
EyeCandy
Posts: 5
Joined: Fri Nov 05, 2010 12:14 am

? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by EyeCandy »

Hi everyone...hope all is well !

I love Handbrake (& put my money donation where my mouth is) because it makes great vids with 2+ audio tracks!

BUT how can I trim a finished mp4-m4v video WITHOUT re-encoding (on a Windows desktop) ?!?

As member "mduell" said last year, "Google lists lots of dismal options for trimming mp4s"

Sadly, Handbrake trims poorly (using Seconds or Frames instead of Chapters). So ALL my finished vids need trimming at the end. :-( (I make a short test to always get a good clean start point.)

Does anyone know a GOOD freeware program (like the wonderful "mkvmerge" but for m4v) that trims WITHOUT re-encoding?

I am making "shrunk" copies of the 200 episodes I have of the "24" TV series, each with 2 audio tracks. I have the original factory DVD sets as my source.

SADLY, Handbrake will ONLY encode them correctly when I use m4v, NOT mkv. The m4v result is perfect, except for the end trim needed. When I used Handbrake to encode the vids as mkv, it failed every time, no matter what advice I got from this great forum.

To save us all from wasting our time with bogus ideas, here is what does NOT WORK (for me):

1) "MPEG Streamclip 1.2" was suggested by several Contributors on this forum. IF somehow this will actually work, kindly tell me what your secret trick is to get it to edit m4v. On my Win-XP computer, MPEG Streamclip 1.2 will NOT EVEN OPEN m4v or mp4 video made by Handbrake, let alone edit them. I have used that great program for 2+ years, but maybe I'm overlooking something.

2) "AviDemux 2.5.4" and "AutoGK 2.55" do not accept multiple audio tracks.
3) "Mpeg2Cut2" will not open m4v or mp4.
4) expen$ive program, like "VideoRedo" etc. that I must buy, learn, and then pray it works.


I do hope that member "mduell" is wrong, and that there is good freeware for trimming m4v-mp4 without re-encoding. But I have not found it yet.

I wonder why Handbrake uses m4v format without an easy way to trim them.

Thanks to all.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by JohnAStebbins »

gpac http://www.videohelp.com/tools/mp4box

Code: Select all

MP4Box -splitx start_sec:end_sec in.mp4 -out out.mp4
EyeCandy
Posts: 5
Joined: Fri Nov 05, 2010 12:14 am

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by EyeCandy »

Thanks John, but "MP4Box" is sadly NO GOOD with subtitles and/or multiple audio tracks. Just in case it has improved lately, I just tested the latest version of MP4Box & its GUI version. Both ruin the audio and subtitle timings of the perfect (except for trim) m4v file made by Handbrake. One audio track was 10-15 second fast, another 4-5 second slow, and the subtitles were so wrong that I had no idea how off they were. Is there some special trick to get it to correctly handle 2 audios and 1 subtitle?!?
rogue23
Enlightened
Posts: 137
Joined: Thu Dec 16, 2010 7:51 pm

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by rogue23 »

I use MPEG StreamClip without a problem on Mac, but haven't tried it on Windows. Although, it's not frame-accurate, so I tend not to use it. On Windows, I use VideoRedo, but it doesn't handle Variable Framerate, so I trim source videos before feeding into Handbrake instead of triming the output from Handbrake. I haven't used it with soft subtitles or multiple audio tracks, so I don't know how it will work for those files. And, of course, it's not free; but, in my opinion, is worth the money.
EyeCandy
Posts: 5
Joined: Fri Nov 05, 2010 12:14 am

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by EyeCandy »

!! FIGURED OUT 2 GREAT SOLUTIONS !!

The 2 solutions to trimming m4v-mp4 are simple...wonder why I didn't think of it sooner? :-(

1) With MPEG Streamclip, only use "i" and "o" to highlight the desired part of the VOB file, BUT DO NOT ACTUALLY trim it. This way MPEG Streamclip will still save it as a VOB file so Handbrake can perfectly convert the VOB to either a mkv or a m4v file with 2+ audios, subtitles, etc. !! :-D

OR ELSE with a VOB or a MPEG file,

2) Use Handbrake's feature to select the seconds (or frames--but NOT chapters) to make two (2) different, short tests (e.g.,100 second long) of when (= which second or frame) the final resulting file should:

>> start by having Handbrake output a file of, say from 50-150 seconds, to verify the right start point (to learn, start at "73 seconds")

>> end by having Handbrake output a file of, say from 4750-4850 seconds, to verify the right end point (to learn, end at "4791 seconds")

Then, make the final mkv or m4v file using the start and end times or frames you just verified work.

I have successfully now tried both the above solutions on some 10 episode videos === perfect! :-D
komponents
Posts: 2
Joined: Sun Feb 05, 2012 6:44 pm

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by komponents »

@EyeCandy

What command did you use and does it work in the "Current x264 Advanced Option Strings" ?

Thank you
Deleted User 13735

Re: ? How to Cut/Trim m4v-mp4 without re-encoding ?

Post by Deleted User 13735 »

Trimming and joining both DVD (vob) files and MP4/h264 without recompression is accomplished with VideoRedo h264 edition. Years in the works, the h264 feature is still undergoing some final tweaks, but it works.

All it takes is a little reading to understand why a smart-render with reindexing is so difficult with AVC. Also, Handbrake was never designed as a muxer, but an external encoder.
Post Reply