How to check a video's codec with ffprobe or an API
Check a video's codec by probing it: ffprobe prints each stream's codec_name. For a Sume-hosted file, a free probe returns video_codec and pix_fmt.

To check a video's codec, probe the file with ffprobe, which comes with FFmpeg: ffprobe -v error -show_entries stream=codec_type,codec_name -of default=noprint_wrappers=1 input.mp4 prints each stream's type and codec name, such as h264 for H.264 video and aac for AAC audio. For a file already on Sume, a free POST /v1/video-inspect with frames: false returns the same facts as video_codec and audio_codec.
The ffprobe facts come from its documentation, the codec and pixel format names from FFmpeg's formats, codecs, filters, and ffmpeg pages, and Sume's from the Video inspect docs and the Sume API reference, read on 2026-09-28. Anything described as current behavior is read from Sume's code.
How do I check the codec with ffprobe?
ffprobe gathers information from media streams and prints it in human- and machine-readable form, and its docs name this use: checking the container format and the format and type of each stream in it. Three options shape the answer:
-show_entriessets the fields to show, assection=field,field.codec_typesays whether a stream is video or audio, andcodec_namenames its codec. The fields come out in ffprobe's usual order, not the order you list them.-show_entries stream, with no=and no field list, shows every entry of each stream.-select_streamslimits the output to the streams you name, such asv:0for the first video stream.-ofsets the output format. With the default writer,noprint_wrappers=1drops the section header and footer, andnokey=1prints values without their keys.
# Every stream's type, codec, and pixel format
ffprobe -v error -show_entries stream=codec_type,codec_name,pix_fmt \
-of default=noprint_wrappers=1 input.mp4
# Only the first video stream's codec name
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name \
-of default=noprint_wrappers=1:nokey=1 input.mp4What do the codec and pixel format names mean?
The names are FFmpeg's short names. Here are a few, as FFmpeg's own docs describe them; what codec MP4 uses explains why a file's extension says nothing about them, and 8-bit vs 10-bit pixel formats covers the others:
| Name | Field | What it means |
|---|---|---|
h264 | codec_name | H.264: ITU-T H.264 / MPEG-4 Part 10 AVC video |
hevc | codec_name | H.265: ITU-T H.265 / MPEG-H Part 2 HEVC video |
av1 | codec_name | AV1: AOMedia Video 1 video |
aac | codec_name | AAC audio |
yuv420p | pix_fmt | YUV 4:2:0 planar, 8 bits |
How do I check the codec of a file on Sume?
Run the free probe: POST /v1/video-inspect with frames: false, which is probe only, with no stills. It reads only your workspace's media.sume.com files, such as an earlier Sume job's output, and Get a video's duration, resolution, and fps shows the full request. In current code, it refuses a source file over 300 MiB with source_too_large; check a bigger file with ffprobe. The codec answer is in these probe fields:
video_codecandaudio_codec: in current code, the ffprobecodec_nameof the clip's video stream and audio stream.pix_fmtandcolor_transfer: in current code, the video stream's pixel format and color transfer, from the same ffprobe call.container: in current code, ffprobe's format name for the file.hdr:truefor PQ and HLG transfers, the sources video filter refuses withhdr_source_unsupported.
What if the codec is the problem?
Re-encode the video stream: How to convert HEVC to H.264 walks through the FFmpeg command and the Sume trim that do it, and MP4 plays audio but no video reads the probe for a file that plays sound with no picture.
Sources
Related posts
More in Media tools
- How to cut a video in half (or into equal parts)
To cut a video in half, split it at its length ÷ 2 into two files. For N equal parts, part i starts at i × length ÷ N. Steps, precision, and limits.
- How to fade out audio at the end of a track
To fade out audio, lower the volume to silence over the last few seconds. Use FFmpeg's afade filter, or a Sume render for a track Sume made.
- How to find the aspect ratio of a video (and calculate it)
Find a video's aspect ratio by dividing its width and height by their greatest common divisor: 1920×1080 is 16:9. Plus the traps that mislead.
- How to shorten a video: trim, cut, or remove pauses
Shorten a video by cutting time: trim the start or end, remove sections from the middle, or cut the pauses. Which to pick, how, and the limits.
Written by Sume