blob: cd3a6f0a55a5a972f36e5081a6e5bde3559a8069 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import os
import ffmpeg
import subprocess
from kivy.utils import platform
from kivy.app import App
def get_default_download_dir() -> str:
if platform == "android":
return "/sdcard/Download"
else:
from pathlib import Path
return os.path.join(str(Path.home()), "Downloads")
def convert_mp4_to_mp3(input_file: str, output_file: str) -> None:
current_directory = os.getcwd()
ffmpeg_binary_path = os.path.join(current_directory, 'ffmpeg')
#os.chmod(ffmpeg_binary_path, 0o775)
#subprocess.call([ffmpeg_binary_path, "-i", input_file, output_file])
print(os.listdir())
#ffmpeg.input(input_file).output(output_file).run(cmd=ffmpeg_binary_path)
|