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

Livestream.com plugin bug:stops at 2GB #1185

Open scottbernstein-zz opened 8 years ago

scottbernstein-zz commented 8 years ago

Capturing a live stream from livestream.com using livestream plugin stops (with no error) at exactly 2GB.

I have tested this 4 times, and each time it stopped capturing with no error (even with -l debug on) exactly at 2.0GB capture file (there is no variation in the size of the file whatsoever -- all captures, of different live streams have stopped at exactly the same number of bytes).

On the other hand, if I run a simultaneous capture by grabbing the .m3u8 URL from the page source (NOT using the livestream plugin), no issue is found -- the capture continues cleanly until the webcast completes, yielding a file much larger than 2GB.

I'm running the latest standard distribution, using the Windows installer.

NeoFahrenheit commented 8 years ago

I have this issue as well. My Azubu recordings always ends with 2GB. :(

ghost commented 8 years ago

@scottbernstein

chrippa commented on 17 May 2015

The HTTP streams from livestream.com sends a Content-Length header with the value 2GB, and the server is probably closing the connection after that amount of data has been read. You can try using the HLS streams (use --stream-types hls to filter out the other ones) instead.

scottbernstein-zz commented 8 years ago

Thanks!

Interestingly enough, the player in the browser must not respect that header because it keeps playing

Anyway, I've been working around it myself by grabbing the M3U8 stream url from the page source and just hitting that stream directly w/o using the plugin.

NeoFahrenheit commented 8 years ago

Sorry guys, but how do I apply this change "(use --stream-types hls to filter out the other ones)" here?

I'm still lernaing. :)

ghost commented 8 years ago

@NeoFahrenheit

Which website are you trying to access? Azubu.tv? Livestreamers Azubu.tv plugin does not support HLS streams. In this case your attempt would be useless. They are using Akamai HD streams (similar to Livestream.com) and this may be the reason why you are experiencing the same problems. The server closes the connection after a certain amount of data has been send. I'm not sure if there are other stream types available, which could be implemented in the plugin. I haven't looked into it.

NeoFahrenheit commented 8 years ago

@0880

Yes, it's Azubu. :( Ok, then, I'll wait for the solution. :)

I'll test to see if this problem happens on Twitch as well. If yes, can you say how do I use that fix?

Thanks for the support!

NeoFahrenheit commented 8 years ago

@0880

Yeah, It's not happen on twtich. The video file exceeds 2GB.

Any progess on the fix? Thanks so much for the support!

ghost commented 8 years ago

@NeoFahrenheit

HLS streams are available too. Could be useful to bypass the 2GB limit.

youtube-dl -F "http://www.azubu.tv/Starfire"
[AzubuLive] Starfire: Downloading JSON metadata
[AzubuLive] Starfire: Downloading JSON metadata
[AzubuLive] Starfire: Downloading m3u8 information
[info] Available formats for 190049:
format code  extension  resolution note
meta         mp4        multiple   Quality selection URL
250          mp4        480x270     250k , mp4a.40.2,  avc1.42001e
500          mp4        640x360     500k , mp4a.40.2,  avc1.4d001e
1000         mp4        854x480    1000k , mp4a.40.2,  avc1.42001e
2400         mp4        1280x720   2400k , mp4a.40.2,  avc1.4d001f
3300         mp4        1920x1080  3300k , mp4a.40.2,  avc1.640028 (best)
youtube-dl -g "http://www.azubu.tv/Starfire"
http://azubuhlslivesp2-i.akamaihd.net/hls/live/223591/hls-saopaulo-2_2/video190049CHStarfire/3300/azevinho.m3u8
livestreamer "hls://http://azubuhlslivesp2-i.akamaihd.net/hls/live/223591/hls-saopaulo-2_2/video190049CHStarfire/3300/azevinho.m3u8" best -o Azubu.ts
[cli][info] Found matching plugin stream for URL hls://http://azubuhlslivesp2-i.akamaihd.net/hls/live/223591/hls-saopaulo-2_2/video190049CHStarfire/3300/azevinho.m3u8
[cli][info] Available streams: live (worst, best)
[cli][info] Opening stream: live (hls)
NeoFahrenheit commented 8 years ago

@0880

Thanks so much for your great support, but I have no idea what to do with those codes. :(

Sorry. :(

Thanks again!