pytorch / pytorch/audio

Add filter and filter_complex to StreamWriter

Open
#3,063 7 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: IO triaged
Dominant language
Python
Stars
2.9k
Forks
799
Avg merge
58m
Merged PRs (30d)
3

Description

🚀 The feature

Add the capability for ffmpeg filters (-filter, -filter_complex) in StreamWriter and StreamReader according to ffmpeg filters: https://ffmpeg.org/ffmpeg-filters.html

It'll be good to add an argument to set the ffmpeg filters via add_video_stream and add_audio_stream when working with hw acceleration and get entire ffmpeg functionality with acceleration.

Motivation, pitch

Working with ffmpeg filters is used for a lot of basic utilities like adding effects via an overlay, changing background color etc.
Using the StreamWriter and then applying the filter losses all the acceleration gains.
Combing the ability to add the filters in the StreamWriter will solve this issue and will let the user the ability to create advanced ffmpeg pipelines while benefiting from the Hardware acceleration.

Thanks

Alternatives

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StreamWriter and StreamReader APIs, especially add_video_stream and add_audio_stream, and review the linked FFmpeg filters documentation. Determine how filter and filter_complex arguments should be exposed for audio and video streams, then add coverage showing that filtered, hardware-accelerated pipelines work as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
audio-video-rtc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.