chrippa / livestreamer

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

Can Livestreamer play FFmpeg ? #931

Closed ian10951 closed 9 years ago

ian10951 commented 9 years ago

Hi Im trying to open a stream using Livestreamersrv and Livestreamer on an enigma2 box which I believe is FFmpeg

When the connection is made i get the 200 ok response,but then Livestreamersrv throws an exception of

exception no data when using httpstream

other times i get

exception read timeout when using hls

This is how I'm connecting

http://127.0.0.1:88/hls://http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.ts

any insight please ?

ian10951 commented 9 years ago

This is from my telnet window when using the debug livestreamersrv manualstart

localhost.localdomain - - [27/May/2015 12:24:10] "GET /hls://http://iptv.wssiptv .com:80/live/VIPWSS/OUEIjhuawoijasd/101.t HTTP/1.1" 200 - localhost.localdomain - - [27/May/2015 12:24:10] URL: hls://http://iptv.wssiptv. com:80/live/VIPWSS/OUEIjhuawoijasd/101.t Quality: best Streams: ['live', 'worst', 'best'] <HLSStream('http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t')> Got Exception: Read timeout

The same stream plays when using the enigma2 onboard gstreamer,but this is poor in comparison to your excellent livestreamer.

10mins commented 9 years ago

That is not a HLS stream.

ian10951 commented 9 years ago

Well Ive tried http and hlsvariant but using those cause a segfault,only using hls allows connection. So what stream type do you think it is ?

localhost.localdomain - - [27/May/2015 13:28:47] "GET /httpstream://http://iptv. wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t HTTP/1.1" 200 - localhost.localdomain - - [27/May/2015 13:28:47] URL: httpstream://http://iptv.w ssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t Quality: best Streams: ['live', 'worst', 'best'] <HTTPStream('http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t')> Got Exception: No Data!

http gives the exception no data

localhost.localdomain - - [27/May/2015 13:30:49] "GET /hlsvariant://http://iptv. wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t HTTP/1.1" 200 - localhost.localdomain - - [27/May/2015 13:30:49] URL: hlsvariant://http://iptv.w ssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.t Quality: best Got Exception: No Stream Found!

hlsvariant gives the above exception of no streams found

10mins commented 9 years ago

It's a normal 'transport stream' stream. VLC can play it just fine. I have no idea why httpstream:// does not work with it.

ian10951 commented 9 years ago

Yes this is why I asked about FFmpeg.

I believe it may need that,although I'm far from sure,but as you say its fine with VLC and Enigma2 Gstreamer. I just cannot get it to play using Livestreamer hence me asking the question why here, because Livestreamer is always my preferred choice when streaming any live content.

I thought perhaps there maybe another syntax that I'm unaware of ?

chrippa commented 9 years ago

The problem is that the server seems to have banned the User-Agent for the library we use to do HTTP connections (requests). A workaround is to use another User-Agent (or even empty).

Via the CLI:

livestreamer --http-header "User-Agent=" httpstream://http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd/101.ts

Via applications using the library (e.g. livestreamersrv) use this URL:

httpstream://http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd.ts headers={'User-Agent': ''}
ian10951 commented 9 years ago

Many thanks chrippa.

As usual your a star and provider excellent support for us simpletons.

All links to that server are now working through Livestreamer,so everything now remains in sync during playback (a major problem when using gstreamer)so all is now sorted.

Again thank you.

Ian.

ian10951 commented 9 years ago

Hi

Sorry to reopen this issue but can you tell me how to add player continuous http to this livestreamersrv line ?

httpstream://http://iptv.wssiptv.com:80/live/VIPWSS/OUEIjhuawoijasd.ts headers={'User-Agent': 'Android 4.0.4'}

because often the streams just stop and the only way to get them to play again is to exit and restart.

The above url is now dead,its just the principle that I need.

chrippa commented 9 years ago

Continuous HTTP is a feature in the commandline interface, it's not possible to use via the library. If you want such functionality you will have to add it to livestreamersrv.

ian10951 commented 9 years ago

ok thank you