ffmpeg – How do I verify that the H264 video stream is encoded with a single slice per frame?
You can use ffmpeg (and grep) to do this.
Run
ffmpeg -i H264file -c copy -bsf:v trace_headers -f null - 2>&1 | grep first_mb_in_slice
This should print out lines of the form
[trace_headers @ 000002087b24c3c0] 8 first_mb_in_slice 1 = 0
[trace_headers @ 000002087b24c3c0] 8 first_mb_in_slice 00000000101000001 = 320
[trace_headers @ 000002087b24c3c0] 8 first_mb_in_slice 0000000001010000001 = 640
If each frame is a single slice then ALL lines will have value 0 (1 = 0
) for first_mb_in_slice
. A non-zero value indicates sliced encoding.
Read more here: Source link