DATA RECOVERY UNION > Articles > Video – Joining H264 *without* re-encoding
Posted in

Video – Joining H264 *without* re-encoding

I have two halves of a single show in two .MP4 files, encoded in H264. I would like to join them without re-encoding.

Is this possible?

I managed to create a joined video as a Quicktime file (.mov) using Quicktime Pro, but then Quicktime Pro will not convert it back to .MP4 without re-encoding. This may be because looking inside the .mov file, the two H264 videos are in there still separated as individual “objects”.

I am also struggling with MPEG StreamClip without reaching a real solution. But I may have missed something.

Note that I do not have the same issue with MPEG2 files. I can export them to a .MPEG container or a ย .TS file for example, and then I can join them without re-encoding using MPEG Streamclip.

Any suggestion welcome, preferably using Mac software.

Solution:

ffmpeg -i f1.mp4 -c copy -bsf h264_mp4toannexb f1.tsffmpeg -i f2.mp4 -c copy -bsf h264_mp4toannexb f2.tsffmpeg -i 'concat:f1.ts|f2.ts' -c copy -bsf aac_adtstoasc f3.mp4

How to concatenate flv file into one

๐Ÿ’ 

๐Ÿ”ต Best-selling hard drives, USB flash drives & SSDs everyone's buying.

Fast, reliable, and on sale now. Thousands pick these weekly โ€” don't miss Amazon's lowest storage prices.

โšก Top 10 Bestsellers
๐Ÿ† 4.7โ˜…+ Reviews
๐Ÿ“ฆ Prime Shipping
๐Ÿ‘‰ See today's best-selling Data storage on Amazon.com HDD ยท USB Flash Drives ยท SSD ยท External Drives
๐Ÿ›’
โœ… Updated hourly โ€” Amazon real-time ranking ๐Ÿ”ฅ Limited stock deals ๐Ÿ”— Affiliate
โญ Click to see complete best-selling list โญ