Changes to python-ffmpeg for python3.12 compatibility (#106)

This commit is contained in:
kcrkor
2025-03-05 22:20:17 +00:00
committed by GitHub
parent 5374d1f64f
commit 78a0aee1b7
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ dependencies = [
"requests-cache>=1.2.1",
"click>=8.1.7",
"mutagen>=1.47.0",
"ffmpeg-python>=0.2.0",
"python-ffmpeg>=2.0.0",
"m3u8>=6.0.0",
"rich>=13.9.4"
]
+8 -4
View File
@@ -1,8 +1,9 @@
import re
import os
import ffmpeg
import logging
from ffmpeg import FFmpeg
from pydantic import BaseModel
from urllib.parse import urlparse
from pathlib import Path
@@ -216,9 +217,12 @@ def convertFileExtension(
if is_video:
ffmpeg_args["c:v"] = "copy"
ffmpeg.input(str(source_file)).output(str(output_file), **ffmpeg_args).run(
overwrite_output=1
)
(
FFmpeg()
.option("y")
.input(url=str(source_file))
.output(url=str(output_file), options=None, **ffmpeg_args)
).execute()
if remove_source:
os.remove(source_file)