Skip to content

Instantly share code, notes, and snippets.

@dasl-
Created July 3, 2019 18:57
Show Gist options
  • Save dasl-/0d67166df5e68a615a1741f171c402d7 to your computer and use it in GitHub Desktop.
Save dasl-/0d67166df5e68a615a1741f171c402d7 to your computer and use it in GitHub Desktop.
works on zsh, not bash:
youtube-dl --output - --format 18 'https://www.youtube.com/watch?v=luDxN1Pz6G8' | tee >(ffplay -nodisp -vn -autoexit -i pipe:0 -v quiet -infbuf ) | ffmpeg -threads 1 -i pipe:0 -filter:v scale=28x18 -c:a copy -f rawvideo -pix_fmt rgb24 -v quiet -stats pipe:1 && echo dunzo
works on both bash and zsh:
youtube-dl --output - --format 18 'https://www.youtube.com/watch?v=luDxN1Pz6G8' | tee >(ffplay -nodisp -vn -autoexit -i pipe:0 -v quiet -infbuf ) >(ffmpeg -threads 1 -i pipe:0 -filter:v scale=28x18 -c:a copy -f rawvideo -pix_fmt rgb24 -v quiet -stats pipe:1 && echo dunzo) > /dev/null
works on neither bash nor zsh:
youtube-dl --output - --format 18 'https://www.youtube.com/watch?v=luDxN1Pz6G8' | tee >(ffmpeg -threads 1 -i pipe:0 -filter:v scale=28x18 -c:a copy -f rawvideo -pix_fmt rgb24 -v quiet -stats pipe:1 && echo dunzo) >(ffplay -nodisp -vn -autoexit -i pipe:0 -v quiet -infbuf ) > /dev/null
works on zsh, not bash (bash also pipes ffmpeg output to ffplay which is corrupt ffplay data):
youtube-dl --output - --format 18 'https://www.youtube.com/watch?v=luDxN1Pz6G8' | tee >(ffmpeg -threads 1 -i pipe:0 -filter:v scale=28x18 -c:a copy -f rawvideo -pix_fmt rgb24 -v quiet -stats pipe:1 && echo dunzo) | ffplay -nodisp -vn -autoexit -i pipe:0 -v quiet -infbuf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment