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

Ustream.com plugin drops after few seconds #860

Open karlo2105 opened 9 years ago

karlo2105 commented 9 years ago

livestreamer -l debug "http://www.ustream.tv/channel/tv-bor-live" best [cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/tv-bor-live [plugin.ustreamtv][debug] Waiting for moduleInfo invoke [cli][info] Available streams: 576p+ (best), 576p+_alt_akamai, 576p+_alt_highwin ds, mobile_240p (worst) [cli][info] Opening stream: 576p+ (uhs) [stream.uhs][debug] Fetching module info [cli][debug] Pre-buffering 8192 bytes [stream.uhs][debug] Adding chunk 1429507013 to queue [stream.uhs][debug] Fetching module info [cli][info] Starting player: 'C:\Program Files\VideoLAN\VLC\vlc.exe' [stream.uhs][debug] Download of chunk 1429507013 complete [cli][debug] Writing stream to output [stream.uhs][debug] Stream went offline [stream.uhs][debug] Closing worker thread [stream.uhs][debug] Closing writer thread [cli][info] Stream ended

liamkennedy commented 9 years ago

I'm also experiencing similar issues with Ustream channels (NASA HDEV and leolaporte). Streams drop after a few seconds of playout. Was pretty reliable in the past. (This is on Raspberry Pi). I know sometimes Ustream messes with stuff on their side that can break Livstreamer support. Did they do that again?

pi@issabove ~/issabove $ livestreamer -l debug www.ustream.tv/leolaporte 480p --player omxplayer --fifo [cli][info] Found matching plugin ustreamtv for URL www.ustream.tv/leolaporte [plugin.ustreamtv][debug] Waiting for moduleInfo invoke [cli][info] Available streams: 240p, 240p_alt_akamai, 360p, 360p_alt_akamai, 480p, 480p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst), mobile_360p, mobile_480p [cli][info] Opening stream: 480p (uhs) [stream.uhs][debug] Fetching module info [cli][debug] Pre-buffering 8192 bytes [stream.uhs][debug] Adding chunk 1429895991 to queue [cli][info] Creating pipe livestreamerpipe-5780 [cli][info] Starting player: omxplayer [stream.uhs][debug] Download of chunk 1429895991 complete [cli][debug] Writing stream to output [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Adding chunk 1429895995 to queue [stream.uhs][debug] Adding chunk 1429895996 to queue [stream.uhs][debug] Adding chunk 1429895997 to queue [stream.uhs][debug] Download of chunk 1429895995 complete [stream.uhs][debug] Download of chunk 1429895996 complete [stream.uhs][debug] Download of chunk 1429895997 complete [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Adding chunk 1429895998 to queue [stream.uhs][debug] Adding chunk 1429895999 to queue [stream.uhs][debug] Adding chunk 1429896000 to queue [stream.uhs][debug] Adding chunk 1429896001 to queue [cli][info] Player closed [stream.uhs][debug] Closing worker thread [stream.uhs][debug] Closing writer thread [cli][info] Stream ended

liamkennedy commented 9 years ago

I've found the issue seems to be with any UHS stream. If instead I select an HLS stream it's as solid/reliable as can be.

e.g. livestreamer www.ustream.tv/channel/iss-hdev-payload mobile_480p --player omxplayer --fifo

This works great. Does not abort.

chrippa commented 9 years ago

I was able to reproduce this a couple of days ago, but now that I was gonna take a closer look it seems to work fine. Perhaps it was a temporary issue on UStream's end?

karlo2105 commented 9 years ago

@chrippa I let Ustream plugin working for 5 minutes, it stuttered a bit but it didn't drop out. Maybe it was related to their servers maybe not.

jthall commented 9 years ago

This has been consistently happening for me for i.e. nasa-media-channel and live-iss-stream. The normal browser streams work fine, i.e. load them in msie.

When it has played out its chunks, it says fetching module info and hangs until it is able to fetch some more chunks. Unfortunately, it does not seem to be able to fetch module info. What causes it to fetch module info anyway? when the playlist for the chunks runs out?

example cmd

livestreamer -l debug -p "mplayer -vo null -ao jack -" http://www.ustream.tv/channel/nasa-media-channel 720p+

liamkennedy commented 9 years ago

This is happening for all my ISSABOVE users too it seems. When we switch to the mobile_480p stream it all works just fine. The 720p stream is UHS and the mobile_480p is HLS (I think).

Streaming 720p or higher from other sources (e.g YouTube) works great.

liamkennedy commented 9 years ago

This is a continuing problem. I can no longer use Livestreamer for any UHS stream on Ustream.

This is what I see on the leolaporte stream (just as an example - my main use is the NASA HDEV stream)

pi@issabove ~ $ livestreamer -l debug http://www.ustream.tv/leolaporte best --player omxplayer --fifo [cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/leolaporte [plugin.ustreamtv][debug] Waiting for moduleInfo invoke [cli][info] Available streams: 240p, 240p_alt_akamai, 360p, 360p_alt_akamai, 480p, 480p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst), mobile_360p, mobile_478p [cli][info] Opening stream: 720p+ (uhs) [stream.uhs][debug] Fetching module info [cli][debug] Pre-buffering 8192 bytes [stream.uhs][debug] Adding chunk 1436037622 to queue [cli][info] Creating pipe livestreamerpipe-3070 [cli][info] Starting player: omxplayer [stream.uhs][debug] Fetching module info [cli][debug] Writing stream to output [stream.uhs][debug] Fetching module info [stream.uhs][debug] Download of chunk 1436037622 complete [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Fetching module info [stream.uhs][debug] Adding chunk 1436037625 to queue [stream.uhs][debug] Adding chunk 1436037626 to queue [stream.uhs][debug] Adding chunk 1436037627 to queue [stream.uhs][debug] Adding chunk 1436037628 to queue [cli][info] Player closed [stream.uhs][debug] Closing worker thread [stream.uhs][debug] Closing writer thread [cli][info] Stream ended

If I use a HLS stream (e.g. mobile_478p) it works perfectly.

Any suggestion for a workaround? I have about 900 users worldwide now - and they can no longer access the best quality video from the ISS.

As a test I setup a re-stream of the HDEV video using my own streaming gear and created a live stream via YouTube Live. That is supported perfectly in Livestreamer at 1080p. So - it's definitely an ongoing issue just with Ustream UHS streams.

Thanks!

ghost commented 9 years ago

I can't confirm that.

livestreamer "http://www.ustream.tv/leolaporte" best -l debug -p "C:\Program Files\Video\MPC-HC\mpc-hc.exe"
[cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/leolaporte
[plugin.ustreamtv][debug] Waiting for moduleInfo invoke
[cli][info] Available streams: 240p, 240p_alt_akamai, 360p, 360p_alt_akamai, 480p, 480p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst), mobile_360p, mobile_478p
[cli][info] Opening stream: 720p+ (uhs)
[stream.uhs][debug] Fetching module info
[cli][debug] Pre-buffering 8192 bytes
[stream.uhs][debug] Adding chunk 1436042908 to queue
[stream.uhs][debug] Fetching module info
[cli][info] Starting player: C:\Program Files\Video\MPC-HC\mpc-hc.exe
[stream.uhs][debug] Download of chunk 1436042908 complete
[cli][debug] Writing stream to output
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042909 to queue
[stream.uhs][debug] Adding chunk 1436042910 to queue
[stream.uhs][debug] Adding chunk 1436042911 to queue
[stream.uhs][debug] Adding chunk 1436042912 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042909 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042910 complete
[stream.uhs][debug] Download of chunk 1436042911 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042912 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042915 to queue
[stream.uhs][debug] Adding chunk 1436042916 to queue
[stream.uhs][debug] Adding chunk 1436042917 to queue
[stream.uhs][debug] Adding chunk 1436042918 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042915 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042916 complete
[stream.uhs][debug] Download of chunk 1436042917 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042918 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042919 to queue
[stream.uhs][debug] Adding chunk 1436042920 to queue
[stream.uhs][debug] Adding chunk 1436042921 to queue
[stream.uhs][debug] Adding chunk 1436042922 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042919 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042920 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042921 complete
[stream.uhs][debug] Download of chunk 1436042922 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042925 to queue
[stream.uhs][debug] Adding chunk 1436042926 to queue
[stream.uhs][debug] Adding chunk 1436042927 to queue
[stream.uhs][debug] Adding chunk 1436042928 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042925 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042926 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042927 complete
[stream.uhs][debug] Download of chunk 1436042928 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042929 to queue
[stream.uhs][debug] Adding chunk 1436042930 to queue
[stream.uhs][debug] Adding chunk 1436042931 to queue
[stream.uhs][debug] Adding chunk 1436042932 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042929 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042930 complete
[stream.uhs][debug] Download of chunk 1436042931 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042932 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042935 to queue
[stream.uhs][debug] Adding chunk 1436042936 to queue
[stream.uhs][debug] Adding chunk 1436042937 to queue
[stream.uhs][debug] Adding chunk 1436042938 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042935 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042936 complete
[stream.uhs][debug] Download of chunk 1436042937 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042938 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042939 to queue
[stream.uhs][debug] Adding chunk 1436042940 to queue
[stream.uhs][debug] Adding chunk 1436042941 to queue
[stream.uhs][debug] Adding chunk 1436042942 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042939 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042940 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042941 complete
[stream.uhs][debug] Download of chunk 1436042942 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042945 to queue
[stream.uhs][debug] Adding chunk 1436042946 to queue
[stream.uhs][debug] Adding chunk 1436042947 to queue
[stream.uhs][debug] Adding chunk 1436042948 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042945 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042946 complete
[stream.uhs][debug] Download of chunk 1436042947 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042948 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042949 to queue
[stream.uhs][debug] Adding chunk 1436042950 to queue
[stream.uhs][debug] Adding chunk 1436042951 to queue
[stream.uhs][debug] Adding chunk 1436042952 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042949 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042950 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042951 complete
[stream.uhs][debug] Download of chunk 1436042952 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042955 to queue
[stream.uhs][debug] Adding chunk 1436042956 to queue
[stream.uhs][debug] Adding chunk 1436042957 to queue
[stream.uhs][debug] Adding chunk 1436042958 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042955 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042956 complete
[stream.uhs][debug] Download of chunk 1436042957 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042958 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042959 to queue
[stream.uhs][debug] Adding chunk 1436042960 to queue
[stream.uhs][debug] Adding chunk 1436042961 to queue
[stream.uhs][debug] Adding chunk 1436042962 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042959 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042960 complete
[stream.uhs][debug] Download of chunk 1436042961 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042962 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042965 to queue
[stream.uhs][debug] Adding chunk 1436042966 to queue
[stream.uhs][debug] Adding chunk 1436042967 to queue
[stream.uhs][debug] Adding chunk 1436042968 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042965 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042966 complete
[stream.uhs][debug] Download of chunk 1436042967 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042968 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042969 to queue
[stream.uhs][debug] Adding chunk 1436042970 to queue
[stream.uhs][debug] Adding chunk 1436042971 to queue
[stream.uhs][debug] Adding chunk 1436042972 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042969 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042970 complete
[stream.uhs][debug] Download of chunk 1436042971 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042972 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042975 to queue
[stream.uhs][debug] Adding chunk 1436042976 to queue
[stream.uhs][debug] Adding chunk 1436042977 to queue
[stream.uhs][debug] Adding chunk 1436042978 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042975 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042976 complete
[stream.uhs][debug] Download of chunk 1436042977 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042978 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042979 to queue
[stream.uhs][debug] Adding chunk 1436042980 to queue
[stream.uhs][debug] Adding chunk 1436042981 to queue
[stream.uhs][debug] Adding chunk 1436042982 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042979 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042980 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042981 complete
[stream.uhs][debug] Download of chunk 1436042982 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042985 to queue
[stream.uhs][debug] Adding chunk 1436042986 to queue
[stream.uhs][debug] Adding chunk 1436042987 to queue
[stream.uhs][debug] Adding chunk 1436042988 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042985 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042986 complete
[stream.uhs][debug] Download of chunk 1436042987 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042988 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042989 to queue
[stream.uhs][debug] Adding chunk 1436042990 to queue
[stream.uhs][debug] Adding chunk 1436042991 to queue
[stream.uhs][debug] Adding chunk 1436042992 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042989 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042990 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042991 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042992 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042995 to queue
[stream.uhs][debug] Adding chunk 1436042996 to queue
[stream.uhs][debug] Adding chunk 1436042997 to queue
[stream.uhs][debug] Adding chunk 1436042998 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042995 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042996 complete
[stream.uhs][debug] Download of chunk 1436042997 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042998 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436042999 to queue
[stream.uhs][debug] Adding chunk 1436043000 to queue
[stream.uhs][debug] Adding chunk 1436043001 to queue
[stream.uhs][debug] Adding chunk 1436043002 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436042999 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043000 complete
[stream.uhs][debug] Download of chunk 1436043001 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043002 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043005 to queue
[stream.uhs][debug] Adding chunk 1436043006 to queue
[stream.uhs][debug] Adding chunk 1436043007 to queue
[stream.uhs][debug] Adding chunk 1436043008 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043005 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043006 complete
[stream.uhs][debug] Download of chunk 1436043007 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043008 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043009 to queue
[stream.uhs][debug] Adding chunk 1436043010 to queue
[stream.uhs][debug] Adding chunk 1436043011 to queue
[stream.uhs][debug] Adding chunk 1436043012 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043009 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043010 complete
[stream.uhs][debug] Download of chunk 1436043011 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043012 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043015 to queue
[stream.uhs][debug] Adding chunk 1436043016 to queue
[stream.uhs][debug] Adding chunk 1436043017 to queue
[stream.uhs][debug] Adding chunk 1436043018 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043015 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043016 complete
[stream.uhs][debug] Download of chunk 1436043017 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043018 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043019 to queue
[stream.uhs][debug] Adding chunk 1436043020 to queue
[stream.uhs][debug] Adding chunk 1436043021 to queue
[stream.uhs][debug] Adding chunk 1436043022 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043019 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043020 complete
[stream.uhs][debug] Download of chunk 1436043021 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043022 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043025 to queue
[stream.uhs][debug] Adding chunk 1436043026 to queue
[stream.uhs][debug] Adding chunk 1436043027 to queue
[stream.uhs][debug] Adding chunk 1436043028 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043025 complete
[stream.uhs][debug] Download of chunk 1436043026 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043027 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043028 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043029 to queue
[stream.uhs][debug] Adding chunk 1436043030 to queue
[stream.uhs][debug] Adding chunk 1436043031 to queue
[stream.uhs][debug] Adding chunk 1436043032 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043029 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043030 complete
[stream.uhs][debug] Download of chunk 1436043031 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043032 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043035 to queue
[stream.uhs][debug] Adding chunk 1436043036 to queue
[stream.uhs][debug] Adding chunk 1436043037 to queue
[stream.uhs][debug] Adding chunk 1436043038 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043035 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043036 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043037 complete
[stream.uhs][debug] Download of chunk 1436043038 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043039 to queue
[stream.uhs][debug] Adding chunk 1436043040 to queue
[stream.uhs][debug] Adding chunk 1436043041 to queue
[stream.uhs][debug] Adding chunk 1436043042 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043039 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043040 complete
[stream.uhs][debug] Download of chunk 1436043041 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043042 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043045 to queue
[stream.uhs][debug] Adding chunk 1436043046 to queue
[stream.uhs][debug] Adding chunk 1436043047 to queue
[stream.uhs][debug] Adding chunk 1436043048 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043045 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043046 complete
[stream.uhs][debug] Download of chunk 1436043047 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043048 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043049 to queue
[stream.uhs][debug] Adding chunk 1436043050 to queue
[stream.uhs][debug] Adding chunk 1436043051 to queue
[stream.uhs][debug] Adding chunk 1436043052 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043049 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043050 complete
[stream.uhs][debug] Download of chunk 1436043051 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043052 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436043055 to queue
[stream.uhs][debug] Adding chunk 1436043056 to queue
[stream.uhs][debug] Adding chunk 1436043057 to queue
[stream.uhs][debug] Adding chunk 1436043058 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043055 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043056 complete
[stream.uhs][debug] Download of chunk 1436043057 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436043058 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Fetching module info

Seems like everything works as expected.

liamkennedy commented 9 years ago

You are testing on Windows - My issue is on the Raspberry Pi. Can you think of some dependency on the Pi that would possibly be causing the issue?

ghost commented 9 years ago

@liamkennedy

To be honest, I don't know. You said playback was reliable in the past. I don't think it is related to the Livestreamer application, but I might be wrong. I don't see any error messages in your logs. What I can see is the player closes after downloading a few chunks. The question is why.

What happens if you try to use another player (or the file output option)?

liamkennedy commented 9 years ago

The base image of the ISS-Above has remained unchanged from when it was working reliably until a couple of months ago when the “best” / UHS Ustream channels started acting up. I don’t run apt-get update && upgrade – so there really should be nothing other than changes to livestreamer plugins or an issue with the way Ustream works that would be a factor here. My “idea” was on the Ustream side had changed. It would not be the first time.

I will install VLC and also try the file output option as a test. If it shows it’s a player issue (omxplayer) that will be useful to know… although… nothing there has changed either (no new version installed of omxplayer).

VLC is not ideal as it doesn’t support the GPU acceleration (and for anything other than the Pi2 model the CPU is already up around 85%+ when livestreamer is running).

Just curious - Do you have a Raspberry Pi to test this for yourself?

Thanks for the ideas in any case. I’ll get back to you.

And... thanks so much for ALL you do to support all of us using Livestreamer.

liamkennedy commented 9 years ago

So - when I output to a file - instead of using omxplayer - it works perfectly and does not abort prematurely.

Where does this leave me? Should I make contact with omxplayer folks to see if they can provide some ideas? I added a caching option to the player args - but that's not having any impact on the player stopping e.g.

--player "omxplayer --video_fifo 8" --fifo

Just some "questions in my own head" about this.

Why does this only cause a problem with UHS streams from Ustream? Why not HLS also? Why do YouTube Live or on-demand videos (even at very high bit-rate) work just fine?

jthall commented 9 years ago

I ran livestreamer with the -O flag like this

livestreamer -l debug -O http://www.ustream.tv/channel/nasa-media-channel 720p+ >media.flv

and then let it run for a while until I saw several loading module msgs, then once it started receiving chunks again I viewed the file in vlc. The file had missing video, i.e. commentator was talking and then stopped mid sentence. (it was running ISS Live at the time) so for me the -O redirected to a file has problems and seems to have more problems consistently. In addition, I ran a church service earlier this evening which aborted with a crash because it had an unknown video parameter when retrieving the first chunk. The stream is not live now, so I don't think it would give the same error.

It does seem as if there are some corner cases missing in the ustreamtv plugin that we might be hitting either by design by ustream or just dumb luck. My python skills are not great, so it will take me a little while to fully understand the logic in the plugin. In any rate, it should be pretty reproducible. Do we think the problem is in the ustream plugin or librtmp python library? Both were updated about the time this seemed to start for me.

Did you look at some interactive content like public channel / education channel, or were you looking at hdev? Is it possible the content was fairly static when you looked so you thought the video was not having problems?

Please check an interactive feed such as nasa public or nasa education and verify it works for you. I am seeing this on python-2.7 and Linux.

liamkennedy commented 9 years ago

good catch @jthall - yes when I output that file of the HDEV stream there are several jump points in it - which don't appear as all that bad based upon the content. However when I capture something with live audio (ustream.tv/leolaporte) those jumps / breaks in the video really show up.

So I agree I think this is indicating something may be up with the plugin for Ustream as far as UHS videos. The video is rock solid for the mobile_478p version (HLS) - and it does not have the same dropouts at all.

ghost commented 9 years ago

@jthall

I ran livestreamer with the -O flag like this

livestreamer -l debug -O http://www.ustream.tv/channel/nasa-media-channel 720p+ >media.flv

and then let it run for a while until I saw several loading module msgs, then once it started receiving chunks again I viewed the file in vlc.

How long exactly? I'm asking because I don't see any of these messages (see my log above). Are you talking about these warning messages [Failed to process module info: Failed to get module info: Timeout] which can be seen here? Looks more like an network issue for me.

The strange thing is, if something has changed on the Ustream side, I would have the same problem (with Windows), but that's not the case!

@liamkennedy

Just curious - Do you have a Raspberry Pi to test this for yourself?

Unfortunately I'm not able to test it on Raspberry Pi.

You said you are experiencing the same problems (jumps / breaks in the video) like jthall, but I don't see any of these warning messages in your logs. Could this be because the omxplayer stops before some of these warning messages show up?

liamkennedy commented 9 years ago

@0880 omxplayer It aborts pretty quickly. What happens is the video starts up... within a second or two it freezes... after maybe 5 seconds it unfreezes.. then omxplayer aborts a few seconds later.

I don't see anything that looks like an error message in the debug output.. it simply takes its time loading chunks, adding chunks, fetching module info in no particular order - then omxplayer just gives up and closes.

ghost commented 9 years ago

I did some further testing using the file output option (360p (uhs) stream). I did not see any error message, but the downloaded video has definitely some jumps / breaks in it. And that may be the cause, why the omxplayer stops.

liamkennedy commented 9 years ago

Also this issue seems similar to what is being described here

At least the reference to how the "best" stream is problematic - and yet the mobile_ streams work just fine

ghost commented 9 years ago

Now it's getting really strange. I was trying it again on another channel (http://www.ustream.tv/channel/nasa-educational):

livestreamer "http://www.ustream.tv/channel/nasa-educational" 240p -l debug -o 240p.flv
[cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/nasa-educational
[plugin.ustreamtv][debug] Waiting for moduleInfo invoke
[cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst)
[cli][info] Opening stream: 240p (uhs)

Saved the file to disk and played it with MPC-HC. This time, no jumps / breaks. The video runs perfectly.

Update:

The 720p+ (uhs) stream seems to be problematic too. Quite confusing. Both are UHS streams, the only difference is the resolution.

ghost commented 9 years ago

I assume all FLV files (chunks) are downloaded correctly (no error messages are shown).

http://ams-ucdn02.ustream.tv/sjc-uhs25/streams/httpflv/ustreamVideo/10208765/streams/live_1_1434527278_913536015.flv
http://ams-ucdn02.ustream.tv/sjc-uhs25/streams/httpflv/ustreamVideo/10208765/streams/live_1_1434527279_913536015.flv
http://ams-ucdn02.ustream.tv/sjc-uhs25/streams/httpflv/ustreamVideo/10208765/streams/live_1_1434527280_913536015.flv

Maybe the problem lies in how these files are joined into one single FLV file?

Update:

No there are missing chunks too (when downloading the 720p+ UHS stream). At least the 240p UHS stream is working fine for me.

jthall commented 9 years ago

I'm watching the educational channel now and I think either the penalty applied to us is time-based and since we can fetch a lot of chunks, we may get further and further behind in the delay blocks, or maybe you don't get penalized for lower bitrate streams. I suspect the penalty may be happening because we pull chunks with a new http session rather than using the same one like the flash players. If you run the 240p feed for a long time like half an hour, do you see one massive gap or is the player somehow able to keep up?

Plus by capturing it to a file and then playing it back, you have the ability to stall out for a long time, then fetch a whole bunch of chunks at faster-than-real-time and catch up. If, on the other htand, you are playing it out in real-time, I suspect the 240P feeds will pause as well, although admittedly it doesn't seem to be as bad as the other hd feeds, so maybe there reall yaren't any gaps after all.

You can really see the gaps like this

livestreamer -O http://www.ustream.tv/channel/nasa-media-channel 720p|mplayer -vo null -ao jack -

You'll see the gaps if you watch the status crawl output of mplayer and you will see it loading module info at that time repeatedly.

I think a good place to start here would be to find out what the code path is when loading module info and a chunk is not retrieved. That might tell us a clue. I'm seeing gaps in the 240p stream as it waits, but those gaps would not be visible if you're playing a file back because you can play right through the gap as if no time had elapsed.

so as long as the chunk you want when you are behind is available in the CDN ringbuffer, and if you can download faster than real-time, you should be able to retrieve all the chunks before they disappear. If you are seeing 404s for the 720P streams, you may be trying to pull a chunk that is older than the "ringbuffer" available on the CDN for the channel.

It's not really a ringbuffer but you get the idea, older chunks are purged to make way for new ones. Since all the clients probably run at different points in time, there needs to be a little bit of overlap between now and the past. We may be simply dealing with the amount of time it takes to go set up a new session with a penalty from ustream.

Consider from ustream's point of view. They don't want livestreamer to run, but they do want multiple people behind a NAT to be able to watch the same stream. They can't simply limit each IP to one session, and they don't want too big of a delay for the flash player to load. The solution is to penalize an IP that misbehaves or is particularly active, probably with some sort of weighted penalty.

I've been watching educational channel for the duration of typing this post and only see some minor blips as we pull new content and waiting for the next chunk.

This particular channel, if memory serves, is actually an SD feed on the NASA mux. I see they have a 720P feed for it, so they might have begun encoding education in HD. I can check, but I'm pretty sure the satellite feed for Education channel is SD, that may be part of why we are able to pull this without interruption.

The 240P stream for live-iss-stream is not so forgiving. I just saw a small gap in the education feed of about 5 or more lost seconds in the video. I did not actually see it in the frame count output, instead the content playing out had a jump.

ghost commented 9 years ago

I think the main problem (missing chunks) is clear now. This is the reason why some players drop out (e.g. omxplayer). Other media players (e.g. VLC, MPC-HC) are able to handle that, but playback is horrible.

Do we think the problem is in the ustream plugin or librtmp python library?

I don't know. I can see some activity on port 1935 (RTMP) while Livestreamer is running.

If you run the 240p feed for a long time like half an hour, do you see one massive gap or is the player somehow able to keep up?

I will do some further testing and report back.

ghost commented 9 years ago

Plus by capturing it to a file and then playing it back, you have the ability to stall out for a long time, then fetch a whole bunch of chunks at faster-than-real-time and catch up. If, on the other htand, you are playing it out in real-time, I suspect the 240P feeds will pause as well, although admittedly it doesn't seem to be as bad as the other hd feeds, so maybe there reall yaren't any gaps after all.

Your assumption is correct. Playback is horrible in real-time. It makes no difference whether I use VLC or MPC-HC. Only the file output option gives me a playable file without jumps / breaks.

jthall commented 9 years ago

so what would need to happen to remember enough state across callbacks so we can reuse the same session each time we want to pull some chunks? It seems that might be the reason, but maybe not the entire story.

ghost commented 9 years ago

This is a complicated question. We are dealing with several problems at once.

  1. There are missing chunks which are not downloaded by Livestreamer. Output log indicates that. I didn't noticed it first because no error message was shown.

    Example (Module info removed):

    [stream.uhs][debug] Download of chunk 1436042915 complete
    [stream.uhs][debug] Download of chunk 1436042916 complete
    [stream.uhs][debug] Download of chunk 1436042917 complete
    [stream.uhs][debug] Download of chunk 1436042918 complete
    [stream.uhs][debug] Adding chunk 1436042919 to queue
    [stream.uhs][debug] Adding chunk 1436042920 to queue
    [stream.uhs][debug] Adding chunk 1436042921 to queue
    [stream.uhs][debug] Adding chunk 1436042922 to queue
    [stream.uhs][debug] Download of chunk 1436042919 complete
    [stream.uhs][debug] Download of chunk 1436042920 complete
    [stream.uhs][debug] Download of chunk 1436042921 complete
    [stream.uhs][debug] Download of chunk 1436042922 complete
    [stream.uhs][debug] Adding chunk 1436042925 to queue
    [stream.uhs][debug] Adding chunk 1436042926 to queue
    [stream.uhs][debug] Adding chunk 1436042927 to queue
    [stream.uhs][debug] Adding chunk 1436042928 to queue
    [stream.uhs][debug] Download of chunk 1436042925 complete
    [stream.uhs][debug] Download of chunk 1436042926 complete
    [stream.uhs][debug] Download of chunk 1436042927 complete
    [stream.uhs][debug] Download of chunk 1436042928 complete

    Missing chunks: 1436042923, 1436042924

  2. The chunks are not delivered fast enough to the player. This results in a break while the player is waiting for the next chunk. (#265)
  3. Only a small amount of chunks are fetched at once. I think we should fetch as much chunks as we can. (Maybe not possible: See point 4 and 5)
  4. How do we get the full path to each chunk? While monitoring the whole process with Firefox (Browser Console / Web Console / Network Monitor) I get something like that:

    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738762_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738763_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738764_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738765_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738766_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738767_462857943.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738768_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738769_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738770_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738771_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738772_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738773_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738774_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738775_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738776_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738777_1858602452.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738778_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738779_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738780_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738781_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738782_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738783_689100556.flv
    http://ams-ucdn01.ustream.tv/sjc-uhs27/streams/httpflv/ustreamVideo/10414700/streams/live_6_1435738784_689100556.flv

    How is the last number generated?

  5. Pulling too much chunks at once may result in a temporary block.

Correct me if I'm wrong.

ghost commented 9 years ago

I also noticed using the --stream-segment-threads option does not seem to have any impact. The amount of fetched chunks remains the same.

The size of the thread pool used to download segments. Minimum value is 1 and maximum is 10. This is generic option used by streams not covered by other options, such as stream protocols specific to plugins, e.g. UStream. Default is: 1.

Multi-threaded streaming

On segmented streaming protocols (such as HLS and HDS) it’s possible to use multiple threads to potentially increase the throughput. Each stream type has it’s own option, these options are currently available:

Option Used by these plugins
--hls-segment-threads twitch, youtube and many more.
--hds-segment-threads dailymotion, mlgtv and many more.
--stream-segment-threads ustreamtv, beattv and any other plugins implementing their own segmented streaming protocol.
livestreamer "http://www.ustream.tv/channel/nasa-media-channel" best -l debug -p "C:\Program Files\Video\MPC-HC\mpc-hc.exe"
[cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/nasa-media-channel
[plugin.ustreamtv][debug] Waiting for moduleInfo invoke
[cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst)
[cli][info] Opening stream: 720p+ (uhs)
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436950598 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.uhs][debug] Fetching module info
[cli][info] Starting player: C:\Program Files\Video\MPC-HC\mpc-hc.exe
[stream.uhs][debug] Download of chunk 1436950598 complete
[stream.uhs][debug] Adding chunk 1436950599 to queue
[stream.uhs][debug] Adding chunk 1436950600 to queue
[stream.uhs][debug] Adding chunk 1436950601 to queue
[stream.uhs][debug] Adding chunk 1436950602 to queue
[cli][debug] Writing stream to output
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436950599 complete
[stream.uhs][debug] Download of chunk 1436950600 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436950601 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436950602 complete
livestreamer "http://www.ustream.tv/channel/nasa-media-channel" best -l debug --stream-segment-threads 8 -p "C:\Program Files\Video\MPC-HC\mpc-hc.exe"
[cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/nasa-media-channel
[plugin.ustreamtv][debug] Waiting for moduleInfo invoke
[cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst)
[cli][info] Opening stream: 720p+ (uhs)
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436950652 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.uhs][debug] Fetching module info
[cli][info] Starting player: C:\Program Files\Video\MPC-HC\mpc-hc.exe
[stream.uhs][debug] Download of chunk 1436950652 complete
[cli][debug] Writing stream to output
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Adding chunk 1436950655 to queue
[stream.uhs][debug] Adding chunk 1436950656 to queue
[stream.uhs][debug] Adding chunk 1436950657 to queue
[stream.uhs][debug] Adding chunk 1436950658 to queue
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436950655 complete
[stream.uhs][debug] Download of chunk 1436950656 complete
[stream.uhs][debug] Fetching module info
[stream.uhs][debug] Download of chunk 1436950657 complete
[stream.uhs][debug] Download of chunk 1436950658 complete
liamkennedy commented 9 years ago

Seems this is a pretty intractable problem them - and rules out use of Ustream if this isn't something that can be worked out (unfortunately the level of programming / debug is above my capabilities). I may have to work on NASA to allow me to stream my own version using some other cdn that works for HD streams (e.g. YouTube Live). Not sure how quick I can get that done though!

Thanks for all the work on this issue so far. I wish I could be of more help.

Oh.. not sure if this is a NASA Ustream specific thing - or a Ustream thing in general but my backup stream of mobile_480p disappeared and was switched over to mobile_478p instead. It's a mystery to me how those streams get generated and we end up with all the dozens of stream types. As I cannot use "best" and "worst" is just too low quality I'm stuck with coding an override for all my ISS-Above units to use a set stream - which means whenever this changes it messes up over 900 units I have running around the world. I've now implemented and auto-update - so when this happens again - I can push the change out more easily... anyhow - that's my problem.

jthall commented 9 years ago

I've been digging into this a little over the last couple days. I had hoped to fix it before the Soyuz docking, but that didn't happen.

I looked at implementing a harmless change, like reporting the number of concurrent viewers to the caller. I got it to report a float (i.e. there are 505.0 viewers of this stream) but I think I know how to fix that, just use int instead of int / float in the schema definition. This is my first python adventure so things are going a little bit slower than I had hoped, but not much.

Next looking at what appears to be going on, ustream sends moduleInfo messages towards the client after connect. In the flash version wireshark packets, the client (after receiving the moduleInfo message) sends a playing() call, and then waits for more moduleInfo messages. Every so often, it sends stats() messages.

Livestreamer connects, gets a single moduleInfo() message and then hangs up on the connection. The next time he connects, he gets the same moduleInfo() message and thus the same chunk he has already downloaded. Finding no new chunks, he hangs up and trys again. I don't know how rapidly this sequence happens, but ustream probably penalizes him because he is constantly connecting.

so things on today's todo:

make it send the playing() message towards ustream

modify the main process thread to not hang up upon single moduleInfo() message, and verify this is going to be thread-safe when two or more are running at the same time since at first glance it looks as if the flash version might run two threads.

Then I will figure out if the stats methods are required, if it is possible to deal with them, and report back on my progress.

I may leave the number of viewers in there. I also added a video codec check in the schema so in the future if somebody wants to they can implement some sort of "this stream is mpeg4, this one is mpeg2" so that the livestreamer could be told to pick an mp4 vs mp2 stream or whatever. At the moment, however, they're all coming up mpeg4 / h264.

So even though all I have really done is added a printable, I now understand the ustream plugin code better. I suppose that's a win. :)

jthall commented 9 years ago

well I've got it reusing the connection, but I'm not convinced it is much better. I'm not convinced it isn't either. I tried to implement the playing() call but it doesn't look right in the tcpdump since I didn't encode the reason object. Nevertheless, the moduleInfo objects keep showing up, only thing is it skips chunks because it isn't offered them. I'm in #livestreamer on freenode if you want to work this real-time.

jthall commented 9 years ago

I've tried a couple things, and here are my results:

Prefetching "old" chunks does not work, i.e. let's say the chunk number is 55, and the range is from 48 to 58, chunks 49 - 54 are not available (404)

I tried prefetching the future, and that doesn't work either--I was able to prefetch maybe one or two chunks in advance, but got 404s for the rest (I tried to fetch the whole range)

and, with the current implementation, if you get a 404, you'll never try the chunk again. This is because the chunk is already in the chunks list and the iterator to add chunks checks the list before adding the chunk again. I'm hesitant to try to add a new field to Chunks that indicates whether the chunk was downloaded or not because that would require some synchronization between the worker thread and the writer thread. As it stands, it probably isn't thread-safe unless there's some mechanism in python that protects lists or named tuples.

The way I see it there are two possibilities.

1: need to implement the stats() function to relay back to ustream which chunks were downloaded

2: investigate why we are not responding to set bandwidth calls from ustream. Both suspiciously look like they might solve the problem. The flash player does both.

In any rate by singly connecting and implementing the playing() call, things seem substantially better, I'm missing two chunks, and I have a thought about maybe coaxing the download thread into fetching them late. Hopefully that will provide an unbroken stream, and hopefully it will not starve out a player.

If you're curious, this is with the nasa media channel that operates at 720P. Not having proper AMF3 support is proving to be a bit annoying because my ustream calls don't look like the flashplayer calls. Hopefully ustream can read amf0 still, but that will probably go away in the future.

Anyway it's getting better.

jthall commented 9 years ago

ok yes now it is running glitch-free, at least for me. It might be related to bandwidth as well. I have enough bandwidth to run several times real-time for the stream, so I can "catch up" if you will rather quickly. I'm curious to see what happens if you run this on a slower connection.

As I was playing with this, I noticed one schema failure for streams, and once I was "unable to retrieve desktop streams" so I'm looking at the first one to see what's wrong with the schema. I'm still not convinced this solution is the correct solution, because the messages appear to come less often for livestreamer clients than the flash client. Basically what I have done is the following:

1: reuse the same connection to get more chunks rather than going through setup each time we want more chunks

2: send playing() method to server (not convinced this is really required)

3: relax chunk retrieval rules to fetch stale chunks that "should" be missing but are mysteriously still hanging around on the servers. This means when you try to pull chunks that cross a range boundary you will get "earlier" chunks rather than starting at the range boundary (thus the reason for "missing" chunks)

TODO: handle failure cases better and make sure we didn't botch failure notifications

How do I get this put into a code review?

liamkennedy commented 9 years ago

I don't know the official approach to handling code review but I would love to be able to test your potential fix somehow. I have close to 1000 users worldwide who I have locked to the mobile_478p stream and I so want to try getting everyone back on the 720p stream.

Sent from my iPhone

On Jul 24, 2015, at 10:01 PM, jthall notifications@github.com wrote:

ok yes now it is running glitch-free, at least for me. It might be related to bandwidth as well. I have enough bandwidth to run several times real-time for the stream, so I can "catch up" if you will rather quickly. I'm curious to see what happens if you run this on a slower connection.

As I was playing with this, I noticed one schema failure for streams, and once I was "unable to retrieve desktop streams" so I'm looking at the first one to see what's wrong with the schema. I'm still not convinced this solution is the correct solution, because the messages appear to come less often for livestreamer clients than the flash client. Basically what I have done is the following:

1: reuse the same connection to get more chunks rather than going through setup each time we want more chunks

2: send playing() method to server (not convinced this is really required)

3: relax chunk retrieval rules to fetch stale chunks that "should" be missing but are mysteriously still hanging around on the servers. This means when you try to pull chunks that cross a range boundary you will get "earlier" chunks rather than starting at the range boundary (thus the reason for "missing" chunks)

TODO: handle failure cases better and make sure we didn't botch failure notifications

How do I get this put into a code review?

— Reply to this email directly or view it on GitHub.

jthall commented 9 years ago

I've put my changes in https://github.com/jthall/livestreamer.git

Let me know how that works for you. It appears there may still be a small hang upon start, but then you don't see it after that. I think that might make omxplayer unhappy, but you can let me know since yo uuse that.

ghost commented 9 years ago

@jthall

OK, I'm testing it right now. My first impression is: It seems to run much better than before. All chunks are retrieved correctly. I think the main problem (missing chunks) has been fixed now. I'm still getting some warning messages (Failed to process module info: Failed to get module info: Timeout) (strangely enough only on some channels e.g. NASA media channel) but this seems to have no negative impact. I need to do some further tests to see if it works reliable (even on other channels). This may take some time.

jthall commented 9 years ago

I have noticed that as well, and am running some parallel tests between the mobile stream and the uhs stream. I think the timeout msgs are because our tolerences are too stringent. I think I may have botched the exception mechanism, so it will never fail in the module info process loop. We are benefiting from that because the player eventually does get the chunks.

Basically it goes like this.

The module info message informs the client of some information. Sometimes that information is the streams object. This one tells us about new chunks. The plugin gets mad if we come out of the module info block without a valid streams object, so I wrote a loop that iterates 50 times through module infos looking for valid streams object. At some point it decides the timeout has been reached and whines about it. Whether that is between getting module info messages or ones we view as valid I don't know. I'm sure this code could be refactored a bit, but this was a 'first step' to see if the logic is sound.

I found another stream that the flv parser doesn't like, that is probably an unrelated bug, but since that stream does not broadcast all the time it is difficult to test with it. Maybe it is due to whatever is encoding the service. I know the broadcaster and can contact them to find out about it. If you find some more streams that just flat out don't work let me know.

jthall commented 9 years ago

so it's been a little over a month. How is the testing going with your streams, @liamkennedy? I haven't really looked at this in great detail over the last month, life got busy.

liamkennedy commented 9 years ago

Sorry for the delay. I tried working with the updates a month ago. It didn't seem to improve things but I didn't test it fully then - and I've been busy since. I really want this fix because my ISS-Above users are only getting a 478p stream from the ISS currently (HLS). I'll carve out some time next week to really run it through it's paces. Did you try it on the HDEV stream yourself?

jthall commented 9 years ago

yes I have tested all the streams and they're seemingly working fine. I would be interested in why it was not working for you, so do please post your observations.

On 9/8/15, liamkennedy notifications@github.com wrote:

Sorry for the delay. I tried working with the updates a month ago. It didn't seem to improve things but I didn't test it fully then - and I've been busy since. I really want this fix because my ISS-Above users are only getting a 478p stream from the ISS currently (HLS). I'll carve out some time next week to really run it through it's paces. Did you try it on the HDEV stream yourself?


Reply to this email directly or view it on GitHub: https://github.com/chrippa/livestreamer/issues/860#issuecomment-138729123

liamkennedy commented 9 years ago

Might it be a Raspberry Pi specific thing? I’ll definitely get back to you ASAP then. If I can re-test it all sooner than next week I will do that. Thanks.

ErAzOr2k commented 8 years ago

Hi jthall,

with your modification it's working definitely better. But getting still some freezes (tested on NASA TV Educational and NASA TV Media).

2015-09-12 08:02:47.642 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-12 08:03:07.650 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-12 08:04:27.665 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-12 08:04:47.683 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout

liamkennedy commented 8 years ago

Done some further testing.

Full disclosure - I might just be the worst person to be testing this - because I am unsure whether I am doing this properly. I'm really pretty green with installing things from github - so ALL I did was replace the ustream.py on my Raspberry Pi with the updated ustreamtv.py that you have in your repo

The base version I have installed is 1.12.2 - and then I replaced ustreamtv.py

Whenever I play a UHS stream (vs HLS) I still see the frequent drop outs (omxplayer quits). Here is an example on the NASA HDEV channel. Does the same on any other UHS stream/channel (tried NASATV / Leolaporte)

pi@issabove ~/issabove $ livestreamer http://www.ustream.tv/channel/iss-hdev-payload best --player omxplayer --fifo -l debug [cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/iss-hdev-payload [plugin.ustreamtv][debug] Waiting for moduleInfo invoke [cli][info] Available streams: 240p, 240p_alt_fstl, 240p_alt_highwinds, 240p_alt_llnw, 360p, 360p_alt_fstl, 360p_alt_highwinds, 360p_alt_llnw, 480p, 480p_alt_fstl, 480p_alt_highwinds, 480p_alt_llnw, 720p+ (best), 720p+_alt_fstl, 720p+_alt_highwinds, 720p+_alt_llnw, mobile_240p (worst), mobile_360p, mobile_478p [cli][info] Opening stream: 720p+ (uhs) [stream.uhs][debug] Fetching module info [stream.uhs][debug] creating new connection. [stream.uhs][debug] There are 765 viewers. [stream.uhs][debug] Adding chunk 1441958019 to queue [cli][debug] Pre-buffering 8192 bytes [cli][info] Creating pipe livestreamerpipe-5153 [cli][info] Starting player: omxplayer [stream.uhs][debug] Download of chunk 1441958019 complete [cli][debug] Writing stream to output [stream.uhs][debug] Fetching module info [stream.uhs][debug] reusing existing connection. [stream.uhs][debug] Fetching module info [stream.uhs][debug] reusing existing connection. .......20 more lines like that..... Interrupted! Closing currently open stream... [stream.uhs][debug] Closing worker thread [stream.uhs][debug] Closing writer thread [stream.uhs][debug] There are 764 viewers. [stream.uhs][debug] Stream went offline

So for me at least (using this method of installing your update) it did not work.

I'm open to any other suggestions.

Thanks for all you help.

GaryBoone commented 8 years ago

Thanks liamkennedy and jthall for this thread. Finding it, and jthall's code improvements largely solved the instabilities I was seeing in trying to stream the ISS live stream.

  1. With the 'live' 1.12.2 version of livestream, it bombed often.
  2. I installed jthall's version using:

    $ sudo pip install -U git+https://github.com/jthall/livestreamer.git

  3. That installed, but I couldn't confirm whether I had the new code because livestreamer --version returned 1.12.2, the same as the main branch version. So then followed the "Development version (git)" instructions at http://docs.livestreamer.io/install.html#source-code. I modified the version string in src/livestreamer/init.py, then did "$ sudo python setup.py install". Now I could see the installed version with my hacked id. I mention this because it would be good to have a simple way to confirm we're on the jthall version...
  4. The jthall code was much more stable; the stream lasted much longer without bombing.
  5. The error I see now, occassionally, is:

    [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 873.0), (u'bitrate', 1529.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 480.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 516.0), (u'description', u'240p'), (u'bitrate', 650.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live6%_%.flv']), (u'videoCodec', u'H264'), (u'height', 284.0)])]), (u'hashes', [ScriptDataObject([(u'1440424696', u'562992962'), (u'1440424686', u'254213522')]), ScriptDataObject([(u'1440424696', u'562992962'), (u'1440424686', u'254213522')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4905.0), (u'offset', 160719.0), (u'chunkId', 1440424689.0)]), ScriptDataObject([(u'offsetInMs', 5098.0), (u'offset', 11742.0), (u'chunkId', 1440424688.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 873.0), (u'bitrate', 1529.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 480.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 516.0), (u'description', u'240p'), (u'bitrate', 650.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live6%_%.flv']), (u'videoCodec', u'H264'), (u'height', 284.0)])]), (u'hashes', [ScriptDataObject([(u'1440424696', u'562992962'), (u'1440424686', u'254213522')]), ScriptDataObject([(u'1440424696', u'562992962'), (u'1440424686', u'254213522')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs15/streams/httpflv/ustreamVideo/9408562/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4905.0), (u'offset', 160719.0), (u'chunkId', 1440424689.0)]), ScriptDataObject([(u'offsetInMs', 5098.0), (u'offset', 11742.0), (u'chunkId', 1440424688.0)])])]) does not equal 'offline'

    That error does not kill the program; the livestream continues and eventually works.

  6. I also occasionally see this error repeated:

    [stream.uhs][error] Failed to open chunk 1441939047: Unable to open URL: http://uhs-live-default.ustream.tv/sjc-uhs36/streams/httpflv/ustreamVideo/9408562/streams/live_1_1441939047_747152206.flv (404 Client Error: Not Found)

    which sounds like a network error. It also doesn't kill the program.

Thanks again for your improvements, jthall!

ErAzOr2k commented 8 years ago

Output from debug log:

2015-09-13 15:13:22.241 spawn: [cli][info] Found matching plugin ustreamtv for URL ustream.tv/channel/nasa-educational 2015-09-13 15:13:23.707 spawn: [plugin.ustreamtv][debug] Waiting for moduleInfo invoke 2015-09-13 15:13:28.371 spawn: [cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst) 2015-09-13 15:13:28.371 spawn: [cli][info] Opening stream: 720p+ (uhs) 2015-09-13 15:13:28.372 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:28.372 spawn: [stream.uhs][debug] creating new connection. 2015-09-13 15:13:29.602 spawn: [stream.uhs][debug] Adding chunk 1441979719 to queue 2015-09-13 15:13:29.603 spawn: [cli][debug] Pre-buffering 8192 bytes 2015-09-13 15:13:31.082 spawn: [cli][debug] Writing stream to output 2015-09-13 15:13:31.235 spawn: [stream.uhs][debug] Download of chunk 1441979719 complete 2015-09-13 15:13:31.607 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:31.607 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:31.608 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:31.608 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:34.085 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:34.085 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:34.086 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:34.086 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:39.467 spawn: [stream.uhs][debug] Adding chunk 1441979720 to queue 2015-09-13 15:13:39.468 spawn: [stream.uhs][debug] Adding chunk 1441979721 to queue 2015-09-13 15:13:41.356 spawn: [stream.uhs][debug] Download of chunk 1441979720 complete 2015-09-13 15:13:41.467 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:41.467 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:42.295 spawn: [stream.uhs][debug] Download of chunk 1441979721 complete 2015-09-13 15:14:09.548 spawn: [stream.uhs][debug] Adding chunk 1441979722 to queue 2015-09-13 15:14:09.552 spawn: [stream.uhs][debug] Adding chunk 1441979723 to queue 2015-09-13 15:14:09.552 spawn: [stream.uhs][debug] Adding chunk 1441979724 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979725 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979726 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979727 to queue 2015-09-13 15:14:11.554 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:11.554 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:12.310 spawn: [stream.uhs][debug] Download of chunk 1441979722 complete 2015-09-13 15:14:13.726 spawn: [stream.uhs][debug] Download of chunk 1441979723 complete 2015-09-13 15:14:14.944 spawn: [stream.uhs][debug] Download of chunk 1441979724 complete 2015-09-13 15:14:16.097 spawn: [stream.uhs][debug] Download of chunk 1441979725 complete 2015-09-13 15:14:17.005 spawn: [stream.uhs][debug] Download of chunk 1441979726 complete 2015-09-13 15:14:17.882 spawn: [stream.uhs][debug] Download of chunk 1441979727 complete 2015-09-13 15:14:29.529 spawn: [stream.uhs][debug] Adding chunk 1441979728 to queue 2015-09-13 15:14:29.532 spawn: [stream.uhs][debug] Adding chunk 1441979729 to queue 2015-09-13 15:14:29.533 spawn: [stream.uhs][debug] Adding chunk 1441979730 to queue 2015-09-13 15:14:29.533 spawn: [stream.uhs][debug] Adding chunk 1441979731 to queue 2015-09-13 15:14:31.293 spawn: [stream.uhs][debug] Download of chunk 1441979728 complete 2015-09-13 15:14:31.534 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:31.534 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:32.509 spawn: [stream.uhs][debug] Download of chunk 1441979729 complete 2015-09-13 15:14:33.800 spawn: [stream.uhs][debug] Download of chunk 1441979730 complete 2015-09-13 15:14:35.005 spawn: [stream.uhs][debug] Download of chunk 1441979731 complete 2015-09-13 15:14:49.379 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-13 15:14:51.379 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:51.379 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:59.614 spawn: [stream.uhs][debug] Adding chunk 1441979732 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979733 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979734 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979735 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979736 to queue 2015-09-13 15:14:59.618 spawn: [stream.uhs][debug] Adding chunk 1441979737 to queue 2015-09-13 15:15:01.616 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:01.616 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:02.359 spawn: [stream.uhs][debug] Download of chunk 1441979732 complete 2015-09-13 15:15:03.414 spawn: [stream.uhs][debug] Download of chunk 1441979733 complete 2015-09-13 15:15:04.548 spawn: [stream.uhs][debug] Download of chunk 1441979734 complete 2015-09-13 15:15:05.518 spawn: [stream.uhs][debug] Download of chunk 1441979735 complete 2015-09-13 15:15:06.430 spawn: [stream.uhs][debug] Download of chunk 1441979736 complete 2015-09-13 15:15:07.560 spawn: [stream.uhs][debug] Download of chunk 1441979737 complete 2015-09-13 15:15:19.637 spawn: [stream.uhs][debug] Adding chunk 1441979738 to queue 2015-09-13 15:15:19.641 spawn: [stream.uhs][debug] Adding chunk 1441979739 to queue 2015-09-13 15:15:19.641 spawn: [stream.uhs][debug] Adding chunk 1441979740 to queue 2015-09-13 15:15:19.642 spawn: [stream.uhs][debug] Adding chunk 1441979741 to queue 2015-09-13 15:15:21.643 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:21.644 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:21.699 spawn: [stream.uhs][debug] Download of chunk 1441979738 complete 2015-09-13 15:15:22.741 spawn: [stream.uhs][debug] Download of chunk 1441979739 complete 2015-09-13 15:15:23.718 spawn: [stream.uhs][debug] Download of chunk 1441979740 complete 2015-09-13 15:15:24.741 spawn: [stream.uhs][debug] Download of chunk 1441979741 complete 2015-09-13 15:15:37.431 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:37.431 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:49.393 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-13 15:15:51.394 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:51.394 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:51.401 spawn: [stream.uhs][debug] Adding chunk 1441979742 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979743 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979744 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979745 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979746 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979747 to queue 2015-09-13 15:15:53.402 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:53.402 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:53.403 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:53.403 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:55.129 spawn: [stream.uhs][debug] Download of chunk 1441979742 complete 2015-09-13 15:15:56.268 spawn: [stream.uhs][debug] Download of chunk 1441979743 complete 2015-09-13 15:15:57.429 spawn: [stream.uhs][debug] Download of chunk 1441979744 complete 2015-09-13 15:15:58.289 spawn: [stream.uhs][debug] Download of chunk 1441979745 complete 2015-09-13 15:15:59.531 spawn: [stream.uhs][debug] Download of chunk 1441979746 complete 2015-09-13 15:16:00.609 spawn: [stream.uhs][debug] Download of chunk 1441979747 complete 2015-09-13 15:16:09.397 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout

jthall commented 8 years ago

error #5 is a template problem that I have seen only once and should cause livestreamer to exit. The fact that it does not exit is an indication the new module info while loop is too aggressive in keeping itself running.

error #6 is probably a bandwidth() call not being processed, i.e. we do not send them and so the module info call comes too infrequently. That means we are either attempting to prefetch a chunk too early, (in the future) or too late (chunk rolled off the available chunks)

The reason the code is working more stabily now is a bit of a hack. Basically the logic says if you were told you could take chunks 50 - 55, then 60 - 70, the app will go ahead and try to fetch 55-60 even though that is outside the bounds of what the app was told it could fetch. The module info call basically gives a range of available chunks and what the "active" chunk is. You can't prefetch between the "active" and "end of avails" window because that is apparently in the future, you regularly get 404s if you try that. You can get "stale" chunks that are older than the start of the avails window. At one time I intended to implement the bandwidth() function to just tell the ustream servers we want 1.5m or whatever the flash version sends (I don't remember off the top of my head) but the servers may require RTMPv3 towards the server (currently livestreamer can receive an RTMPv3 payload, but not generate one)

When you set the bandwidth properly, you get the module info calls from the server more often, so you don't have problems with stale chunks. The app is only told about new chunks when it gets a module info message from the server. If the app is told more often that new chunks are available, it never is trying to retrieve chunks outside the avails window.

I don't know if I will have tons of time to look at this this week, but maybe the servers will take v0 objects instead of requiring v3 objects.

On 9/13/15, ErAzOr2k notifications@github.com wrote:

Output from debug log:

2015-09-13 15:13:22.241 spawn: [cli][info] Found matching plugin ustreamtv for URL ustream.tv/channel/nasa-educational 2015-09-13 15:13:23.707 spawn: [plugin.ustreamtv][debug] Waiting for moduleInfo invoke 2015-09-13 15:13:28.371 spawn: [cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst) 2015-09-13 15:13:28.371 spawn: [cli][info] Opening stream: 720p+ (uhs) 2015-09-13 15:13:28.372 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:28.372 spawn: [stream.uhs][debug] creating new connection. 2015-09-13 15:13:29.602 spawn: [stream.uhs][debug] Adding chunk 1441979719 to queue 2015-09-13 15:13:29.603 spawn: [cli][debug] Pre-buffering 8192 bytes 2015-09-13 15:13:31.082 spawn: [cli][debug] Writing stream to output 2015-09-13 15:13:31.235 spawn: [stream.uhs][debug] Download of chunk 1441979719 complete 2015-09-13 15:13:31.607 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:31.607 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:31.608 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:31.608 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:34.085 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:34.085 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:34.086 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:34.086 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:39.467 spawn: [stream.uhs][debug] Adding chunk 1441979720 to queue 2015-09-13 15:13:39.468 spawn: [stream.uhs][debug] Adding chunk 1441979721 to queue 2015-09-13 15:13:41.356 spawn: [stream.uhs][debug] Download of chunk 1441979720 complete 2015-09-13 15:13:41.467 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:13:41.467 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:13:42.295 spawn: [stream.uhs][debug] Download of chunk 1441979721 complete 2015-09-13 15:14:09.548 spawn: [stream.uhs][debug] Adding chunk 1441979722 to queue 2015-09-13 15:14:09.552 spawn: [stream.uhs][debug] Adding chunk 1441979723 to queue 2015-09-13 15:14:09.552 spawn: [stream.uhs][debug] Adding chunk 1441979724 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979725 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979726 to queue 2015-09-13 15:14:09.553 spawn: [stream.uhs][debug] Adding chunk 1441979727 to queue 2015-09-13 15:14:11.554 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:11.554 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:12.310 spawn: [stream.uhs][debug] Download of chunk 1441979722 complete 2015-09-13 15:14:13.726 spawn: [stream.uhs][debug] Download of chunk 1441979723 complete 2015-09-13 15:14:14.944 spawn: [stream.uhs][debug] Download of chunk 1441979724 complete 2015-09-13 15:14:16.097 spawn: [stream.uhs][debug] Download of chunk 1441979725 complete 2015-09-13 15:14:17.005 spawn: [stream.uhs][debug] Download of chunk 1441979726 complete 2015-09-13 15:14:17.882 spawn: [stream.uhs][debug] Download of chunk 1441979727 complete 2015-09-13 15:14:29.529 spawn: [stream.uhs][debug] Adding chunk 1441979728 to queue 2015-09-13 15:14:29.532 spawn: [stream.uhs][debug] Adding chunk 1441979729 to queue 2015-09-13 15:14:29.533 spawn: [stream.uhs][debug] Adding chunk 1441979730 to queue 2015-09-13 15:14:29.533 spawn: [stream.uhs][debug] Adding chunk 1441979731 to queue 2015-09-13 15:14:31.293 spawn: [stream.uhs][debug] Download of chunk 1441979728 complete 2015-09-13 15:14:31.534 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:31.534 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:32.509 spawn: [stream.uhs][debug] Download of chunk 1441979729 complete 2015-09-13 15:14:33.800 spawn: [stream.uhs][debug] Download of chunk 1441979730 complete 2015-09-13 15:14:35.005 spawn: [stream.uhs][debug] Download of chunk 1441979731 complete 2015-09-13 15:14:49.379 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-13 15:14:51.379 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:14:51.379 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:14:59.614 spawn: [stream.uhs][debug] Adding chunk 1441979732 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979733 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979734 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979735 to queue 2015-09-13 15:14:59.615 spawn: [stream.uhs][debug] Adding chunk 1441979736 to queue 2015-09-13 15:14:59.618 spawn: [stream.uhs][debug] Adding chunk 1441979737 to queue 2015-09-13 15:15:01.616 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:01.616 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:02.359 spawn: [stream.uhs][debug] Download of chunk 1441979732 complete 2015-09-13 15:15:03.414 spawn: [stream.uhs][debug] Download of chunk 1441979733 complete 2015-09-13 15:15:04.548 spawn: [stream.uhs][debug] Download of chunk 1441979734 complete 2015-09-13 15:15:05.518 spawn: [stream.uhs][debug] Download of chunk 1441979735 complete 2015-09-13 15:15:06.430 spawn: [stream.uhs][debug] Download of chunk 1441979736 complete 2015-09-13 15:15:07.560 spawn: [stream.uhs][debug] Download of chunk 1441979737 complete 2015-09-13 15:15:19.637 spawn: [stream.uhs][debug] Adding chunk 1441979738 to queue 2015-09-13 15:15:19.641 spawn: [stream.uhs][debug] Adding chunk 1441979739 to queue 2015-09-13 15:15:19.641 spawn: [stream.uhs][debug] Adding chunk 1441979740 to queue 2015-09-13 15:15:19.642 spawn: [stream.uhs][debug] Adding chunk 1441979741 to queue 2015-09-13 15:15:21.643 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:21.644 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:21.699 spawn: [stream.uhs][debug] Download of chunk 1441979738 complete 2015-09-13 15:15:22.741 spawn: [stream.uhs][debug] Download of chunk 1441979739 complete 2015-09-13 15:15:23.718 spawn: [stream.uhs][debug] Download of chunk 1441979740 complete 2015-09-13 15:15:24.741 spawn: [stream.uhs][debug] Download of chunk 1441979741 complete 2015-09-13 15:15:37.431 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:37.431 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:49.393 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout 2015-09-13 15:15:51.394 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:51.394 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:51.401 spawn: [stream.uhs][debug] Adding chunk 1441979742 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979743 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979744 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979745 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979746 to queue 2015-09-13 15:15:51.402 spawn: [stream.uhs][debug] Adding chunk 1441979747 to queue 2015-09-13 15:15:53.402 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:53.402 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:53.403 spawn: [stream.uhs][debug] Fetching module info 2015-09-13 15:15:53.403 spawn: [stream.uhs][debug] reusing existing connection. 2015-09-13 15:15:55.129 spawn: [stream.uhs][debug] Download of chunk 1441979742 complete 2015-09-13 15:15:56.268 spawn: [stream.uhs][debug] Download of chunk 1441979743 complete 2015-09-13 15:15:57.429 spawn: [stream.uhs][debug] Download of chunk 1441979744 complete 2015-09-13 15:15:58.289 spawn: [stream.uhs][debug] Download of chunk 1441979745 complete 2015-09-13 15:15:59.531 spawn: [stream.uhs][debug] Download of chunk 1441979746 complete 2015-09-13 15:16:00.609 spawn: [stream.uhs][debug] Download of chunk 1441979747 complete 2015-09-13 15:16:09.397 spawn: [stream.uhs][warning] Failed to process module info: Failed to get module info: Timeout


Reply to this email directly or view it on GitHub: https://github.com/chrippa/livestreamer/issues/860#issuecomment-139873310

GaryBoone commented 8 years ago

With more experimenting, I've created a reliable ustream on my Raspberry Pi. I'm using omxplayer with livestreamer. The change that appears to have the most stabilizing effect has been to add --live as a argument to omxplayer.

That done, I tried switching back to the released version of livestreamer 1.12.2. That version seems to stay in closer sync to a web browser view of ustream on another machine. The jthall version appears to drift farther behind over time. Could it be that the changes to pull more chunks increases the latency between the client and server 'current' views?

liamkennedy commented 8 years ago

Oh wow. I've never even noticed that parameter existed. Trying this out RIGHT NOW. I will be jumping for joy if it's that easy.

jthall commented 8 years ago

hmm maybe the reason my version seems to slow down is that if the moduleinfo calls come late and so we backfill fetching, but then play out in real-time, since the player is playing all chunks in real-time, it is possible it will be behind because it doesn't "skip" chunks like the official version does. How far behind does it get over a period of time? It could catch up if module info calls are late, but then it wants to play all the "back" or missing video. This means the artificial delay imposed by ustream for us would make the player fall further and further behind. The only way you could stay current is if you did not have a real-time component forcing playback at a constant rate.

so to make this simpler, let's say you get 10 seconds of good video, then ustream throttles and you have to wait 5 extra seconds before you are notified new video is available. Now if you get another 10 seconds of video, that 10 seconds will play out 5 seconds late. Each time there is an artificial delay, the player is "catching up", but new video is presented to it at faster-than-real-time because the livestreamer process is cheating and trying to scarf up old stale chunks before they disappear from the CDN. The net.effect is that any artificially-introduced delay from ustream will slow down a real-time player forever until either the viewer can process video at faster-than-real-time rates or gives up.

So it appears we currently have two choices--either to watch with the official livestreamer and sortta keep up with real-time but have damaged video and missing chunks, or use my player and slowly drift behind over time until we overflow the input buffer of the player and drop a lot of video.

Admittedly I spent more time working with archiving instead of live video. Either the bandwidth command makes ustream deliver chunks more on-time or there's something else we're missing. I'm not going to have much time over the next couple weeks to dig deeper into this, but I do hope to get back around to looking at it again.

On 10/3/15, liamkennedy notifications@github.com wrote:

Oh wow. I've never even noticed that parameter existed. Trying this out RIGHT NOW. I will be jumping for joy if it's that easy.


Reply to this email directly or view it on GitHub: https://github.com/chrippa/livestreamer/issues/860#issuecomment-145306960

liamkennedy commented 8 years ago

@GaryBoone I'm not seeing any more stability with 1.12.2 and the --live parameter switch when viewing UHS streams. In particular the NASA HDEV stream (which is the only one I'm really needing to work). on "best" (720p+) it continues to freeze and eventually abort.

I am using the latest version of Raspbian and firmware / omxplayer for the Pi - running on a Model 2 B - also on a B+ and an original B.

Are you using any other parameters for omxplayer or livestreamer?

www2000 commented 8 years ago

Hi i have download the lates version for livestreamer (of todays git). And after 8-9 minuts of streaming where at 40 sec from the start hangs for +/-10 sec and hangs form 7min crash at 8-10min from start. Here is my console output:

$ livestreamer --stream-segment-threads 10 www.ustream.tv/nasahdtv 720p+ [cli][info] Found matching plugin ustreamtv for URL www.ustream.tv/nasahdtv [cli][info] Available streams: 240p, 240p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst) [cli][info] Opening stream: 720p+ (uhs) [cli][info] Starting player: /usr/bin/vlc [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 1893.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 600.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585689', u'1981352183'), (u'1443585679', u'1745284122')]), ScriptDataObject([(u'1443585689', u'1981352183'), (u'1443585679', u'1745284122')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4971.0), (u'offset', 395408.0), (u'chunkId', 1443585682.0)]), ScriptDataObject([(u'offsetInMs', 5000.0), (u'offset', 58882.0), (u'chunkId', 1443585681.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 1893.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 600.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585689', u'1981352183'), (u'1443585679', u'1745284122')]), ScriptDataObject([(u'1443585689', u'1981352183'), (u'1443585679', u'1745284122')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4971.0), (u'offset', 395408.0), (u'chunkId', 1443585682.0)]), ScriptDataObject([(u'offsetInMs', 5000.0), (u'offset', 58882.0), (u'chunkId', 1443585681.0)])])]) does not equal 'offline' [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2328.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 488.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 5001.0), (u'offset', 466209.0), (u'chunkId', 1443585702.0)]), ScriptDataObject([(u'offsetInMs', 4932.0), (u'offset', 69187.0), (u'chunkId', 1443585701.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2328.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 488.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 5001.0), (u'offset', 466209.0), (u'chunkId', 1443585702.0)]), ScriptDataObject([(u'offsetInMs', 4932.0), (u'offset', 69187.0), (u'chunkId', 1443585701.0)])])]) does not equal 'offline' [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2045.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 630.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4965.0), (u'offset', 417572.0), (u'chunkId', 1443585706.0)]), ScriptDataObject([(u'offsetInMs', 4968.0), (u'offset', 64641.0), (u'chunkId', 1443585705.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2045.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 630.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585699', u'53131993')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4965.0), (u'offset', 417572.0), (u'chunkId', 1443585706.0)]), ScriptDataObject([(u'offsetInMs', 4968.0), (u'offset', 64641.0), (u'chunkId', 1443585705.0)])])]) does not equal 'offline' [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2342.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 617.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4954.0), (u'offset', 342961.0), (u'chunkId', 1443585712.0)]), ScriptDataObject([(u'offsetInMs', 5032.0), (u'offset', 68483.0), (u'chunkId', 1443585711.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2342.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 617.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 4954.0), (u'offset', 342961.0), (u'chunkId', 1443585712.0)]), ScriptDataObject([(u'offsetInMs', 5032.0), (u'offset', 68483.0), (u'chunkId', 1443585711.0)])])]) does not equal 'offline' [stream.uhs][error] Unable to validate module info: Unable to validate key 'stream': Unable to validate result: Type of u'streams' should be 'int' but is 'unicode' or Type of ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2055.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 687.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 5064.0), (u'offset', 459442.0), (u'chunkId', 1443585716.0)]), ScriptDataObject([(u'offsetInMs', 5023.0), (u'offset', 62321.0), (u'chunkId', 1443585715.0)])])]) should be 'list' but is 'ScriptDataObject' or ScriptDataObject([(u'streams', [ScriptDataObject([(u'chunkTime', 5000.0), (u'width', 1280.0), (u'bitrate', 2055.0), (u'counter', -1.0), (u'streamName', [u'streams/live1%_%.flv']), (u'videoCodec', u'H264'), (u'height', 720.0)]), ScriptDataObject([(u'resolutionFromPreset', u'240p'), (u'chunkTime', 5000.0), (u'isTranscoded', True), (u'width', 426.0), (u'description', u'240p'), (u'bitrate', 687.0), (u'preset', u'viewer_240p'), (u'streamName', [u'streams/live3%_%.flv']), (u'videoCodec', u'H264'), (u'height', 240.0)])]), (u'hashes', [ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')]), ScriptDataObject([(u'1443585709', u'1617250300'), (u'1443585719', u'577641196')])]), (u'providers', [ScriptDataObject([(u'name', u'uhs_tcdn'), (u'url', u'http://uhs-live-default.ustream.tv/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')]), ScriptDataObject([(u'varnishUrl', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/'), (u'name', u'uhs_akamai'), (u'url', u'http://uhs-akamai.ustream.tv/sjc/sjc-uhs21/streams/httpflv/ustreamVideo/6540154/')])]), (u'keyframe', [ScriptDataObject([(u'offsetInMs', 5064.0), (u'offset', 459442.0), (u'chunkId', 1443585716.0)]), ScriptDataObject([(u'offsetInMs', 5023.0), (u'offset', 62321.0), (u'chunkId', 1443585715.0)])])]) does not equal 'offline' [cli][error] Error when reading from stream: Read timeout [cli][info] Stream ended