{"id":13905496,"url":"https://github.com/tamara-schmitz/ffmpeg-docker-container","last_synced_at":"2025-07-18T03:30:29.390Z","repository":{"id":50747019,"uuid":"300065104","full_name":"tamara-schmitz/ffmpeg-docker-container","owner":"tamara-schmitz","description":"A simple container image based on openSUSE Tumbleweed with the Packman repository.","archived":false,"fork":false,"pushed_at":"2024-06-12T09:37:58.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-07T23:43:25.557Z","etag":null,"topics":["container","container-image","docker","docker-image","dockerfile","ffmpeg","muxing","podman","remuxing","video","video-conversion","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamara-schmitz.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":"2020-09-30T21:16:43.000Z","updated_at":"2024-06-12T09:38:01.000Z","dependencies_parsed_at":"2023-01-22T23:00:34.108Z","dependency_job_id":"2e97eace-91de-4d98-8cb7-4d62655ce342","html_url":"https://github.com/tamara-schmitz/ffmpeg-docker-container","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/tamara-schmitz%2Fffmpeg-docker-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamara-schmitz%2Fffmpeg-docker-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamara-schmitz%2Fffmpeg-docker-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamara-schmitz%2Fffmpeg-docker-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamara-schmitz","download_url":"https://codeload.github.com/tamara-schmitz/ffmpeg-docker-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226336550,"owners_count":17608859,"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":["container","container-image","docker","docker-image","dockerfile","ffmpeg","muxing","podman","remuxing","video","video-conversion","video-processing"],"created_at":"2024-08-06T23:01:17.106Z","updated_at":"2025-07-18T03:30:29.364Z","avatar_url":"https://github.com/tamara-schmitz.png","language":"Dockerfile","funding_links":[],"categories":["HarmonyOS","Encoding \u0026 Codecs"],"sub_categories":["Windows Manager","Multi-CDN Management"],"readme":"# ffmpeg-docker-container\nA personal FFmpeg container using a recent FFmpeg and library version based off the work of openSUSE Tumbleweed and packman projects. Tested on Linux, likely runs on Windows.\n\nRequires either *podman* or *docker-ce*. Built in the GitHub container\nregistry.\n\nFor Docker newbs on Windows, [see the manual for Docker For Windows](https://docs.docker.com/docker-for-windows/)\n\nDue to how these containers work you need to expose your directory with your workfiles to the container as a volume using `-v`. Read the *How-to use* section for more information\n\n## What it is\n\nFFmpeg is a big flexible suite of filters, codecs and muxers allowing you to create complex filter chain and convert media into various formats. It is aimed at advanced users and developers and does not come with a GUI. For beginners I recommend Handbrake instead. However it offers huge flexiblity and power compared to other software. Check out the [official FFmpeg documentation](https://ffmpeg.org/documentation.html) to learn more.\n\nEncoder libraries receive constant improvements in efficiency, ffmpeg gains more features and codecs. However some distributions keep using old versions from years ago. Hence this container can help you to benefit from the latest releases.\n\nThere are two versions: *free* and *nonfree*. The latter includes codecs that\nmay be protected by software patents in certain regions.\n\n### free version vs non-free\n\nBy default the container as it is listed here refers to the non-free version. The *free* version does not contain codecs\nthat may be protected by software patents in certain regions.\nOn GitHub this version is hosted with the appendix *-free* and can be used like so:\n\n`podman run --pull=newer --rm ghcr.io/tamara-schmitz/ffmpeg-docker-container-free`\n\nThe image is also built on\n[Open Build Service](https://build.opensuse.org/package/show/home:tschmitz:branches:openSUSE:Templates:Images:Tumbleweed/ffmpeg-docker-container)\nand can be used using:\n\n`podman run --pull=newer --rm registry.opensuse.org/home/tschmitz/branches/opensuse/templates/images/tumbleweed/containers/opensuse/ffmpeg`\n\n\n## Other resources\n\nIf you would like to batch convert multiple files, checkout my ffmpeg batch converter script here (not online yet).\n\n### How-to use\n\nThe shown commands work with either `podman` and `docker` as a prefix. If you copy one of the examples, substitute either for whatever you are using. Or even better alias them with `alias podman=docker`.\n\nFeel free to take my examples and adjust them to your needs. Add a video filter with a `-vf` line or crop your input with `-ss 00:16:12.25 -t 2.6 -i \"$INPUT`. For the complete rabbid hole again [check out the very complete FFmpeg documentation](https://ffmpeg.org/ffmpeg.html).\n\nIt is best to put your long ffmpeg chains into a text file. They can become really long!\n\n**Beware!** Since containers have their own filesystem you have to pass through\nyour folder containing your input and output files using `-v\n/host-path:/path-in-container:z`. In the examples we pass\nthrough your current working directory. All files you would like to use hence\nhave to be in or in a subdirectory of the directory where you execute the\ncommands.\n\nSo if I'm in the folder `/home/me/Videos` and I set the file input.mp4 as my input, my output cannot be in `/home/me/Documents` since the container can only see what is inside `/home/me/Videos`.\n\n#### Test the image and your runtime:\n\nLet's see if we can even run a container. Use the following to test your setup:\n\n`docker run --pull=newer --rm ghcr.io/tamara-schmitz/ffmpeg-docker-container`\n\nor\n\n`podman run --pull=newer --rm ghcr.io/tamara-schmitz/ffmpeg-docker-container`\n\nIf everything is in order you should see a long print out about the ffmpeg version. That's good! Now we can start using it.\n\n#### Usage examples\n\nIf you are using podman instead of docker, just replace `docker` with `podman`\nin the commands listed below.\n\nIf you are worried about system responsiveness, you can prepend `chrt -b 0` to\nyour run commands, too.\n\n##### Simple FLAC to MP3 conversion\n\n`podman run --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container -i /temp/input.flac -c:a libmp3lame -b:a 320k /temp/output.mp3`\n\n##### Convert 2K gameplay footage to VP9 video in an MKV\n\n```bash\nexport INPUT=inputfile.mp4\nexport OUTPUT=outputfile.mkv\ntime sh -c 'podman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container -y \\\n-i \"/temp/$INPUT\" \\\n-c:v libvpx-vp9 -b:v 12M -deadline good -cpu-used 2 -threads 0 -g 500 -tile-columns 3 -row-mt 1 -frame-parallel 0 \\\n-pass 1 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-c:a libopus -b:a 256k -ac 2 -vbr constrained \\\n-f webm /dev/null \u0026\u0026 \\\npodman run --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-i \"/temp/$INPUT\" \\\n-c:v libvpx-vp9 -b:v 12M -deadline good -cpu-used 2 -threads 0 -g 500 -tile-columns 3 -row-mt 1 -frame-parallel 0 \\\n-pass 2 -auto-alt-ref 2 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-c:a copy \\\n\"/temp/$OUTPUT\"'\n```\n\n##### Convert a video Fedi (not Mastodon) ready WebM and AV1\n\n```bash\nexport INPUT=input.mp4\nexport OUTPUT=output.webm\npodman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-i \"/temp/$INPUT\" \\\n-vf scale=-1:1080:flags=bicubic \\\n-c:v libsvtav1 -crf 50 -preset 3 -g 300 -svtav1-params tune=0:enable-variance-boost=1 \\\n-c:a libopus -b:a 192k -ac 2 -vbr constrained \\\n\"/temp/$OUTPUT\"\n```\n\n##### Convert a video to a Discord ready WebM (is under 8MB if video is \u003c35s)\n\n```bash\nexport INPUT=inputfile.mp4\nexport OUTPUT=outputfile.webm\ntime sh -c 'podman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container -y \\\n-i \"/temp/$INPUT\" \\\n-vf scale=-1:720:flags=bicubic \\\n-c:v libvpx-vp9 -q:v 32 -b:v 1.5M -deadline good -cpu-used 2 -threads 0 -g 400 -tile-columns 2 -row-mt 1 -frame-parallel 0 \\\n-pass 1 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-af loudnorm=i=-15 \\\n-c:a libopus -b:a 160k -ac 2 -vbr constrained \\\n-f webm /dev/null \u0026\u0026 \\\npodman run --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-i \"/temp/$INPUT\" \\\n-vf scale=-1:720:flags=bicubic \\\n-c:v libvpx-vp9 -q:v 32 -b:v 1.5M -deadline good -cpu-used 2 -threads 0 -g 400 -tile-columns 2 -row-mt 1 -frame-parallel 0 \\\n-pass 2 -auto-alt-ref 2 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-af loudnorm=i=-15 \\\n-c:a libopus -b:a 160k -ac 2 -vbr constrained \\\n\"/temp/$OUTPUT\"'\n```\n\n##### Convert a video to a Mastodon ready MP4 (aim for under 14MB if video is \u003c60s)\n\n```bash\nexport INPUT=inputfile.mp4\nexport OUTPUT=outputfile.mp4\ntime sh -c 'podman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container -y \\\n-i \"/temp/$INPUT\" \\\n-vf scale=-1:720:flags=bicubic,format=yuv420p \\\n-c:v libx264 -crf 25 -b:v 1.75M -preset slow -aq-mode 3 \\\n-profile:v high -level:v 4.2 -movflags +faststart \\\n-pass 1 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-af loudnorm=i=-15 \\\n-c:a libfdk_aac -ac 2 -vbr 5 \\\n-f null /dev/null \u0026\u0026 \\\npodman run --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-i \"/temp/$INPUT\" \\\n-vf scale=-1:720:flags=bicubic,format=yuv420p \\\n-c:v libx264 -crf 25 -b:v 1.75M -preset slow -aq-mode 3 \\\n-profile:v high -level:v 4.2 -movflags +faststart \\\n-pass 2 -passlogfile \"/temp/$(basename \"$OUTPUT\")\" \\\n-af loudnorm=i=-15 \\\n-c:a libfdk_aac -ac 2 -vbr 5 \\\n\"/temp/$OUTPUT\"'\n```\n\n##### Convert a movie to an H.265 video with Opus audio\n\n```bash\nexport INPUT=inputfile.mkv\nexport OUTPUT=outputfile.mkv\ntime sh -c 'nice -n19 podman run --pull=newer --rm -v \"$PWD:/temp\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-y -i \"/temp/$INPUT\" \\\n-map 0 -c copy \\\n-c:v libx265 -crf 23 -preset veryslow -profile:v main -x265-params level-idc=41:aq-mode=3:tskip=1:nr-intra=20:keyint=300:open-gop=1:vbv-bufsize=6000:vbv-maxrate=8000 \\\n-c:a libopus -b:a 224k -sample_fmt s16 -dither_method triangular_hp -vbr constrained \\\n\"/temp/$OUTPUT\"'\n```\n\n##### Convert a video to a GIF\n\n```bash\nexport INPUT=inputfile.mp4\nexport OUTPUT=outputfile.gif\npodman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-ss 00:00:02.25 -t 2.6 -i \"/temp/$INPUT\" \\\n-filter_complex \"[0:v] fps=15,scale=480:-1:flags=bicubic,split [a][b];[a] palettegen [p];[b][p] paletteuse\" \\\n\"$OUTPUT\"\n```\n\n##### Convert an image sequence into a video and stabilise it\n\nYou may want to reduce the zoom.\n\n```\nffmpeg -framerate 5 -start_number 80 -i P1000%03d.JPG -t 15.2 -vf vidstabdetect -f null -\nffmpeg -framerate 5 -start_number 80 -i P1080%03d.JPG -t 15.2 -vf vidstabtransform=zoom=10,scale=-1:1724:flags=bicubic,format=yuv420p -c:v libx264 -preset slow -crf 25 meow.mp4\n```\n\n##### Export a single still PNG from a video\n\n```bash\nexport INPUT=video.mkv\nexport OUTPUT=out.png\npodman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-ss 00:01:30 -i \"/temp/$INPUT\" \\\n-vframes 1 \"/temp/$OUTPUT\n```\n\n##### Play a video through the container, then pipe it to native ffplay. (Requires a local installation of ffplay to work)\n\n```bash\nexport INPUT=video.mkv\npodman run --pull=newer --rm -v \"$PWD:/temp:z\" ghcr.io/tamara-schmitz/ffmpeg-docker-container \\\n-i \"/temp/$INPUT\" \\\n-c:v rawvideo -c:a pcm_s16le -f matroska \\\n- | ffplay -\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamara-schmitz%2Fffmpeg-docker-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamara-schmitz%2Fffmpeg-docker-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamara-schmitz%2Fffmpeg-docker-container/lists"}