github lucemia/typed-ffmpeg v4.3

5 hours ago

Highlights

FFmpeg 7.0 loopback decoders (-dec / [dec:N]) — #966

Decode an already-encoded output stream and feed the decoded frames back into a filtergraph, e.g. to compare an encode against its source in a single command:

import ffmpeg

source  = ffmpeg.input("INPUT")
encoded = source.video.output(filename="-", f="null", vcodec="libx264", extra_options={"crf": 45})
dec     = encoded.loopback(stream_index=0)          # -> LoopbackDecoderNode
stacked = ffmpeg.filters.hstack(source.video, dec.video)
stacked.output(filename="OUT.mkv", vcodec="ffv1").run()
  • New OutputStream.loopback(stream_index, *, codec=, decoder_options=, codec_options=, extra_options=) returning a LoopbackDecoderNode; dec.video / dec.audio give typed streams.
  • Requires FFmpeg ≥ 7.0 — available in the v7 and v8 packages (and mirrored in the TypeScript bindings).
  • Compile direction only for now; parsing a command line containing -dec is tracked in #969.

Full details in the docs (version-differences / typescript) and the design notes under docs/.

Packages

All monorepo packages published at 4.3: ffmpeg-core, typed-ffmpeg-v5..v8, typed-ffmpeg-data-v5..v8, typed-ffmpeg (latest), and the compatible shim.

Don't miss a new typed-ffmpeg release

NewReleases is sending notifications on new releases.