DarkTrick / python-video-silence-cutter

Python script, that uses ffmpeg and ffprobe to cut silences away from videos
Creative Commons Zero v1.0 Universal
43 stars 16 forks source link

Feature Request: Changing audio format for the output #11

Open everythingnew1 opened 1 year ago

everythingnew1 commented 1 year ago

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.

DarkTrick commented 1 year ago

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.

everythingnew1 commented 1 year ago

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

mrfragger commented 7 months ago

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