I am getting an error 'pack with invalid duration' using ffmpeg with concat on Yosemite

I am executing:

ffmpeg -i concat:"intro.mp4|movie.mp4" -codec copy output.mp4

and am getting error:

[mp4 @ 0x7fc5f984ae00] Packet with invalid duration -1975 in stream 1

I can't seem to figure out what the problem is. The files are both H.264 AAC.

Can someone explain what causes this error?


Make sure the video files are at the same resolution, framerate and timebase. First check what they are now, and if they differ, choose what clip you want to use to base the settings on. You can then convert the others with something like the following command (example with a resolution of 1280x720, 24 fps, a video timebase of 90k, and audio timebase of 48000).

ffmpeg -i original.mp4 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2 -c:v libx264 -c:a aac -strict experimental -video_track_timescale 90k -r 24 -ar 48000 converted.mp4

What does this have to do with apple? Isn't this a general ffmpeg question?