Agent skill
FFmpeg Media Info
Analyze media file properties - duration, resolution, bitrate, codecs, and stream information
Install this agent skill to your Project
npx add-skill https://github.com/benchflow-ai/skillsbench/tree/main/tasks-no-skills/multilingual-video-dubbing/environment/skills/ffmpeg-media-info
SKILL.md
FFmpeg Media Info Skill
Extract and analyze media file metadata using ffprobe and ffmpeg.
When to Use
- Get video/audio file properties
- Check codec information
- Verify resolution and bitrate
- Analyze stream details
- Debug media file issues
Basic Info Commands
# Show all file info
ffmpeg -i input.mp4
# JSON format (detailed)
ffprobe -v quiet -print_format json -show_format -show_streams input.mp4
# Simple format
ffprobe -v quiet -print_format json -show_format input.mp4
Duration
# Get duration in seconds
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 input.mp4
# Duration with timestamp format
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 -sexagesimal input.mp4
Resolution
# Get video resolution
ffprobe -v error -select_streams v:0 \
-show_entries stream=width,height \
-of csv=s=x:p=0 input.mp4
# Get resolution as JSON
ffprobe -v error -select_streams v:0 \
-show_entries stream=width,height \
-of json input.mp4
Bitrate
# Get overall bitrate
ffprobe -v error -show_entries format=bit_rate \
-of default=noprint_wrappers=1:nokey=1 input.mp4
# Get video bitrate
ffprobe -v error -select_streams v:0 \
-show_entries stream=bit_rate \
-of default=noprint_wrappers=1:nokey=1 input.mp4
Codec Information
# Video codec
ffprobe -v error -select_streams v:0 \
-show_entries stream=codec_name,codec_long_name \
-of default=noprint_wrappers=1 input.mp4
# Audio codec
ffprobe -v error -select_streams a:0 \
-show_entries stream=codec_name,codec_long_name \
-of default=noprint_wrappers=1 input.mp4
Sample Rate and Channels
# Audio sample rate
ffprobe -v error -select_streams a:0 \
-show_entries stream=sample_rate \
-of default=noprint_wrappers=1:nokey=1 input.mp4
# Audio channels
ffprobe -v error -select_streams a:0 \
-show_entries stream=channels \
-of default=noprint_wrappers=1:nokey=1 input.mp4
Stream Count
# Count video streams
ffprobe -v error -select_streams v -show_entries stream=index \
-of csv=p=0 input.mp4 | wc -l
# Count audio streams
ffprobe -v error -select_streams a -show_entries stream=index \
-of csv=p=0 input.mp4 | wc -l
Frame Rate
# Get frame rate
ffprobe -v error -select_streams v:0 \
-show_entries stream=r_frame_rate \
-of default=noprint_wrappers=1:nokey=1 input.mp4
Notes
- Use
-v errorto suppress warnings -of jsonfor structured output-select_streamsto target specific streams (v:0 for first video, a:0 for first audio)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
csv-processing
Use this skill when reading sensor data from CSV files, writing simulation results to CSV, processing time-series data with pandas, or handling missing values in datasets.
pid-controller
Use this skill when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring proportional-integral-derivative control.
yaml-config
Use this skill when reading or writing YAML configuration files, loading vehicle parameters, or handling config file parsing with proper error handling.
simulation-metrics
Use this skill when calculating control system performance metrics such as rise time, overshoot percentage, steady-state error, or settling time for evaluating simulation results.
vehicle-dynamics
Use this skill when simulating vehicle motion, calculating safe following distances, time-to-collision, speed/position updates, or implementing vehicle state machines for cruise control modes.
web-interface-guidelines
Vercel's comprehensive UI guidelines for building accessible, performant web interfaces. Use this skill when reviewing or building UI components for compliance with best practices around accessibility, performance, animations, and visual stability.
Didn't find tool you were looking for?