mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-10 09:28:53 -05:00
fix
This commit is contained in:
parent
77503b38b9
commit
5822c0ae9f
@ -820,7 +820,7 @@ def seconds_to_timestamp(seconds):
|
|||||||
seconds_int = int(seconds_remainder)
|
seconds_int = int(seconds_remainder)
|
||||||
milliseconds = int((seconds_remainder - seconds_int) * 1000)
|
milliseconds = int((seconds_remainder - seconds_int) * 1000)
|
||||||
|
|
||||||
return f"{hours:02d}:{minutes:02d}:{seconds_int:02d}.{milliseconds:03d}"
|
return f"{hours:02d}:{minutes:02d}:{seconds_int:02d}.{milliseconds:03d}" # noqa
|
||||||
|
|
||||||
|
|
||||||
def get_trim_timestamps(media_file_path, timestamps_list, run_ffprobe=False):
|
def get_trim_timestamps(media_file_path, timestamps_list, run_ffprobe=False):
|
||||||
|
|||||||
@ -912,7 +912,7 @@ def produce_video_chapters(chapter_id):
|
|||||||
timestamp = chapter["start"]
|
timestamp = chapter["start"]
|
||||||
title = chapter["title"]
|
title = chapter["title"]
|
||||||
|
|
||||||
output_filename = f"thumbnail_{i:02d}.jpg"
|
output_filename = f"thumbnail_{i:02d}.jpg" # noqa
|
||||||
output_path = os.path.join(output_folder, output_filename)
|
output_path = os.path.join(output_folder, output_filename)
|
||||||
|
|
||||||
command = [settings.FFMPEG_COMMAND, "-y", "-ss", str(timestamp), "-i", video_path, "-vframes", "1", "-q:v", "2", "-s", f"{width}x{height}", output_path]
|
command = [settings.FFMPEG_COMMAND, "-y", "-ss", str(timestamp), "-i", video_path, "-vframes", "1", "-q:v", "2", "-s", f"{width}x{height}", output_path]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user