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
  • #752
Closed
Open
Issue created Mar 07, 2023 by Jon Jett@jon-jett

Complex Filter syntax giving me escape key errors in ffmpeg-python, works at command line

(I'm trying to extract a single audio channel from a stereo stream.)

This works at command line:

ffmpeg -i gettysburg4st.mov -filter_complex "[0:a:1]pan=1|c0=2*c1" -ac 1 8st.wav

but in python I can't figure it out. Here's one of 1000 variations i've tried:

video = ffmpeg.input("gettysburg4st.mov")
channel = video.filter_('pan', f"mono=[0:1]pan=[0:a:1]pan=1|c0=2*c1")
output = ffmpeg.output(channel, 'gburg4.wav')
ffmpeg.run(output)

I get this error:

[Parsed_pan_0 @ 0x13363c200] Invalid channel layout 'mono\=[0\:1]pan\=[0\:a\:1]pan\=1'
[AVFilterGraph @ 0x13363fb80] Error initializing filter 'pan' with args 'mono\\\=[0\\\:1]pan\\\=[0\\\:a\\\:1]pan\\\=1|c0\\\=2*c1'

What am I missing?

Assignee
Assign to
Time tracking