FFmpeg

ffmpeg.org
FFmpeg

A complete, cross-platform solution to record, convert, and stream audio and video. It's the industry standard multimedia framework, handling a vast range of formats. As a command-line tool, it guarantees that all processing is done locally on your machine.

Open Source

FFmpeg Source Code

Author

FFmpeg

Description

Mirror of https://git.ffmpeg.org/ffmpeg.git

#audio#c#ffmpeg#fft#hevc#hls#matroska#mp4#mpeg#multimedia#rtmp#rtsp#streaming#video#webm

Homepage

https://ffmpeg.org/

License

NOASSERTION

Created

14 Apr 11

Last Updated

12 Jul 26

Latest version

v0.6.1

Primary Language

C

Size

487,853 KB

Stars

61,983

Forks

14,010

Watchers

61,983

Language Usage

Language Usage

Star History

Star History

Top Contributors

Recent Commits

  • Lynne (05 Jul 26)

    apv_encode_vulkan: read the gathered bitstream back with the copy engine Same as FFv1.

  • Lynne (05 Jul 26)

    ffv1enc_vulkan: gather into VRAM and then copy, drop the host-only path The gather shader wrote the finished bitstream directly into a host visible buffer with BDA stores. Keep the gather output in VRAM and append a single copy-engine transfer to the same submission to move it into the host-visible readback buffer. DMA readback into cached system memory is the one path every driver optimizes. Still no CPU involvement. The host path was awfully slow and only really used because of FFv1's insane overallocation.

  • Lynne (05 Jul 26)

    vulkan/seg_gather: avoid scratch spills and serial prefix summing Compilers lowered the funnel indexer to scratch (spilling the data), during the tight copy loop into something that spills every load. Just use a case to select from the 2 source vectors. Summing the offsets at the end took far longer than expected and blocked all invocs. Just use a trivial subgroup add + atomic add to finish the sum quickly and with less contention.

  • Lynne (05 Jul 26)

    ffv1enc_vulkan: fix VRAM size detection The reduction accumulated into the zero-initialized context field instead of the local variable, so the detected VRAM was whatever device-local heap the implementation listed last, usually the 256MiB BAR heap rather than the multi-GiB VRAM heap. This made the encoder take the host-memory fallback (or fail the allocation outright at 12K and above) on hardware with plenty of VRAM.

  • Lynne (12 Jul 26)

    vulkan: fix u32vec2buf/u32vec4buf alignment values We were optimistic, looking through the GLSL specs, it was illegal to use an alignment value which satisfied scalar alignment when doing vector loads. At best, the GPU compiler split it up into multiple parts.

  • Jun Zhao (27 Jun 26)

    avformat/network: make ff_network_init() follow standard AVERROR convention ff_network_init() used to return 0 on failure and 1 on success, requiring callers to check !ff_network_init(). Change it to return a negative AVERROR(EIO) on failure and 0 on success, matching the standard FFmpeg convention where negative values indicate errors. Update all callers (avio.c, rtsp.c, rtspdec.c, sapdec.c, sapenc.c, utils.c) to use the standard (ret = ff_network_init()) < 0 pattern. Signed-off-by: Jun Zhao <[email protected]>

  • Jun Zhao (27 Jun 26)

    avformat/tls: remove orphan ff_openssl_init/ff_openssl_deinit declarations These declarations were left behind by f0913b3f16 which removed support for OpenSSL < 1.1.0. Since OpenSSL >= 1.1.0 auto-initializes, neither function has an implementation or caller. Signed-off-by: Jun Zhao <[email protected]>

  • Jun Zhao (11 Jul 26)

    avformat/utils: fix ff_mkdir_p() swallowing intermediate mkdir errors When creating nested directories (e.g. /a/b/c), a genuine mkdir() failure for an intermediate component was overwritten by later attempts, making the original failure harder to diagnose. Stop immediately on intermediate errors other than EEXIST, preserving errno for the caller. Existing path components remain non-fatal, as required by mkdir -p semantics. Add a regression test for creating a child below an existing parent directory. Signed-off-by: Jun Zhao <[email protected]>

  • Jun Zhao (27 Jun 26)

    avformat/internal: fix typo allow_unkown -> allow_unknown The declaration of ff_parse_opts_from_query_string() misspelled "unknown" as "unkown". The implementation in utils.c already uses the correct spelling. Signed-off-by: Jun Zhao <[email protected]>

  • James Almer (12 Jun 26)

    avcodec/dca_xll: export downmix matrix coefficients Only for primary channel sets if they embeed coefficients for now. $ ./ffmpeg -downmix stereo -i $fate-suite/dts/dcadec-suite/xll_51_24_48_768.dtshd -y native.wav Before: $ ./ffmpeg -i $fate-suite/dts/dcadec-suite/xll_51_24_48_768.dtshd -af aresample,aformat=channel_layouts=stereo -y swr.wav [...] [Parsed_aresample_0] [SWR] Using fltp internally between filters [Parsed_aresample_0] [SWR] Matrix coefficients: [Parsed_aresample_0] [SWR] FL: FL:0.414214 FR:0.000000 FC:0.292893 LFE:0.000000 SL:0.292893 SR:0.000000 [Parsed_aresample_0] [SWR] FR: FL:0.000000 FR:0.414214 FC:0.292893 LFE:0.000000 SL:0.000000 SR:0.292893 [Parsed_aresample_0] ch:6 chl:5.1(side) fmt:s32p r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz [...] $ tests/tiny_psnr.exe native.wav swr.wav stddev:21178.05 PSNR: 9.81 MAXDIFF:49613 bytes: 8192/ 8192 After: $ ./ffmpeg -i $fate-suite/dts/dcadec-suite/xll_51_24_48_768.dtshd -af aresample,aformat=channel_layouts=stereo -y swr.wav [...] [Parsed_aresample_0] [SWR] Using fltp internally between filters [Parsed_aresample_0] [SWR] Custom matrix coefficients: [Parsed_aresample_0] [SWR] FL: FL:-0.100006 FR:0.000000 FC:0.000000 LFE:0.000000 SL:-0.707092 SR:0.000000 [Parsed_aresample_0] [SWR] FR: FL:0.000000 FR:-0.100006 FC:0.000000 LFE:0.000000 SL:0.000000 SR:-0.707092 [Parsed_aresample_0] ch:6 chl:5.1(side) fmt:s32p r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz [...] $ tests/tiny_psnr.exe native.wav swr.wav stddev: 0.71 PSNR: 99.22 MAXDIFF: 1 bytes: 8192/ 8192 Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    avcodec/dca_core: export downmix matrix coefficients $ ./ffmpeg -downmix stereo -i $fate-suite/dts/dcadec-suite/core_51_24_48_768_1.dtshd -y native.wav Before: $ ./ffmpeg -i $fate-suite/dts/dcadec-suite/core_51_24_48_768_1.dtshd -af aresample,aformat=channel_layouts=stereo -y swr.wav [...] [Parsed_aresample_0] [SWR] Using fltp internally between filters [Parsed_aresample_0] [SWR] Matrix coefficients: [Parsed_aresample_0] [SWR] FL: FL:0.414214 FR:0.000000 FC:0.292893 LFE:0.000000 SL:0.292893 SR:0.000000 [Parsed_aresample_0] [SWR] FR: FL:0.000000 FR:0.414214 FC:0.292893 LFE:0.000000 SL:0.000000 SR:0.292893 [Parsed_aresample_0] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz [...] $ tests/tiny_psnr.exe native.wav swr.wav s16 stddev:18907.06 PSNR: 10.80 MAXDIFF:51590 bytes: 8192/ 8192 After: $ ./ffmpeg -i $fate-suite/dts/dcadec-suite/core_51_24_48_768_1.dtshd -af aresample,aformat=channel_layouts=stereo -y swr.wav [...] [Parsed_aresample_0] [SWR] Using fltp internally between filters [Parsed_aresample_0] [SWR] Custom matrix coefficients: [Parsed_aresample_0] [SWR] FL: FL:-0.100006 FR:0.000000 FC:0.000000 LFE:0.000000 SL:-0.707092 SR:0.000000 [Parsed_aresample_0] [SWR] FR: FL:0.000000 FR:-0.100006 FC:0.000000 LFE:0.000000 SL:0.000000 SR:-0.707092 [Parsed_aresample_0] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz [...] $ tests/tiny_psnr.exe native.wav swr.wav stddev: 0.02 PSNR:129.44 MAXDIFF: 1 bytes: 8192/ 8192 Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    fftools/ffmpeg_filter: propagate downmix matrix side data to the filterchain Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    avfilter/af_aresample: also look for downmix matrix side data Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    swresample/rematrix: print custom downmix matrix coefficients Similar to how it's done to the matrix built in auto_matrix(). Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    avfilter/af_ashowinfo: support printing downmix matrix side data Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    avutil/frame: add a new side data type for downmix matrix Signed-off-by: James Almer <[email protected]>

  • James Almer (04 Jun 26)

    avutil/downmix_info: add a new API to propagate pre-made downmix matrixes Useful for formats where they provide the downmix matrix in the bistream rather than scale factors for channel groups. Signed-off-by: James Almer <[email protected]>

  • Michael Niedermayer (08 Jul 26)

    avcodec/bsf/dts2pts: evict unconsumable nodes from the poc tree Each pending packet consumes up to poc_diff tree nodes when it is output, so the packets in the FIFO can consume at most nb_pending nodes in total. Frames whose tree lookup misses on output leave their nodes behind, and damaged or crafted streams can make that happen indefinitely, growing the tree without limit. Track the node count and insertion order, keep the leftovers of up to MAX_DAMAGED_FRAMES frames and beyond that evict the nodes unconsumed the longest. Timestamps of valid frames are unaffected unless more frames than that are damaged. No eviction is done at EOF, where nodes are deliberately kept to regenerate timestamps from. Of all h264/hevc conformance samples only MR3_TANDBERG_B.264 triggers evictions, and no sample changes output. Fixes: unbounded memory growth with damaged streams Co-Authored-By: Fable-5

  • Michael Niedermayer (08 Jul 26)

    avcodec/bsf/dts2pts: fix removal of 2nd field nodes alloc_and_insert_node() inserts the nodes for 2nd fields with duration / poc_diff added to the timestamp, but the removal loop compared all nodes of a frame against the unadjusted first timestamp, so 2nd field nodes never matched and stayed in the tree until close. Advance the compared timestamp the same way the insertion does. Fixes: tree nodes leaking on every field coded frame Co-Authored-By: Fable-5

  • Michael Niedermayer (04 Jul 26)

    avcodec/bsf/dts2pts: chain same-gop nodes instead of collecting into a fixed array hevc_queue_frame() collected all tree nodes of the current gop into a fixed nodes[HEVC_MAX_DPB_SIZE * 2] array and asserted the count stayed within it. For a crafted HEVC stream the tree can hold slightly more same-gop nodes than that estimate (observed 34 vs 32), tripping the av_assert0 and aborting. Link the matching nodes into a list through a next pointer in the node instead; this has no size limit and needs neither extra passes nor allocation. Fixes: assertion failure Fixes: 519466146/clusterfuzz-testcase-minimized-ffmpeg_BSF_DTS2PTS_fuzzer-5238235193475072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Co-Authored-By: Fable-5

  • Frank Plowman (11 Jul 26)

    lavc/hevc: Always generate missing refs for foll pictures Since bc1a3bfd2cbc01ffa386312662af8a014890d861, missing reference pictures are not replaced with generated pictures unless `-flags show_corrupt` is used. For `ST_FOLL`/`LT_FOLL` reference pictures, however, generation of missing references is required by the spec per 8.3.3. We should not require the `show_corrupt` flag to be used in order to be spec-conformant, so this patch removes the `show_corrupt` behaviour added in bc1a3bfd2cbc01ffa386312662af8a014890d861 for `ST_FOLL`/`LT_FOLL` references and instead unconditionally generates reference pictures in these sets when unavailable Fixes: NUT_A_ericsson_5 Fixes: RPS_D_ericsson_6

  • KawaiiEngine (Sashimiso) (11 Jul 26)

    avutil/hwcontext_cuda: fail derive if no CUDA device matches When CUDA enumeration succeeds but none of the device UUIDs matches the source Vulkan device, ret still holds zero from the last successful CUDA call. The error path therefore uninitializes the destination and returns success. av_hwdevice_ctx_create_derived() then returns a CUDA device context without a CUDA context. Later frame allocation fails with an unrelated error. Set ret to AVERROR(ENODEV) for the no-match case, consistent with equivalent Vulkan and OpenCL device selection failures. Signed-off-by: KawaiiEngine (Sashimiso) <[email protected]>

  • Romain Beauxis (14 May 26)

    fftools/ffmpeg_mux_init.c: delete encoder-specific metadata when re-encoding.

  • Romain Beauxis (14 May 26)

    Add FATE tests for stale metadata during re-encoding.

  • Charly Morgand-Poyac (05 Jul 26)

    avcodec/x86/cabac: compute renormalisation shifts with lzcnt The norm_shift loads sit on the serial range dependency chain and cost several cycles where lzcnt costs one. Builds targeting CPUs without LZCNT keep the exact original code. About 1.5% faster CABAC heavy H.264 and HEVC decoding. Signed-off-by: Charly Morgand-Poyac <[email protected]>

  • Charly Morgand-Poyac (05 Jul 26)

    lavc/hevcdec: remove data dependent branches from residual decoding Freshly decoded bins are close to equiprobable, so branching on them mispredicts half of the time. Apply the coefficient signs and the clipping with the xor/subtract idiom and FFMIN/FFMAX, store the significant coefficient positions unconditionally while advancing the count by the flag value, and derive the greater1 contexts and the first greater1 index arithmetically from a flag mask. About 7% faster single threaded decoding on high bitrate streams. Signed-off-by: Charly Morgand-Poyac <[email protected]>

  • Charly Morgand-Poyac (05 Jul 26)

    lavc/hevcdec: decode runs of bypass bins with one integer division Reading a bypass bin doubles the offset and conditionally subtracts range << 17, which is one step of a binary long division: a run of n bins is the quotient of the offset, shifted and refilled upfront, by range << 17, and the new offset is its remainder. Decisions only depend on multiples of 2^17, so the reordered refill cannot change any of them; a quotient overflowing n bits, which needs an offset closer to the range than the pending low bits can distinguish, falls back to the serial loop. Use it for the coefficient sign runs, the Golomb-Rice suffixes and the unary prefixes, whose length is the number of leading ones of a quotient peeked without committing the bins past the terminating zero. Sign bins are equiprobable by construction, so on top of the saved renormalisation work this removes data dependent branch mispredictions. About 3% faster single threaded decoding on high bitrate streams. Signed-off-by: Charly Morgand-Poyac <[email protected]>

  • Charly Morgand-Poyac (05 Jul 26)

    lavc/hevcdec: skip the coefficient clear for DC-only blocks idct_dc reads coeffs[0] only and writes the whole block, so the clear before residual decoding is not needed on that path. Move it after the last significant coefficient position is known and compute col_limit once instead of at the transform call. Signed-off-by: Charly Morgand-Poyac <[email protected]>

  • Charly Morgand-Poyac (05 Jul 26)

    lavc/hevcdec: precompute the significance context tables per scan The significance flag loop looked up scan_x_off/scan_y_off and then ctx_idx_map for every decoded bin. The composition of the two is constant per scan type, so precompute the three permuted tables and index them by scan position directly. The SCAN_HORIZ table is the original one, horizontal scan order being raster order. About 2.5% faster single threaded decoding on high bitrate streams. Signed-off-by: Charly Morgand-Poyac <[email protected]>

  • James Almer (05 Jul 26)

    avcodec/audio_frame_queue: add skip samples side data to output packets Instead of reimplementing the same code on every afq user, just do it here. Signed-off-by: James Almer <[email protected]>

FFmpeg Security

5.2/10

Repo Security Summary

Updated 29 Jun 26 Fuzz tested

  • Maintained 10/10
  • Packaging N/A
  • Code-Review 0/10
  • Token-Permissions N/A
  • Dangerous-Workflow N/A
  • CII-Best-Practices 0/10
  • Security-Policy 0/10
  • Signed-Releases N/A
  • License 9/10
  • Branch-Protection N/A
  • SAST 0/10
  • Binary-Artifacts 10/10
  • Fuzzing 10/10
  • Pinned-Dependencies N/A

FFmpeg Website

Website

FFmpeg

Redirects

Does not redirect

Security Checks

All 65 security checks passed

Server Details

  • IP Address 79.124.17.100
  • Hostname ffbox0-bg.ffmpeg.org
  • Location Sofia, Sofia (stolitsa), Bulgaria, EU
  • ISP Telepoint Ltd
  • ASN AS31083

Associated Countries

  • BG BG
  • DE DE
  • IT IT

Safety Score

Website marked as safe

100%

Blacklist Check

ffmpeg.org was found on 0 blacklists

  • AntiSocial Blacklist
  • Artists Against 419
  • Badbitcoin
  • Bambenek Consulting
  • CERT Polska
  • CoinBlockerLists
  • CRDF
  • CryptoScamDB
  • EtherAddressLookup
  • EtherScamDB
  • Fake Website Buster
  • MetaMask EthPhishing
  • NABP Not Recommended Sites
  • OpenPhish
  • PetScams
  • PhishFeed
  • PhishFort
  • Phishing.Database
  • PhishStats
  • PhishTank
  • Phishunt
  • RPiList Not Serious
  • Scam.Directory
  • SecureReload Phishing List
  • Spam404
  • StopGunScams
  • Suspicious Hosting IP
  • ThreatFox
  • ThreatLog
  • TweetFeed
  • URLhaus
  • ViriBack C2 Tracker

Website Preview

Website preview

FFmpeg Docker

Container Info

Ffmpeg

# This container needs special attention. Please check https://hub.docker.com/r/linuxserver/ffmpeg for details.

#Media Tools linuxserver/ffmpeg:latest

Run Command

docker run -d \
  -p 80:80/tcp \
  -e PUID=${PUID} \
  -e PGID=${PGID} \
  -e TZ=${TZ} \
  -v /srv/lsio/ffmpeg/config:/config \
  --restart=unless-stopped \
  linuxserver/ffmpeg:latest

Compose File

version: 3.8
services:
  ffmpeg:
    image: "linuxserver/ffmpeg:latest"
    ports:
      - "80:80/tcp"
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Etc/UTC
    volumes:
      - "/srv/lsio/ffmpeg/config:/config"
    restart: unless-stopped

Environment Variables

  • Var Name Default
  • PUID 1000
  • PGID 1000
  • TZ Etc/UTC

Port List

  • 80:80/tcp

Volume Mounting

  • /srv/lsio/ffmpeg/config /config

FFmpeg Reviews

More File Converters

About the Data: FFmpeg

Change History

API

You can access FFmpeg's data programmatically via our API. Simply make a GET request to:

https://api.awesome-privacy.xyz/v1/services/ffmpeg

The REST API is free, no-auth and CORS-enabled. To learn more, view the API Docs or read the API Usage Guide.

Share FFmpeg

Help your friends compare File Converters, and pick privacy-respecting software and services.
Share FFmpeg and Awesome Privacy with your network!

View File Converters (2)