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?
Asked
Active
Viewed 7,026 times
1 Answers
8
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).

L. Scott Johnson
- 4,213
- 2
- 17
- 28
-
When I attempt to run this: `ffprobe -loglevel panic -show_entries stream=bits_per_raw_sample testinput.mp4` I only get the following as output: ` [STREAM] [/STREAM] ` I'm still not sure why it's not telling me the bit depth. – joejoejoejoe4 Jul 02 '19 at 23:36
-
Try just `ffprobe -show_streams -show_format testinput.mp4` and see if the bit depth is buried in the output somewhere. If it is, see what it's called. – L. Scott Johnson Jul 02 '19 at 23:39
-
It seems that it doesn't appear anywhere in the output. https://pastebin.com/raw/Qj87JSJ0 – joejoejoejoe4 Jul 02 '19 at 23:51
-
Hmm. It may be that your 2015 build was before they added that. Mine is 2016 (one of the zeranoe builds: version N-78385-g855d9d2). It shows bit depth after bit rate and just before nb_frames. – L. Scott Johnson Jul 03 '19 at 00:02
-
The commit that added it was in 2014. It might have taken a while to get to the stable release, though: https://github.com/eVRydayVR/ffmpeg-unwarpvr/commit/42b4da75b73d79e7323512bcfb7fe32ab0b24178 – L. Scott Johnson Jul 03 '19 at 00:05