ffmpeg-skill 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/scripts/look.py CHANGED
@@ -19,6 +19,8 @@ from typing import List, Optional
19
19
  from _platforms import PLATFORMS, PLATFORM_CHOICES, resolve as resolve_platform
20
20
  from _common import STATE, require_tool, add_common, apply_common, default_font_file, die, emit, escape_drawtext, ffmpeg_base, info, parse_time, probe, run, run_analysis, time_arg
21
21
  from _common import drawtext_fontfile # noqa: E402
22
+ from _common import ffmpeg_filters, filter_missing_hint # noqa: E402
23
+ from _common.emit import note, record_fallback # noqa: E402
22
24
 
23
25
  FONT = "fontcolor=white:fontsize=h/18:box=1:boxcolor=black@0.55:boxborderw=6:x=8:y=8"
24
26
 
@@ -162,6 +164,14 @@ def main() -> int:
162
164
  # a resolvable font file, given as fontfile=, is the only form confirmed not to crash drawtext's
163
165
  # own fontconfig resolution on some real Windows ffmpeg builds (#100); font= is the fallback when
164
166
  # nothing can be resolved, unchanged from before this existed.
167
+ if not args.no_timecode and ffmpeg_filters() and "drawtext" not in ffmpeg_filters():
168
+ # a build without drawtext (Homebrew's plain ffmpeg) cannot stamp the timecodes, but the
169
+ # sheet itself only needs tile: draw it without them and say so, rather than failing the
170
+ # step every picture change ends with (#394)
171
+ args.no_timecode = True
172
+ record_fallback("this ffmpeg build has no drawtext filter, so the sheet has no timecode stamps "
173
+ "(the same as --no-timecode)", "look_no_drawtext")
174
+ note("no timecode stamps: this ffmpeg build has no drawtext filter (" + filter_missing_hint("drawtext") + ")")
165
175
  if args.no_timecode:
166
176
  font_prefix, tc = "", "" # nothing is drawn, so no font is resolved or copied
167
177
  else: