Log in

View Full Version : mp4box concatenating mixed audio+video and video-only mp4 files


stic
3rd December 2011, 21:02
Hi everybody,
I would really appreciate if somebody could help in my problem concatenating three video files, where only one of them has audio presented.
Basically I have 3 files:

1# video1_only_h264.mp4 - no audio
2# (video2_h264_audio_aac).mp4
3# video3_only_h264.mp4 - no audio

If I try to concatenate them into one mp4 file with:
mp4box -add video1.mp4 -cat video2.mp4 -cat video3.mp4 -new output.mp4

it results into file, where sound from the video2 begins right after the playback starts. Instead of being synchronized with the video2 position.

Thanks

stic
3rd December 2011, 21:54
So I've just made silent audio file in the length of the first video with ffmpeg, and muxed it together.
But I'm sure there exists better and more inteligent solution :D
Anybody?

CarlEdman
6th December 2011, 14:43
I asked for a generic solution to this problem recently, with no good solutions (for my purposes) found. http://forum.doom9.org/showthread.php?t=163059

stic
9th December 2011, 01:44
Actually the solution I found myself is working perfectly in my case. But I thought there could be even simpler option. Seems I was wrong :)