Forrest logo
tool overview
On this page you find all important commands for the CLI tool ffmpeg. If the command you are looking for is missing please ask our AI.

ffmpeg

FFmpeg is a widely-used and highly versatile command line tool for handling multimedia files and streams. It is a free and open-source software that supports a vast number of audio, video, and image formats, making it a powerful tool for media manipulation.

Here are some key features and capabilities of FFmpeg:

  1. Video and audio transcoding: FFmpeg allows you to convert multimedia files from one format to another. You can change codecs, bitrates, resolutions, and other parameters during the transcoding process.

  2. Multimedia manipulation: It provides various tools to process and manipulate media files, such as cutting, merging, cropping, scaling, rotating, and applying filters and effects.

  3. Streaming: FFmpeg can handle streaming protocols and assist in creating live streams or broadcasting media over networks.

  4. Recording and capturing: It enables capturing audio and video from various sources, including webcams and desktop screens. It can also record streams and save them to files.

  5. Multimedia analysis: FFmpeg offers tools to extract metadata, retrieve detailed information about media files, and generate visualizations like waveform or spectrogram.

  6. Subtitles and captions: It supports various subtitle formats and allows embedding, extracting, or modifying subtitles in multimedia files.

  7. Cross-platform: FFmpeg is available for Linux, macOS, and Windows, making it widely accessible.

  8. Extensibility: It can be extended with additional libraries and codecs to support more formats and features.

FFmpeg is a command line tool, so it is typically used by executing commands in a terminal or command prompt. The commands involve specifying input and output files and providing various options to control the desired operations. Its extensive functionality and wide format support have made it a popular choice in the multimedia field by both professionals and enthusiasts.

List of commands for ffmpeg:

  • ffmpeg:tldr:12821 ffmpeg: Extract the sound from a video and save it as MP3.
    $ ffmpeg -i ${video-mp4} -vn ${sound}.mp3
    try on your machine
    explain this command
  • ffmpeg:tldr:26962 ffmpeg: Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23.
    $ ffmpeg -i ${input_video}.avi -codec:a aac -b:a 128k -codec:v libx264 -crf 23 ${output_video}.mp4
    try on your machine
    explain this command
  • ffmpeg:tldr:2bc16 ffmpeg: Combine numbered images (`frame_1.jpg`, `frame_2.jpg`, etc) into a video or GIF.
    $ ffmpeg -i ${frame_%d-jpg} -f image2 ${select}
    try on your machine
    explain this command
  • ffmpeg:tldr:95009 ffmpeg: Convert MP4 video to VP9 codec. For the best quality, use a CRF value (recommended range 15-35) and -b:v MUST be 0.
    $ ffmpeg -i ${input_video}.mp4 -codec:v libvpx-vp9 -crf ${30} -b:v 0 -codec:a libopus -vbr on -threads ${number_of_threads} ${output_video}.webm
    try on your machine
    explain this command
  • ffmpeg:tldr:a34ed ffmpeg: Save a video as GIF, scaling the height to 1000px and setting framerate to 15.
    $ ffmpeg -i ${video-mp4} -vf 'scale=-1:${1000}' -r ${15} ${output-gif}
    try on your machine
    explain this command
  • ffmpeg:tldr:a54be ffmpeg: Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end).
    $ ffmpeg -ss ${mm:ss} -to ${mm2:ss2} -i ${video-mp4} -codec copy ${output-mp4}
    try on your machine
    explain this command
  • ffmpeg:tldr:d3439 ffmpeg: Quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image.
    $ ffmpeg -ss ${mm:ss} -i ${video-mp4} -frames 1 -s ${128x128} -f image2 ${image-png}
    try on your machine
    explain this command
  • ffmpeg:tldr:fd093 ffmpeg: Remux MKV video to MP4 without re-encoding audio or video streams.
    $ ffmpeg -i ${input_video}.mkv -codec copy ${output_video}.mp4
    try on your machine
    explain this command
tool overview