Dummy video/audio tracks for generative filters and encoding mode
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
I'm trying to implement a basic audio visualizer for mpv using an ffmpeg filter:
[a]showwaves=mode=line:s=hd480:colors=White[v]
The only problem is, when mpv opens an audio file it doesn't initialize a video track so my video filter has nothing to output to.
It is possible to render a 'dummy' video track using "video-add" (currently broken but working in older builds) in a lua script.
Something like:
video-add av://lavfi:color=c=black:s=1920x1080:r=30
However this is not ideal for seeking as the dummy track has to render linearly, so with an hour-long piece of audio seeking towards the end will result in the player stalling for ages as it renders 60 minutes of black.
Having proper dummy audio/video tracks would also be very helpful for encoding mode, where a playlist may include files with video and/or audio.
Initializing an audio file after a video file in a playlist produces a broken media stream.
I currently get around it by adding my ghetto av:// tracks in lua but again it's really impractical for seeking large media files.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing video-add av://lavfi approach described in the issue and how encoding mode handles playlists containing audio and video. Define done as seeking directly in long audio files without linear dummy-track rendering and as stable initialization when playlist media types change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100