Skip to content

Commit

Permalink
_set_scene_stats: Add back-up prop values
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Apr 29, 2024
1 parent 4fdc6f1 commit 5261280
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lvsfunc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,14 @@ def _set_sizes_props(n: int, clip: vs.VideoNode, pkt_sizes: list[int]) -> vs.Vid
return pkts

def _set_scene_stats(n: int, clip: vs.VideoNode, stats: list[dict[str, int]]) -> vs.VideoNode:
return clip.std.SetFrameProps(**stats[n])
try:
return clip.std.SetFrameProps(**stats[n])
except Exception:
return clip.std.SetFrameProps(
pkt_scene_avg_size=-1,
pkt_scene_max_size=-1,
pkt_scene_min_size=-1
)

stats = get_packet_scene_stats(keyframes, pkt_sizes)

Expand Down

0 comments on commit 5261280

Please sign in to comment.