0

I'm trying to merge two m4v video files into one with mp4box, and failing :(

Here's what mp4box -info reports for first file

* Movie Info *
        Timescale 90000 - Duration 01:06:18.836
        Fragmented File no - 2 track(s)
        File Brand mp42 - version 0
        Created: GMT Thu Jun 24 13:13:14 2010

File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
No streams included in root OD

iTunes Info:
        Encoder Software: HandBrake 0.9.4 2009112300

Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 01:06:18.836
Media Info: Language "Undetermined" - Type "vide:avc1" - 132682 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 480 x 270 - Profile Baseline @ Level 2.1
NAL Unit length bits: 32
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 01:06:18.709
Media Info: Language "Undetermined" - Type "soun:mp4a" - 186502 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 1 Channel(s) - SampleRate 48000
Synchronized on stream 1

Here's the second file

* Movie Info *
        Timescale 90000 - Duration 01:34:12.652
        Fragmented File no - 2 track(s)
        File Brand mp42 - version 0
        Created: GMT Thu Jun 24 13:35:44 2010

File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
No streams included in root OD

iTunes Info:
        Encoder Software: HandBrake 0.9.4 2009112300

Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 01:34:12.652
Media Info: Language "Undetermined" - Type "vide:avc1" - 156175 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 480 x 270 - Profile Baseline @ Level 2.1
NAL Unit length bits: 32
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 01:34:12.458
Media Info: Language "Undetermined" - Type "soun:mp4a" - 264959 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 1 Channel(s) - SampleRate 48000
Synchronized on stream 1

I've tried to simply join them with add

mp4box -add file1.m4v -add file2.m4v output.m4v

I've also extracted each stream and then used -add to merge them together. I never wind up with matched video and audio (I don't mean milliseconds out, I mean no audio, or video1 playing with audio2!)

Any pointers on where I am going wrong here?

UPDATE: I had a little more sucesss with avidemux - it gave me a video with all the video and audio in it, but the audio gradually gets out of sync.

Could this be related to the variable frame rate of h.264 video? avidemux appears to come up with an average frame rate for the entire concatenated video.

Related question: How do I merge MP4 files without audio going out of sync?

1 Answer 1

0

In the end I solved this by merging the source material before encoding it. My sources were .flv files, which I merged together with flvbind

You must log in to answer this question.

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