ffmpeg4discord icon indicating copy to clipboard operation
ffmpeg4discord copied to clipboard

feat? remove audio track

Open JustCauseWhyNot opened this issue 8 months ago • 1 comments

I thought it was possible to set audio_br: 0 to encode with no audio, but I get an error.

error
Traceback (most recent call last):
  File "/home/justcausewhynot/.local/share/ffmpeg4discord/env/bin/ff4d", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/justcausewhynot/.local/share/ffmpeg4discord/env/lib/python3.12/site-packages/ffmpeg4discord/__main__.py", line 65, in main
    twopass = TwoPass(**args)
              ^^^^^^^^^^^^^^^
  File "/home/justcausewhynot/.local/share/ffmpeg4discord/env/lib/python3.12/site-packages/ffmpeg4discord/twopass.py", line 96, in __init__
    self.audio_br = float(self.probe["streams"][audio_stream]["bit_rate"])
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'bit_rate'

Would it be possible to either have audio_br: 0 remove the audio, or add a flag to do ffmpeg -i Video -c copy -an Video_output that way there's no audio track at all?

JustCauseWhyNot avatar May 12 '25 21:05 JustCauseWhyNot

I like it. I'll include this in an audio rework that I've been kickin' around sometime this summer.

zfleeman avatar May 12 '25 21:05 zfleeman