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 582 forks source link

downloading entire youtube livestream from start #849

Open yg2288 opened 9 years ago

yg2288 commented 9 years ago

Is it possible to download the dvr broadcast (from the start) of an ongoing youtube stream with livestreamer?

chrippa commented 9 years ago

You can try --hls-live-edge 99999.

yg2288 commented 9 years ago

This seems to just record the ongoing live stream. Is it possible to download certain segments with livestreamer?

justletmepost commented 8 years ago

chrippa, i can't get this to work. Here's a bunch of live streams, https://www.youtube.com/channel/SBAaOjE-GIlRI

How would i go about downloading something from a given point (or the start)? I have tried the following (using win7) livestreamer --hds-live-edge 99999 someyoutubeurl best -o whatever.mp4

But all it does is start downloading from the live point the moment the command is executed. So if i see something streaming and it's 45 minutes into it, those 45 minutes are lost.

ghost commented 8 years ago

@justletmepost

I have tried the following (using win7) livestreamer --hds-live-edge 99999 someyoutubeurl best -o whatever.mp4

YouTube Live streams are HLS streams. Obviously you are using the wrong option: HLS not HDS.

Example:

livestreamer "https://www.youtube.com/watch?v=-62LWTsykcw" best --hls-live-edge 99999

The output format is MPEG-TS and not MP4.

livestreamer "https://www.youtube.com/watch?v=-62LWTsykcw" best --hls-live-edge 99999 -o Live.ts

I have tested this option and it seems to work.

justletmepost commented 8 years ago

Thanks a bunch 0880, worked perfectly.