Skip to content

Commit

Permalink
Add warning about frame duration in autocue/ebur128 filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Oct 9, 2024
1 parent 65678e5 commit ea1b3ee
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/libs/autocue.liq
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,31 @@ def autocue.internal.implementation(

# Get very last frame for precise track duration
frame = list.last(frames)
frame_duration =
float_of_string(
list.assoc(default="0.", "lavfi.liq.duration_time", frame)
)

frame_duration =
if
frame_duration != 100.
then
log.important(
label="autocue",
"Warning: reported frame duration should be 100ms. Either the FFmpeg \
ebur128 filter has changed its internals or the version/build of \
FFmpeg you are using is buggy. We recommend using a fairly recent \
distribution with FFmpeg version 7 or above. Backported packages \
can be tricky."
)
100.
else
frame_duration
end

duration =
float_of_string(list.assoc(default="0.", "lavfi.liq.pts_time", frame)) +
float_of_string(
list.assoc(default="0.", "lavfi.liq.duration_time", frame)
)
frame_duration

# Finalize cue/cross/fade values now...
if cue_out() == 0. then cue_out := duration end
Expand Down

0 comments on commit ea1b3ee

Please sign in to comment.