Find "Bit depth" from mediaInfo but with ffprobe?

32 views Asked by At

I'm trying to figure out a way to get the video pixel bit depth as shown by MediaInfo(as "Bit depth") but using ffprobe and the information doesn't seem to be available directly and I don't know of a reliable way to figure it out.

I have videos encoded with x264 and x265 in 10 bit so I need to have that info.

From what I found out, "bits_per_raw_sample" should have the info but more often than not, I get "N/A", especially for the files that matter and MediaInfo has the information for those files so that's no good.

"pix_fmt" should reliably have the info but it needs to be deduced and short of finding a list(which I failed to find) of all of them with the bit depth for each, I'm not sure how to achieve this.

I can do a flaky solution of checking for 10le, 12le or 16le at the end which probably would work for most of my files, but I'm not sure how reliable that would be and I'd prefer a solution that works better than that since it doesn't tell me about 8bit or lower, it would just default to 8 since that's most likely to be the case.

Anyone knows how that can be achieved?

0

There are 0 answers