👷 Moved to maintained python-ffmpeg.
This commit is contained in:
+1
-1
@@ -38,8 +38,8 @@ mpegdash = "^0.4.0"
|
|||||||
rich = "^13.9.4"
|
rich = "^13.9.4"
|
||||||
toml = "^0.10.2"
|
toml = "^0.10.2"
|
||||||
typer = "^0.15.1"
|
typer = "^0.15.1"
|
||||||
ffmpeg-python = "^0.2.0"
|
|
||||||
tidalapi = "^0.8.3"
|
tidalapi = "^0.8.3"
|
||||||
|
python-ffmpeg = "^2.0.12"
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[tool.poetry.extras]
|
||||||
gui = ["pyside6", "pyqtdarktheme-fork"]
|
gui = ["pyside6", "pyqtdarktheme-fork"]
|
||||||
|
|||||||
+15
-11
@@ -8,7 +8,7 @@ from collections.abc import Callable
|
|||||||
from concurrent import futures
|
from concurrent import futures
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
import ffmpeg
|
from ffmpeg import FFmpeg
|
||||||
import m3u8
|
import m3u8
|
||||||
import requests
|
import requests
|
||||||
from requests.adapters import HTTPAdapter, Retry
|
from requests.adapters import HTTPAdapter, Retry
|
||||||
@@ -762,29 +762,33 @@ class Download:
|
|||||||
|
|
||||||
def _video_convert(self, path_file: pathlib.Path) -> pathlib.Path:
|
def _video_convert(self, path_file: pathlib.Path) -> pathlib.Path:
|
||||||
path_file_out: pathlib.Path = path_file.with_suffix(AudioExtensions.MP4)
|
path_file_out: pathlib.Path = path_file.with_suffix(AudioExtensions.MP4)
|
||||||
result, _ = (
|
ffmpeg = (
|
||||||
ffmpeg.input(path_file)
|
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
||||||
.output(str(path_file_out), map=0, c="copy", loglevel="quiet")
|
.option("y")
|
||||||
.run(cmd=self.settings.data.path_binary_ffmpeg)
|
.input(url=path_file)
|
||||||
|
.output(url=path_file_out, codec="copy", map=0, loglevel="quiet")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ffmpeg.execute()
|
||||||
|
|
||||||
return path_file_out
|
return path_file_out
|
||||||
|
|
||||||
def _extract_flac(self, path_media_src: pathlib.Path) -> pathlib.Path:
|
def _extract_flac(self, path_media_src: pathlib.Path) -> pathlib.Path:
|
||||||
path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC)
|
path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC)
|
||||||
result, _ = (
|
ffmpeg = (
|
||||||
ffmpeg.input(path_media_src)
|
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
||||||
|
.input(url=path_media_src)
|
||||||
.output(
|
.output(
|
||||||
str(path_media_out),
|
url=path_media_out, map=0,
|
||||||
map=0,
|
|
||||||
movflags="use_metadata_tags",
|
movflags="use_metadata_tags",
|
||||||
acodec="copy",
|
acodec="copy",
|
||||||
map_metadata="0:g",
|
map_metadata="0:g",
|
||||||
loglevel="quiet",
|
loglevel="quiet"
|
||||||
)
|
)
|
||||||
.run(cmd=self.settings.data.path_binary_ffmpeg)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ffmpeg.execute()
|
||||||
|
|
||||||
return path_media_out
|
return path_media_out
|
||||||
|
|
||||||
def _extract_video_stream(self, m3u8_variant: m3u8.M3U8, quality: int) -> (m3u8.M3U8 | bool, str):
|
def _extract_video_stream(self, m3u8_variant: m3u8.M3U8, quality: int) -> (m3u8.M3U8 | bool, str):
|
||||||
|
|||||||
Reference in New Issue
Block a user