# How can I check a video file has an alpha channel?

I have a bunch of video files (FLV and MOV), some with alpha channels and some without.

How can I efficiently know the ones that have an alpha channel?

Exiftool should report all clips with alpha channels as 32 bit:

``````exiftool -bitdepth /path/to/your/movie.mov
``````

You can of course specify wildcards when calling exiftool:

``````exiftool -bitdepth *.mov
``````

Media Inspector may do this as well if you prefer a GUI app.

• What happens if a clip is 32 bit, but doesn't have an alpha channel? (Or is this impossible? I don't know much about video...) Commented Aug 22, 2011 at 23:26
• A video cannot have 32bit depth without having an alpha channel. The depth of an image is the sum of the depth of its channels. Depths are always integer powers of 2. If a video has three channels there is no solution for "3 * 2^n = 32" with an integer n => there is no image (and therefore no video) with three channels and 32bit total depth. Having an alpha channel ("4 * 2^n = 32") n has one solution (n = 3, that's 8 bit per channel) Commented Nov 21, 2011 at 9:11

Another way is to use `ffprobe`. Here is an example adapted from this answer, to show it for every .mov file in the current directory:

``````
for f in *.mov; do
pixfmt=\$(ffprobe -v 0 -select_streams v:0 -show_entries stream=pix_fmt -of compact=p=0:nk=1 "\$f")
alpha=\$(ffprobe -v 0 -show_entries pixel_format=name:flags=alpha -of compact=p=0  | grep "\$pixfmt|" | grep -oP "(?<=alpha=)\d")
if (( alpha )); then
echo "With alpha: \$f"
else
echo "no : \$f"
fi
done
``````

See the original answer for details on how it works.