cannot append 2 mp4-files

405 views
Skip to first unread message

Vor Witz

unread,
Jan 26, 2015, 9:37:08 AM1/26/15
to mp4parser-...@googlegroups.com
Hey,
I have two mp4-videos. One has been taken with the phone-camera, the other is a layout which has been transformed to an image and then to a mp4-video(i have made it with jcodec). When i try to concat them like shown in the append class example, i get this error:

"E/isoparser﹕ AppendTrack:height differs
W/System.err﹕ java.io.IOException: Cannot merge VisualSampleEntry[com.coremedia.iso.boxes.h264.AvcConfigurationBox@44f236f8] and VisualSampleEntry[com.coremedia.iso.boxes.h264.AvcConfigurationBox@44f22bf0]"

please cann somebody help me? I will really appreciate

Dominic D

unread,
Jan 26, 2015, 6:04:58 PM1/26/15
to mp4parser-...@googlegroups.com
I'm facing the same problem. It has to do with the resolution of the two mp4 videos being different. If the resolution is same, then it appends tracks to the same mp4 just fine. See my earlier post.

Soreil Tsangue

unread,
Jan 28, 2015, 4:55:11 AM1/28/15
to mp4parser-...@googlegroups.com
Hey Dominic, thanks for your feedback. Unfortunately the suggestion on your post hasn't helped me enough. Did you finally solve your problem?

--
You received this message because you are subscribed to the Google Groups "mp4parser-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mp4parser-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Annies

unread,
Jan 28, 2015, 1:12:14 PM1/28/15
to mp4parser-...@googlegroups.com
One video file and two resolution is typically not supported. 
avc3 which is defined in the latest 14496-12 amendment can have sps/pps in the mdat box, so the resolution might change through out the video. But even basic support is not yet there (basic support == VLC plays the file)
another option is to use another sample description index for those new samples but it is unclear to me how widely this is supported - unfortunately it is rather hard to implement on the current codebase. 

Best Regard,
Sebastian

Dominic D

unread,
Jan 28, 2015, 1:44:49 PM1/28/15
to mp4parser-...@googlegroups.com
I tried the 2nd approach that Sebastian suggested in his reply to me, by using his newly committed avc1 to avc3 example, to create two mp4 files using avc3. I then used mp4box to concatenate the two mp4 files together. The output mp4 is playable in GPAC's mp4client player, but is NOT playable in VLC as VLC doesn't support avc3.

The first approach that Sebastian suggested is what i'm currently working on coding.

Dominic D

unread,
Jan 28, 2015, 1:51:21 PM1/28/15
to mp4parser-...@googlegroups.com
Yup, I'm working on using "another sample description index" option and finding it hard to implement, as I first have to understand the MPEG4 format of using these tables and boxes.

I have an output mp4 that has two sample description boxes and two sample to chuck boxes, but i'm finding it hard to understand how to copy over the samples themselves from input mp4 files.

Sebastian if you have any sample code or a brief algorithm of how it is done using two mp4 files, and one track track in the output file that would be really awesome.

Mubashar Anwar

unread,
Mar 4, 2016, 12:36:57 AM3/4/16
to mp4parser-discussion
i have two mp4 files. one recorder from camera intent and second created from bitmap images using jcodec.
mp4parser is not playing video after merging. both videos are of same resolution

Sebastian Annies

unread,
Mar 8, 2016, 1:32:21 AM3/8/16
to mp4parser-...@googlegroups.com
The mp4parser does not 'play' the videos. 
Are you successfully generating a video? And this video doesn't play? Check if it is working on VLC plz.

--
Reply all
Reply to author
Forward
0 new messages