[FFmpeg-user] splitting and concatenating file results in a different file

Jon Beyer jbeyer at gmail.com
Thu Oct 31 22:27:43 EET 2019


A bit more information on this issue, after created the concatenated file
with the following commands [1] and [2], pasted at bottom, if I
print pkt_pts_time via ffprobe with commands [3] and [4], I see that the
timestamp of frame 302 is what is throwing things off when I compare the
two list of frames:

frames_input:
...
300:frame,9.966667,P
301:frame,10.000000,P
302:frame,*10.033333*,I
303:frame,10.066667,B
...

frames_concat:
...
300:frame,9.966667,P
301:frame,10.000000,P
302:frame,*10.083008*,I
303:frame,10.116341,B
...


[1] ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10
chunk_%03d.mp4
[2] ffmpeg -f concat -safe 0 -i mylist.txt -c copy concat.mp4
[3] ffprobe -select_streams v -show_entries frame=pict_type,pkt_pts_time
-of csv input.mp4 | grep -n frame > frames_input
[4] ffprobe -hide_banner -select_streams v -show_entries
frame=pict_type,pkt_pts_time -of csv concat.mp4 | grep -n frame >
frames_concat
[5] diff frames_input frames_concat


More information about the ffmpeg-user mailing list