Created
March 4, 2016 12:16
-
-
Save chrisross/27c6461e4d919f8f8dd8 to your computer and use it in GitHub Desktop.
Loop through directory of videos, playing each one. Useful for scrubbing through a massive collection of video using ffplay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Hotkeys (While playing): | |
# @see http://linux.die.net/man/1/ffplay | |
# q, ESC Quit | |
# f Toggle full screen | |
# p, SPC Pause | |
# a Cycle audio channel | |
# v Cycle video channel | |
# t Cycle subtitle channel | |
# w Show audio waves | |
# left/right Seek backward/forward 10 seconds. | |
# down/up Seek backward/forward 1 minute. | |
# mouse click Seek to percentage in file corresponding to fraction of width. | |
export idx=1 | |
for f in *; do | |
if [[ -f "${f}" ]]; then | |
ffplay -i "${f}" -window_title "${idx}: ${f}" -autoexit -stats | |
((idx+=1)) | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment