Stop seeking into the video for poster generation, just use the first frame.

This guarantees that a poster can be generated for any valid stream instead of
breaking on extremely short streams (<1s).
This commit is contained in:
Erik Thuning 2024-12-06 15:27:34 +01:00
parent cbf29c4962
commit f455f95ce0

@ -17,7 +17,7 @@ def make_poster(inpath, outdir):
outfile = f"{infile_noext}-poster.jpg"
outpath = path.join(outdir, outfile)
ffmpeg.input(inpath, ss=1) \
ffmpeg.input(inpath) \
.output(outpath, vframes=1) \
.run(quiet=True)
return (outdir, outfile)