Skip to content

Commit ed84ad4

Browse files
committed
Added auto thread type for potential speed improvements, it will depend on the codec
1 parent 060a3a5 commit ed84ad4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/pupil_labs/dynamic_content_on_rim/video

src/pupil_labs/dynamic_content_on_rim/video/read.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def read_video_ts(video_path, audio=False):
1717
stream = video_container.streams.audio[0]
1818
else:
1919
stream = video_container.streams.video[0]
20+
stream.thread_type = "AUTO"
2021
fps = stream.average_rate # alt base_rate or guessed_rate
2122
nframes = stream.frames
2223
logging.info("Extracting pts...")
@@ -73,6 +74,7 @@ def get_frame(av_container, pts, last_pts, frame, audio=False):
7374
strm = av_container.streams.audio[0]
7475
else:
7576
strm = av_container.streams.video[0]
77+
strm.thread_type = "AUTO"
7678
if last_pts < pts:
7779
try:
7880
for frame in av_container.decode(strm):

0 commit comments

Comments
 (0)