{"id":17842103,"url":"https://github.com/yangboz/ffmpeg-cheatsheet","last_synced_at":"2026-01-03T16:49:06.719Z","repository":{"id":139103359,"uuid":"150811500","full_name":"yangboz/ffmpeg-cheatsheet","owner":"yangboz","description":"FFMPEG Cheatsheet.","archived":false,"fork":false,"pushed_at":"2024-09-04T08:05:59.000Z","size":64,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T22:36:02.390Z","etag":null,"topics":["ffmpeg","ffmpeg-command","ffmpeg-libraries","ffmpeg-script","video-processing"],"latest_commit_sha":null,"homepage":"http://smartkit.club","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yangboz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-29T01:33:14.000Z","updated_at":"2025-01-16T17:58:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d690fc88-733a-4453-9555-252740e71606","html_url":"https://github.com/yangboz/ffmpeg-cheatsheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangboz%2Fffmpeg-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangboz%2Fffmpeg-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangboz%2Fffmpeg-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangboz%2Fffmpeg-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yangboz","download_url":"https://codeload.github.com/yangboz/ffmpeg-cheatsheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244041457,"owners_count":20388242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffmpeg","ffmpeg-command","ffmpeg-libraries","ffmpeg-script","video-processing"],"created_at":"2024-10-27T21:09:53.922Z","updated_at":"2026-01-03T16:49:06.712Z","avatar_url":"https://github.com/yangboz.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# FFMPEG Cheatsheet\n\n\u003e For single image processing, check: [ImageMagick Cheatsheet]()\n\n## Table of Contents\n- [Why FFMPEG?](#why-ffmpeg)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Best Practices](#best-practices)\n- [Tools](#tools)\n- [Contributing](#contributing)\n- [References](#references)\n- [Known Issues](#known-issues)\n\n## Why FFMPEG?\n\nFFmpeg is the leading multimedia framework, able to:\n- Decode, encode, transcode\n- Mux, demux, stream\n- Filter and play almost any media format\n\n**Key Features:**\n- Highly portable (Linux, macOS, Windows, BSDs, Solaris)\n- Complete cross-platform solution\n- Supports ancient to cutting-edge formats\n\n\u003e **TL;DR**: Converting video and audio has never been so easy.\n\n## Installation\n\n### Linux\n```bash\n# Debian/Ubuntu\napt-get install ffmpeg\n\n# CentOS/RHEL\nyum install ffmpeg\n```\n\n### macOS\n```bash\nbrew install ffmpeg\n```\n\n### Windows\nDownload from [FFmpeg Windows Builds]()\n\n## Cheatsheet\n\n### Basic Syntax\n```bash\nffmpeg [global_options] {[input_file_options] -i input_url} ... {[output_file_options] output_url}\n```\n\n### Common Operations\n\n#### Get File Info\n```bash\nffmpeg -i input.mp4\n```\n\n#### Format Conversion\n```bash\n# MP4 to AVI\nffmpeg -i input.mp4 output.avi\n\n# GIF to MP4\nffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf \"scale=trunc(iw/2)*2:trunc(ih/2)*2\" video.mp4\n\n# WEBM to MP4\nffmpeg -i movie.webm movie.mp4\n```\n\n### Image Operations\n\n#### Extract Frames\n```bash\n# Extract all frames\nffmpeg -i video.mpg image-%04d.jpg\n\n# Take single snapshot\nffmpeg -i input.mp4 -y -f image2 -ss 00:00:08.010 -t 0.001 -s 352x240 snapshot.jpg\n```\n\n#### Create Video from Images\n```bash\n# From PNGs\nffmpeg -framerate 30 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p out.mp4\n\n# From JPGs with padding\nffmpeg -framerate 10 -pattern_type glob -i '*.jpg' \\\n    -c:v libx264 -vf \"pad=ceil(iw/2)*2:ceil(ih/2)*2\" -pix_fmt yuv420p output.mp4\n```\n\n### Audio Operations\n\n```bash\n# WAV to MP3\nffmpeg -i input.wav -vn -ar 44100 -ac 2 -b:a 192k output.mp3\n\n# Add background music\nffmpeg -i audio.mp3 -i input.mp4 -filter_complex \"[0:a][1:a]amerge,pan=stereo|c0\u003cc0+c2|c1\u003cc1+c3[out]\" \\\n    -map 1:v -map \"[out]\" -c:v copy -shortest output.mp4\n```\n\n## Known Issues\n- libx264 height not divisible by 2\n- [Add more issues here]\n\n## References\n- [FFmpeg Official Documentation](https://ffmpeg.org/ffmpeg.html)\n- [FFmpeg Intermediate Guide](https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence)\n- [ImageMagick Cheatsheet](https://github.com/yangboz/imagemagick-cheatsheet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangboz%2Fffmpeg-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyangboz%2Fffmpeg-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangboz%2Fffmpeg-cheatsheet/lists"}