Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
This should be a simple question to get an answer for, but it's the sort of question that's impossible to find in any search engine because there's so much content farm SEO garbage out there.

Is there a Mac GUI app that can combine mp4 / m4v files, such as you'd get from Handbrake, into a single file, without re-encoding the video.

I've burned hours trying to solve this, and can't find an answer. The solution is not Quicktime, or Quicktime 7 Pro, nor is it iMovie.

If anyone has a solution working for this, please let me know what it is.

Thanks.
 

R S K

macrumors regular
Oct 18, 2022
197
76
Hannover, Germany
I can see a lot of useful suggestions and links by simply googling "combine clips without reencoding".

Quicktime Player pre-X could do this. But alas…
 

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
I can see a lot of useful suggestions and links by simply googling "combine clips without reencoding".

Quicktime Player pre-X could do this. But alas…
When I search for it, almost all the results are "blog posts" that share about 70% of their copy, & just so happen to be recommending products that look dodgy, made by the domain holders' companies.

Hence why I was asking for people's direct experience.
 

R S K

macrumors regular
Oct 18, 2022
197
76
Hannover, Germany
You must have a different Google then I guess. Because I see a lot of very useful threads and videos on the topic. Oh well.

And I've seen plenty of "dodgy" software recommended here as well. So… 🤷🏼‍♂️ Maybe you'll get lucky.

BTW, as long as you don't recompress with some massively low bitrate, you should not even notice a difference when outputting with such highly efficient codecs such as H.264 and especially HEVC, if retaining quality is what you're worried about.
 

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
You must have a different Google then I guess. Because I see a lot of very useful threads and videos on the topic. Oh well.

And I've seen plenty of "dodgy" software recommended here as well. So… 🤷🏼‍♂️ Maybe you'll get lucky.

BTW, as long as you don't recompress with some massively low bitrate, you should not even notice a difference when outputting with such highly efficient codecs such as H.264 and especially HEVC, if retaining quality is what you're worried about.
Well I tried going through Resolve, with the setting to not re-encode if not necessary, and it still re-encoded the audio, and everyone sounded slightly robotic.

My eye is currently on LosslessCut.
 

arw

macrumors 65816
Aug 31, 2010
1,100
859
@mattspace you are right, re-encoding should always be the absolute last resort if everything else fails.
What I do on the rare occasions I actually need to combine two m4v files is the following:
(It is not straight forward but lossless)
  1. Open the first file in MKVToolNix. Right click it and select "Append files" and point to the second file. Click "Start multiplexing" to save the result in a new file. It will be an *.mkv file.
  2. Open the new (combined) mkv-file in Subler and save it as mp4/m4v.
I'm assuming both files have similar preferences (codec, resolution, soundtracks, ...)
 
  • Like
Reactions: mattspace

nateo200

macrumors 68030
Feb 4, 2009
2,906
42
Upstate NY
@mattspace you are right, re-encoding should always be the absolute last resort if everything else fails.
What I do on the rare occasions I actually need to combine two m4v files is the following:
(It is not straight forward but lossless)
  1. Open the first file in MKVToolNix. Right click it and select "Append files" and point to the second file. Click "Start multiplexing" to save the result in a new file. It will be an *.mkv file.
  2. Open the new (combined) mkv-file in Subler and save it as mp4/m4v.
I'm assuming both files have similar preferences (codec, resolution, soundtracks, ...)
I've had mixed results with MKVToolNix on this front but overall its a great tool. Honestly it sucks but I usually just throw the video files in a Premiere Pro (or FCP X) timeline and rerender. If I'm worried about quality issues Ill transcode to a stupid high bitrate visually lossless codec like ProRes 422 HQ. Of course I have pretty freaking highend computers that are built for this type of thing so I realize this isn't practical all the time.
 
  • Like
Reactions: arw

arw

macrumors 65816
Aug 31, 2010
1,100
859
@nateo200 thanks for the additional input. As OP mentioned files "such as you'd get from Handbrake" I assumed they have pretty much identical properties (like merging two Bluray rips created with the same profile). And this is basically the only scenario where I can speak for the 'Append' function of MKVToolNix.

Nevertheless, 'Avidemux' definitely sounds more straight forward and it would be interesting to know what input files @mattspace actually wants to link together and if 'Avidemux' handles them properly.

It could also be interesting to learn the reason for wanting to merge the two files in the first place. For example 'Kodi' automatically handles split video items as one single video if they are named *part#.
 

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
@nateo200 thanks for the additional input. As OP mentioned files "such as you'd get from Handbrake" I assumed they have pretty much identical properties (like merging two Bluray rips created with the same profile). And this is basically the only scenario where I can speak for the 'Append' function of MKVToolNix.

Nevertheless, 'Avidemux' definitely sounds more straight forward and it would be interesting to know what input files @mattspace actually wants to link together and if 'Avidemux' handles them properly.

It could also be interesting to learn the reason for wanting to merge the two files in the first place. For example 'Kodi' automatically handles split video items as one single video if they are named *part#.

Oh the reason is quite prosaic - I have the Lord of The Rings extended director's editions DVDs which I want to encode to m4v so I can airplay to my AppleTV. VLC, which could playlist the two parts can't send it directly (you need to extend your display to the AppleTV and fullscreen VLC on that, which results in framerate instability), so I need to join the two parts of each film so Quicktime can send it.

But I've also had other needs to assemble videos without recompressing, so it's a good opportunity to solve the problem.
 

R S K

macrumors regular
Oct 18, 2022
197
76
Hannover, Germany
Wait… so you're coming from a DVD rip? Meaning the worst possible quality to begin with? 😄 Then you most certainly do not need to worry about any loss of quality no matter what you use. H.264 or HEVC are so far beyond the hideous MPEG 2 that it's coming from that even a 3x re-encoding wouldn't objectively show the slightest difference. At best on some extreme pixel-peeping level. Ergo: I'd say you're completely overthinking matters.

Import into Handbrake, or, if the files are already demuxed, into whatever NLE you have (iMovie, FCP, etc.) and output with a medium-high bitrate HEVC or even H.264… done. Import the clips into Photos, assuming you have the needed iCloud storage, and play directly from there, no AirPlay fiddling, multiple devices or anything else needed.
 

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
Wait… so you're coming from a DVD rip? Meaning the worst possible quality to begin with? 😄 Then you most certainly do not need to worry about any loss of quality no matter what you use. H.264 or HEVC are so far beyond the hideous MPEG 2 that it's coming from that even a 3x re-encoding wouldn't objectively show the slightest difference. At best on some extreme pixel-peeping level. Ergo: I'd say you're completely overthinking matters.

Import into Handbrake, or, if the files are already demuxed, into whatever NLE you have (iMovie, FCP, etc.) and output with a medium-high bitrate HEVC or even H.264… done. Import the clips into Photos, assuming you have the needed iCloud storage, and play directly from there, no AirPlay fiddling, multiple devices or anything else needed.
Yeah, I think you’re missing the subtlety of the problem - on disc I have full quality video-ts disk images of the dvds. They can’t be airplayed directly to an AppleTV. So I rip each disk to h.264 in the highest quality format to match the DVD original. The films take 2 dvds each, so I have to join the h264 files into a single file, so it can be easily airplayed to the appletv.

No Apple tool can do this without re-compressing the audio and video. QuickTime 7 Pro had pass-through as an option, but it’s not an option any more. So the goal is to find a tool that can do all of its functions without re-encoding.

Losslesscut would seem to be the solution, as it’s a nice front end for ffmpeg.
 

R S K

macrumors regular
Oct 18, 2022
197
76
Hannover, Germany
Yeah, I think you’re missing the subtlety of the problem
I'm not actually.


They can’t be airplayed directly to an AppleTV.
I have not heard of a clip that QT is able to open that can't be AirPlayed. If that is in fact the case, then I can only assume it must simply have a ridiculously inordinate (and therefore superfluous) datarate? But again, if you can add it to Photos and can be played there, then it can be played on an AppleTV without any AirPlay or whatever else.


No Apple tool can do this without re-compressing the audio and video.
Of course, one can. Compressor. It simply doesn't combine clips.

And btw: the current Quicktime Player very much does have an appending option. "Add Clip to End" in the Edit menu. Will it recompress? Depends on the clips. But then, if your clips are actually that high of a datarate, then it's irrelevant anyway.

And if quality and the avoidance of any recompression were so essential, then I don't understand why you even converted them to H.264 in the first place. Since that introduces at least one additional generation of compression. If you were trying to avoid that, you'd just demux the clips, combine them in any given NLE, and then render them out. One clip, one compression. Not two. So it's all a bit of a contradiction.

If you want to go 3rd party and that works, great.
 

mattspace

macrumors 68040
Original poster
Jun 5, 2013
3,184
2,879
Australia
I'm not actually.

I beg to differ.

I have not heard of a clip that QT is able to open that can't be AirPlayed. If that is in fact the case, then I can only assume it must simply have a ridiculously inordinate (and therefore superfluous) datarate? But again, if you can add it to Photos and can be played there, then it can be played on an AppleTV without any AirPlay or whatever else.

No, VLC can't airplay, and the file is is two parts, and Quicktime Player doesn't do playlists.

I don't mix photo apps with video library stuff.


Of course, one can. Compressor. It simply doesn't combine clips.

Right, but combining two clips into a single clip, without re-rendering is the point of the exercise.

And btw: the current Quicktime Player very much does have an appending option. "Add Clip to End" in the Edit menu. Will it recompress? Depends on the clips. But then, if your clips are actually that high of a datarate, then it's irrelevant anyway.

No it will always recompress, because its only options are to export as a hard-coded preconfigured compression option (eg Youtube, 1080p etc), or save as a .mov, neither of which are the goal of the exercise.

And if quality and the avoidance of any recompression were so essential, then I don't understand why you even converted them to H.264 in the first place. Since that introduces at least one additional generation of compression. If you were trying to avoid that, you'd just demux the clips, combine them in any given NLE, and then render them out. One clip, one compression. Not two. So it's all a bit of a contradiction.

Or, I render them out first in Handbrake at the compression settings I want, where everything is configurable, and then drop them together in a tool that works the way I want to work, and just glues them back together without any re-rendering or loss of quality, and no dicking around with setting up project files, copying media to bins or content libraries, or any of the other faffing about that comes from using the wrong tool for the job - a project-based NLE.

If you want to go 3rd party and that works, great.

What I want is to do a specific task in a specific way, not do a different task, with superficial similarities.
 
  • Like
Reactions: T'hain Esh Kelch
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.