Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
FFmpeg & FFprobe Cheatsheet
# Don't use FFmpeg for metadata extraction. Use FFprobe.
# Its output is geared toward parsabilty.
# Container and stream information in JSON format:
ffprobe -show_format -print_format json 'Serenity - HD Trailer.mp4'
ffprobe -show_streams -print_format json 'Serenity - HD Trailer.mp4'
# Human-readable values:
ffprobe -show_format -pretty -print_format json 'Serenity - HD Trailer.mp4'
# Trim video to first 30 seconds, without transcoding.
ffmpeg -i source.mkv -c:v copy -c:a copy -ss 00:00:00 -t 00:02:00 dest.mkv
# Create an MP4 with an "MPEG-4 Part 2" video stream with profile,
# "Advanced Simple@L5", and BVOP active. BVOP was causing transcode
# failures in Carbon Coder 3.22: "Failed To Transcode: QT Reader :
# This file is a invalid movie file."
ffmpeg -i source.mp4 -c:v mpeg4 -profile:v 15 -level 5 -bf 2 dest.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment