I am trying to use to the concat protocol but I have troubles with keyframes
I use this ffprobe command to visualize the keyframes pts of my videos:
ffprobe -loglevel error -select_streams v:0 -show_entries packet=pts_time,flags -of csv=print_section=0 inout.mp4 | awk -F',' '/K/ {print $1}'
Here is my process: I have the original video, with these keyframes:
0.000000 5.000000 9.760000 14.240000 18.440000 ...
I trim the first 5 seconds, so the output has these keyframes:
0.000000 4.760000 9.240000 13.440000 ...
I create a 5 seconds video by looping an image, with the same parameters/codec... that were used to produce the original video. This video just has one keyframe at 0.000000
Then I concat this video with the trimmed video like this:
ffmpeg -f concat -safe 0 -i list.txt -c copy -shortest output.mp4 -y
But when I look for the keyframes of the output video, I get this:
0.021016 5.035000 9.795000 14.275000 ...
Is this behavior normal? Should I add a parameter to handle keyframes during concatenation? Thanks