Compare commits

...
2 Commits
Author SHA1 Message Date
Frédéric Tronel 814c64cc52 Fix a bug discovered by the synthetic video. 2026-08-31 21:28:07 +02:00
Frédéric Tronel c17ccb6563 Typo in calling ffmpeg. 2026-08-31 21:27:41 +02:00
2 changed files with 51 additions and 47 deletions
+4
View File
@@ -153,6 +153,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
except InvalidMediaError:
raise InvalidMediaError("Impossible to retrieve timestamp of final i-frame.")
assert head_iframe_ts <= tail_iframe_ts
checks.append(pos+head_iframe_ts-ts1)
subparts = []
@@ -199,6 +201,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
if h264_head_ts is not None:
h264_ts.append(h264_head_ts)
if head_iframe_ts < tail_iframe_ts:
# Creating MKV file that corresponds to current part between I-frames
# Internal video with all streams (video, audio and subtitles)
internal_mkv_name = f'part-{partnum:d}-internal.mkv'
+1 -1
View File
@@ -241,7 +241,7 @@ def extract_all_streams(ffmpeg_path:str, ffprobe_path:str, input_file:IO[bytes],
video_codec_params.extend([f'-c:v:{video_id:d}', codec, f'-level:v:{video_id:d}',
level, '-pix_fmt', pixel_format])
video_codec_params.extend(interlaced_options)
video_codec_params.extend([f'-colorspace:v:{video_id}', color_space,
video_codec_params.extend([f'-colorspace:v:{video_id:d}', color_space,
f'-color_primaries:v:{video_id:d}', color_primaries,
f'-color_trc:v:{video_id:d}', color_transfer,
f'-color_range:v:{video_id:d}', color_range])