mirror of
https://github.com/vondas-network/videobeaux.git
synced 2026-01-04 14:10:03 +01:00
refactored programs and arg structure
This commit is contained in:
18
programs/extract_sound.py
Normal file
18
programs/extract_sound.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
from utils import load_config
|
||||
|
||||
config = load_config.load_config()
|
||||
a_ext = config['proj_mgmt']['default_audio_file_ext']
|
||||
|
||||
def extract_sound(input_file, output_file):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-vn",
|
||||
"-acodec", "pcm_s16le",
|
||||
"-ar", "44100",
|
||||
"-ac", "2",
|
||||
output_file
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Audio extracted from video using sound and file is {output_file}")
|
||||
Reference in New Issue
Block a user