python-video-silence-cutter icon indicating copy to clipboard operation
python-video-silence-cutter copied to clipboard

Feature Request: Changing audio format for the output

Open everythingnew1 opened this issue 2 years ago • 3 comments

Hello and thank you for your script,it works without problems in normal use.I wonder if there is a way to change the audio format from "vorbis" to "aac" or "mp3" because I also use some older hardware that unfortunately does not support "vorbis".I looked into the script for a mention of 'vorbis" but did not find anything to change. All I could find is a mention of an audio filter but I do not know where that filter resides and how I can edit it,I am a newb unfortunately.Any kind of help is appreciated.

everythingnew1 avatar Aug 20 '23 10:08 everythingnew1

I don't use vorbis specifically. It's possibly just the default of ffmpeg (which the script uses under the hood). It might also be possible that your input source uses vorbis/ogg.

I guess it could be possible to change the output audio format to something else. Feel free to submit a patch. Unfortunately I won't have time to fix it in near future.

DarkTrick avatar Aug 20 '23 11:08 DarkTrick

No problem,take as much time as you need,there is no reason to hurry working on the script.I think vorbis is indeed the default for ffmpeg.I will try to find a way to change the default,I will search for a solution.Thank you for your answer

everythingnew1 avatar Aug 20 '23 13:08 everythingnew1

for f in .$typeaudio ; do python3 source/silence_cutter.py "$f" output/$dt/"${f%.}.opus" $setdBsilence ; done

for f in .mp3 ; do python3 source/silence_cutter.py "$f" output/"${f%.}.opus" -35 ; done

it sets the output to opus or whatever you specify

mrfragger avatar Jan 23 '24 10:01 mrfragger