chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 581 forks source link

[question] Can livestreamer pipe a video stream to STDOUT as stream of images #755

Closed fridrik01 closed 9 years ago

fridrik01 commented 9 years ago

This is possible with ffmpeg, for example: ffmpeg -i udp://@:5004 -f image2pipe -vcodec pgm pipe:1 | ...

Is it possible to do something similar in livestreamer?

fridrik01 commented 9 years ago

Wow, its actually possible!. For example:

livestreamer -O https://www.youtube.com/watch?v=oHZKYHCDy9Q best | ffmpeg -i - -r 1 -f image2pipe -vcodec pgm pipe:1 | ...

dovi5988 commented 7 years ago

I am trying to do the same for mplayer for Asterisk. I am using: livestreamer --yes-run-as-root --stdout "https://www.youtube.com/watch?v=bNT30uNrUeo" worst -n |/usr/local/bin/madplay -Q -o raw:- --mono -R 8000 -a -10 -

and all I hear is few beeps. In the past the issue was how Asterisk is getting it from mplayer which I assume is based on how it gets it from livestreamer. Is there any way of setting the format with livestreamer?