-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
Python2 has been deprecated. Recommended to change python to python3 to fix code.
`#echo -e "${yell}Fetching video..."
Sync FPS to reality as best as possible. Mac's freebsd version of date cannot
has nanoseconds so inject python. :/
python <(cat <<EOF
import sys
import time
fps = 25; time_per_frame = 1.0 / fps
buf = ''; frame = 0; next_frame = 0
begin = time.time()
try:
for i, line in enumerate(sys.stdin):
if i % 32 == 0:
frame += 1
sys.stdout.write(buf); buf = ''
elapsed = time.time() - begin
repose = (frame * time_per_frame) - elapsed
if repose > 0.0:
time.sleep(repose)
next_frame = elapsed / time_per_frame
if frame >= next_frame:
buf += line
except KeyboardInterrupt:
pass
EOF
) < <(obtainium $video | bunzip2 -q 2> /dev/null)`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels