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.89k stars 582 forks source link

Livestreamer hangs with Twitch.tv (thread lockup) (AVG Blocking program) #654

Open Hezer opened 9 years ago

Hezer commented 9 years ago

When I start watching stream from twitch.tv with 1.11.1 version of Livestreamer it stops downloading after 2-10 seconds. Tried to change few settings, but it always stops after a while.

I was looking the process with ProcessExplorer and noticed that all the threads were in suspended state. Tried to resume few of them and the stream started to play again.

Config (Roaming\livestreamer\livestreamerrc): player="C:\Ohjelmat\Playerit\VLC\vlc.exe" rtmpdump=C:\Ohjelmat\Playerit\VLC\livestreamer\rtmpdump\rtmpdump.exe loglevel=debug

Log output looks like this: C:\Ohjelmat\Playerit\VLC\livestreamer>livestreamer.exe -v http://www.twitch.tv/soaryn low [cli][info] Found matching plugin twitch for URL http://www.twitch.tv/soaryn [cli][info] Available streams: audio, high, low, medium, mobile (worst), source (best) [cli][info] Opening stream: low (hls) [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 655 to queue [cli][debug] Pre-buffering 8192 bytes [stream.hls][debug] Adding segment 656 to queue [stream.hls][debug] Adding segment 657 to queue [stream.hls][debug] Download of segment 655 complete [cli][info] Starting player: "C:\Ohjelmat\Playerit\VLC\vlc.exe" [cli][debug] Writing stream to output [stream.hls][debug] Download of segment 656 complete [stream.hls][debug] Download of segment 657 complete [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 658 to queue

At this point it locks up, I resume threads and the log continues: [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 807 to queue [stream.hls][debug] Adding segment 808 to queue [stream.hls][debug] Adding segment 809 to queue [stream.hls][debug] Adding segment 810 to queue [stream.hls][debug] Adding segment 811 to queue [stream.hls][debug] Adding segment 812 to queue [stream.hls][debug] Adding segment 813 to queue [stream.hls][debug] Download of segment 807 complete [stream.hls][debug] Download of segment 808 complete [stream.hls][debug] Download of segment 809 complete [stream.hls][debug] Download of segment 810 complete [stream.hls][debug] Download of segment 811 complete [stream.hls][debug] Download of segment 812 complete [stream.hls][debug] Download of segment 813 complete [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 814 to queue [stream.hls][debug] Download of segment 814 complete [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 815 to queue [stream.hls][debug] Download of segment 815 complete [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 816 to queue [stream.hls][debug] Download of segment 816 complete [stream.hls][debug] Reloading playlist [stream.hls][debug] Adding segment 817 to queue [stream.hls][debug] Adding segment 818 to queue [stream.hls][debug] Download of segment 817 complete [stream.hls][debug] Download of segment 818 complete

And the stream plays fine until I close it myself.

Hezer commented 9 years ago

Ok, it seems AVG Free is interfering with the process and locks up the threads.

EDIT: Disabling AVG allowed livestreamer to function properly, but it was weird that AVG blocked the program without any notifications. Tried adding livestreamer.exe to exceptions list and it worked. Then as a test tried removing it from exceptions and it still worked.

Restarted PC and next time tried running livestreamer stream stopped, AVG virus detection popup showed saying it detected livestreamer.exe as "Unknown" virus and was asking what to do. Clicked "Do nothing" and the stream continued playing. http://www.avgthreatlabs.com/virus-and-malware-information/info/unknown/

chrippa commented 9 years ago

That's interesting, Livestreamer doesn't use anything but the standard Python library so I'm not sure why it would have a problem. It could be that it doesn't like the standalone binary, so if you install Python and then install Livestreamer from source instead I doubt it would react.