Using ffmpeg or ffprobe to get the pixel bit depth of a video

Viewed 4908

Is it possible to use ffprobe or ffmpeg to figure out the bit depth of a video file? I specifically want to know how many bits per channel (bpc) my video is. 8 is typical, but some fancier codecs can use higher bit depths, and I'm not sure how to obtain this information using ffprobe, or if it's even possible. Specifically, I have videos encoded using the AVC-Intra Class 100 1080p 59.94 fps codec, but I'm not sure if ffprobe can obtain the bit depth from that kind of file or not. If so, how would you do this?

1 Answers

you can use pix_fmt in many cases for more info, but for straight bitdepth, use bits_per_raw_sample:

ffprobe -loglevel panic \
    -show_entries stream=bits_per_raw_sample \
    -select_streams v \
    myvideo.mp4

( -loglevel panic to turn off the header stderr stuff).

Related