[FFmpeg-user] Concat 2 videos, results in wrong length of the result
Gyan
gyandoshi at gmail.com
Sat Sep 9 07:54:19 EEST 2017
On Fri, Sep 8, 2017 at 3:38 PM, Marek Sebera <marek.sebera at gmail.com> wrote:
>
> Concat of the 2 videos, of lenght (00:00:21.00) and (00:00:28.03)
> results in video of lenght (00:01:54.92), which is obviously wrong.
>
>
> ==== ffprobe of 98.out.mp4 ====
>
> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1080, 1455 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
>
> ==== ffprobe of 96.out.mp4 ====
>
> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1080, 919 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
>
The timescales are different 12800 vs 30000. The concat demuxer initializes
output properties based on the first file, and doesn't rescale timestamps
of the other files.
Run this on 96.out.mp4
ffmpeg -i 96.out.mp4 -c copy -video_track_timescale 12800 96.new.mp4
and concat this with the other file.
More information about the ffmpeg-user
mailing list