• Most new users don't bother reading our rules. Here's the one that is ignored almost immediately upon signup: DO NOT ASK FOR FANEDIT LINKS PUBLICLY. First, read the FAQ. Seriously. What you want is there. You can also send a message to the editor. If that doesn't work THEN post in the Trade & Request forum. Anywhere else and it will be deleted and an infraction will be issued.
  • If this is your first time here please read our FAQ and Rules pages. They have some useful information that will get us all off on the right foot, especially our Own the Source rule. If you do not understand any of these rules send a private message to one of our staff for further details.
  • Please read our Rules & Guidelines

    Read BEFORE posting Trades & Request

Joining videos without re-encoding

futon88

Well-known member
Donor
Faneditor
Messages
561
Reaction score
789
Trophy Points
113
I'd like to be able to join separate .mp4 videos prior to distributing a fanedit. For instance, rendering opening titles and the bulk of the edit separately, then joining after-the-fact (which allows me to iterate on one without having to re-render the other).

It sounds straightforward, and ffmpeg can do it:

ffmpeg -auto_convert 1 -f concat -safe 0 -i files.txt -c copy output.mp4

Where "files.txt" contains the list of inputs.

It works perfectly, except it doesn't. Only the first clip plays normally. When it gets to the second, it basically stops playing the video in realtime, like it's doing < 1fps (the audio carries on, somehow).

My inputs are .mp4 files that I create direct from Vegas with either the MAGIX AVC options or Sony AVC options.

But here's the thing: If I pass those files through Handbrake and create secondary .mp4 files, I can concatenate those together just fine.

I'd like to avoid re-encoding the files just so that I can join them together...without have to re-encode them. Know what I mean?

What am I doing wrong? What is handbrake doing that allows the files to be joined cleanly with the concat demuxer?

How do you join your videos?

Thanks
 
I work in lossless and render in lossless, with compression being an entirely separate phase from rendering, so I don't really have this problem. I know that avidemux allows you to make cuts without re-encoding. I'm not sure if you can join or not. But even if your starting point wasn't lossless, you could probably download lagarith AVI codec, render your titles out in that format, then drop that onto the timeline at the start of your main edit, THEN render your final product with your usual settings?
 
Check "My MP4 Box GUI" maybe?

It has a Join feature in the description.
Hmm, unless I'm using this incorrectly, it's also having trouble with my source .mp4s. It gets to around 40% then just stops and switches back to "Ready..." with no output.

I wonder if it has something to do with the H.264 profile I'm using. Vegas is outputting "High", while Handbrake defaults to "Main".
 
Unfortunately you may need to change your render settings in Vegas if it's not working as is and you don't want to re-encode after outputting from Vegas.

Or it might be some weird copy protection. Are the files behaving strangely in players too?
 
No, the output H.264 files play fine independently. And they were both rendered from the same Vegas file, with the exact same encoder, bitrate, options, etc.
 
Merging two video files is not always going to be feasible because of the mismatching frames like b-frames in the two different encodes. I can't remember the name of the software but I noticed one which would join video files and re-encode ONLY the joined portions that needed frames fixed. This fixes the playback issues at the merge point. And the vast majority of the video would not need to be re-encoded. Wish I could recall the name but it was not free.
 
Did you try Shutter? It has a lossless combiner, though I forget what it's called.


Honestly, I hadn't considered using a different GUI tool for this. I figured I could do it with ffmpeg. Shutter appears to be built off of ffmpeg, so the results may be similar.

I should revisit the command I was trying earlier since my rendering pipeline has changed a bit since I posted this.

Thanks for the bump!
 
Back
Top Bottom