Inspect VOB Metadata and Codecs with FFmpeg
This article provides a practical guide on using FFmpeg and its companion utility, FFprobe, to analyze unknown VOB (Video Object) files. You will learn how to quickly view stream mappings, extract detailed audio and video codec parameters, inspect container-level metadata, and format the output into human-readable or structured data for automated workflows.
Basic Stream Inspection with FFprobe
The most efficient tool included with FFmpeg for reading file
attributes without processing the underlying data is
ffprobe. To view a concise summary of all streams and
container information in a VOB file, run:
ffprobe input.vobThis output displays the container format (mpeg), file
duration, overall bitrate, and a list of all identified streams. Each
stream entry provides essential high-level information:
- Video Streams: Identifies the codec (typically
mpeg2video), profile, pixel format (such asyuv420p), resolution, aspect ratio, and frame rate. - Audio Streams: Shows the audio format (such as
ac3,dts, orpcm_dvd), sample rate (e.g., 48000 Hz), channel configuration (stereo, 5.1), and bitrate. - Subtitle Streams: Identifies DVD sub-picture
streams (
dvd_subtitle).
Quick Inspection Using FFmpeg
If ffprobe is not available in your environment, you can
invoke the core ffmpeg binary without specifying an output
file:
ffmpeg -i input.vobFFmpeg reads the headers, prints the container metadata and stream
details to stderr, and exits with an error stating that at
least one output file must be specified. This error can be ignored, as
the stream information printed before the exit contains the desired
technical specifications.
Extracting Comprehensive Stream Details
VOB files are often multiplexed MPEG-PS (Program Stream) containers that may contain complex parameter configurations. To isolate and display detailed stream-level data without container noise, use:
ffprobe -v error -show_streams input.vobThis command suppresses informational banners and outputs a comprehensive block for each stream, detailing:
codec_nameandcodec_long_nameprofileandlevel(e.g., Main Profile at Main Level)width,height,coded_width, andcoded_heightsample_aspect_ratio(SAR) anddisplay_aspect_ratio(DAR)pix_fmtand color space metadatar_frame_rate(nominal rate) andavg_frame_rate(actual average)- Audio channel counts, channel layout, and bit-depth parameters
Filtering Specific Parameters
To retrieve only specific properties for scripting or automated
processing, use the -select_streams and
-show_entries flags.
To inspect only the primary video stream:
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,width,height,pix_fmt,r_frame_rate -of default=noprint_wrappers=1 input.vobTo inspect all audio streams and their language or channel configurations:
ffprobe -v error -select_streams a -show_entries stream=index,codec_name,channels,channel_layout,bit_rate -of default=noprint_wrappers=1 input.vobExporting Metadata to JSON
For automated parsing, you can format the output directly into structured JSON:
ffprobe -v quiet -print_format json -show_format -show_streams input.vobThis structure groups the data into streams and
format objects, making it straightforward to parse in
Python, Node.js, or shell scripts using tools like jq.
Handling Multiple VOB Segments
VOB files from DVDs are frequently split into 1 GB chunks
(VTS_01_1.VOB, VTS_01_2.VOB, etc.). A single
VOB segment from the middle of a set may not contain all header
information, or it may inherit timestamps from prior segments. To
inspect the full sequence seamlessly, you can concatenate them via the
FFmpeg concat demuxer or pipe them:
cat VTS_01_*.VOB | ffprobe -v error -show_streams -This guarantees that all audio tracks, subtitle channels, and resolution switches across the entire feature are correctly discovered and reported.