Agent skill
FFmpeg Video Editing
Cut, trim, concatenate, and split video files - basic video editing operations
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-video-editing
SKILL.md
FFmpeg Video Editing Skill
Basic video editing operations: cutting, trimming, concatenating, and splitting videos.
When to Use
- Cut segments from video
- Trim video length
- Concatenate multiple videos
- Split video into parts
- Extract specific time ranges
Cutting and Trimming
# Cut from 10s to 30s (using -ss and -to)
ffmpeg -ss 00:00:10 -to 00:00:30 -i input.mp4 -c copy output.mp4
# Cut from 10s for 20 seconds duration
ffmpeg -ss 00:00:10 -t 20 -i input.mp4 -c copy output.mp4
# First 60 seconds
ffmpeg -t 60 -i input.mp4 -c copy output.mp4
# Last 30 seconds (need duration first)
ffmpeg -sseof -30 -i input.mp4 -c copy output.mp4
Precise Cutting
# With re-encoding (more precise)
ffmpeg -ss 00:00:10 -i input.mp4 -t 20 -c:v libx264 -c:a aac output.mp4
# Keyframe-accurate (faster, may be less precise)
ffmpeg -ss 00:00:10 -i input.mp4 -t 20 -c copy output.mp4
Concatenation
Method 1: File List (Recommended)
# Create list.txt file:
# file 'video1.mp4'
# file 'video2.mp4'
# file 'video3.mp4'
ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4
Method 2: Same Codec Files
# If all videos have same codec/format
ffmpeg -i "concat:video1.mp4|video2.mp4|video3.mp4" -c copy output.mp4
Method 3: Re-encode (Different Codecs)
# Re-encode for compatibility
ffmpeg -f concat -safe 0 -i list.txt -c:v libx264 -c:a aac output.mp4
Splitting Video
# Split into 60-second segments
ffmpeg -i input.mp4 -c copy -f segment -segment_time 60 \
-reset_timestamps 1 output_%03d.mp4
# Split at specific timestamps
ffmpeg -i input.mp4 -ss 00:00:00 -t 00:01:00 -c copy part1.mp4
ffmpeg -i input.mp4 -ss 00:01:00 -t 00:01:00 -c copy part2.mp4
Extract Segment with Re-encoding
# When you need to change quality/codec
ffmpeg -ss 00:00:10 -i input.mp4 -t 20 \
-c:v libx264 -crf 23 -c:a aac -b:a 192k output.mp4
Multiple Segments
# Extract multiple segments
ffmpeg -i input.mp4 \
-ss 00:00:10 -t 00:00:05 -c copy segment1.mp4 \
-ss 00:01:00 -t 00:00:10 -c copy segment2.mp4
Notes
- Use
-c copyfor speed (no re-encoding) -ssbefore-iis faster but less precise-ssafter-iis more precise but slower- Concatenation requires same codec/format for
-c copy - Use file list method for best concatenation results
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?