Various build fixes, cleanup and details #6

Merged
leo merged 34 commits from trace into main 2023-11-21 15:32:49 +00:00
Showing only changes of commit fdbf9b2610 - Show all commits

View File

@ -98,8 +98,9 @@ def process_pdf(path, *, maxsize, maxzoom, quality, page_number=0):
def process_video(path, *, maxsize, quality):
with av.open(str(path)) as container:
stream = container.streams.video[0]
rot = stream.side_data and stream.side_data.get(SideData.DISPLAYMATRIX) or 0
stream.codec_context.skip_frame = "NONKEY"
stream.codec_context.threads = 1
rot = stream.side_data and stream.side_data.get(SideData.DISPLAYMATRIX) or 0
container.seek(container.duration // 8)
img = next(container.decode(stream)).to_image()
del stream