0

I'm a software tester and I need to test a certain requirement for a vehicle camera that I'm not sure on how to test. As in the title it's to verify that each frame is encoded with a single slice. This is done for more efficient encoding.

AVTP/h264, configured with high profile, to have only I-frames, progressively encoded.

I'm not that knowledgeable with imaging and video streaming, so any help would be appreciated.

1 Answer 1

0

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.

1
  • Thank you. This is helpful and does workout.
    – Bivas
    Apr 13 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.