mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 04:05:08 +03:00
Changes to python-ffmpeg for python3.12 compatibility (#106)
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user