Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F ffmpeg-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 402
    • Issues 402
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Karl Kroening
  • ffmpeg-python
  • Issues
  • #111
Closed
Open
Issue created Aug 19, 2018 by Administrator@rootContributor

Support filters without input

Created by: CNugteren

I have a video file (with audio) and I want to prepend a few seconds of still background (i.e. black) image without sound. I'm trying to do this with ffmpeg-python, but no success yet.

First thing I stumbled upon is the missing support for the color input file (see my remark here), however, I can work around that by creating a black PNG image and loading that in, e.g. using ffmpeg.input("black.png", t=10).

However, now I need to concatenate the background video with the original video, but I can't because the background video doesn't have audio, and concat requires a matching number of audio/video streams. So then I found the aevalsrc filter in ffmpeg, which generates a (silent) audio stream, but I can't make it work with ffmpeg-python, since it is a filter that doesn't require input. E.g. this doesn't work:

stream = ffmpeg.input("black.png", t=10)
stream.filter("aevalsrc", exprs="0", duration=10)

Is there any way to achieve such a thing?

Assignee
Assign to
Time tracking