[FFmpeg-user] Concatenation of XAVC HS files from the Sony A7SIII camera sometimes produces an invalid file
jean.vezina at gmail.com
Sat Jun 19 17:04:57 EEST 2021
I am resending the message as it had not shown yet in the archive list for June. The Wetransfer link expires in 2 days.
I am new to this mailing list so sorry if I did not everything correctly. I have nevertheless prepared a complete
test case to reproduce the problem.
I have found a problem when concatenating video files from the Sony A7SIII camera using ffmpeg
First, the following error and warning messages are produced.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557102d886c0] st: 0 edit list: 1 Missing key frame while searching for timestamp: 2002
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557102d886c0] st: 0 edit list 1 Cannot find an index entry before timestamp: 2002.
[concat @ 0x557102d7f280] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : stereo
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557102d8ad80] st: 0 edit list: 1 Missing key frame while searching for timestamp: 2002
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557102d8ad80] st: 0 edit list 1 Cannot find an index entry before timestamp: 2002.
The resulting concatenated video file is sometimes invalid. Only the first video segment plays properly
and the player (or TV) sends an error message saying that the file is corrupted when the second segment starts.
Probably the video segments are not joined properly. This is not constant, however. Sometimes ffmpeg joins all
The command used is:
ffmpeg -f concat -i liste.txt -c copy foret_ouareau.mkv
the file liste.txt contains the following:
The video codec used in these files is H.265 3840X2160 60 fps, 10 bit 4:2:0 , the color space is HLG HDR BT2020.
The audio codec is PCM stereo. This is obviously not standard for the MP4 container but this is
the way the camera produces video files. Possibly the problem is that ffmpeg doesn't recognize the
first key frame as the A7SIII is a new camera and has a way to indicate the first frame that ffmpeg
I have prepared a complete test case to reproduce the problem and I am sharing it on wetransfer.
Sorry for the large files but these are 4K HDR 60fps and the total time of the video is less than 2 minutes.
I have tried increasing the probesize and analyzeduration as suggested in the message, without success.
More information about the ffmpeg-user