Skip to content
This repository was archived by the owner on Feb 28, 2018. It is now read-only.

Plex: unable to tune to channel #4

Open
7 tasks done
petrmenzel opened this issue Jan 29, 2018 · 12 comments
Open
7 tasks done

Plex: unable to tune to channel #4

petrmenzel opened this issue Jan 29, 2018 · 12 comments
Labels
bug Something isn't working
Milestone

Comments

@petrmenzel
Copy link

petrmenzel commented Jan 29, 2018

I have stuck on this:

non-standard import "github.com/golang/glog" in standard package "muxy/muxy"

/usr/lib/go-1.9/src/github.com/muxy$ make
GOARCH=amd64 CGO_ENALED=0 go build -ldflags="-w -s" -o "muxyProxy"
/usr/lib/go-1.9/src/muxy/muxy/endpoint.go:8:2: non-standard import "github.com/golang/glog" in standard package "muxy/muxy"
makefile:9: recipe for target 'build' failed
make: *** [build] Error 1

As I found from Go version 1.8 I do not need set up GoRoot and GoPath. I know that it is problem that I do not know how "go" works. But can you give me a little bit direction how to build this awesome tool? :-)

Machine: Ubuntu 16.04.3 LTS

I have done this:

  • install golang-go # For now 1.9.2 version.
  • install automake
  • clone here /usr/lib/go-1.9/src/github.com/gorilla/mux/...
  • clone here /usr/lib/go-1.9/src/github.com/grafov/m3u8/...
  • clone here /usr/lib/go-1.9/src/github.com/golang/glog/...
  • clone here /usr/lib/go-1.9/src/github.com/muxy/muxy/...
  • go to the muxy root and use command make But I have received error above.

Thx you very much

@petrmenzel
Copy link
Author

petrmenzel commented Jan 31, 2018

So there was problem with GoRoot and GoPath. It is solved now.

  1. I was able to compile the app.
  2. The app is able to take my local m3u file and give it for Plex.
  3. I am able to add this virtual tuner to the Plex.
  4. I can proceed the process, find channels etc.
  5. But video cannot be play. / M3U file is working (tested on IPTV.bundle).

unable to tune channel

tv tunner

@hazcod
Copy link
Owner

hazcod commented Jan 31, 2018

Hi, glad it's compiling now. What did you do to your GOROOT and GOPATH?

I must admit this project is still in development, so it still does not work completely with Plex & I need to figure out why.
For debugging, try accessing http://localhost:8080/lineup.json in your browser and try opening one of the stream URLs. (e.g. http://localhost:8080/stream/xxxxxxxxx)

@hazcod hazcod changed the title non-standard import "github.com/golang/glog" in standard package "muxy/muxy" Plex: unable to tune to channel Jan 31, 2018
@hazcod hazcod added the bug Something isn't working label Jan 31, 2018
@hazcod hazcod added this to the 1.0 milestone Jan 31, 2018
@petrmenzel
Copy link
Author

petrmenzel commented Jan 31, 2018

Could be problem, that I have changed inputs (in main.go)?

  • Port 8080 (used by qBittorrent) to 8880
  • If I let "localhost" it show another IP than real local. So I have added my local IP of server 192.168.1.200
    Another differences from you setup:
  • Could be problem that I am using .m3u instead of .m3u8?
  • Could be problem that my .m3u file is every 24 h generated and overwritten by script?

My step by step installing and using.

# Install programs.
sudo apt-get install golang-go
sudo apt-get install automake
# Set paths.
export GOPATH=/home/myusername/go
export GOROOT=/usr/lib/go-1.9
# Install aditional packages.
sudo go get github.com/gorilla/mux # Is downloaded to /home/myusername/go/src/github.com.
sudo go get github.com/grafov/m3u8 # Is downloaded to /home/myusername/go/src/github.com.
sudo go get github.com/golang/glog # Is downloaded to /home/myusername/go/src/github.com.
cd /usr/lib/go-1.9/github.com
https://github.com/hazcod/muxy
git clone https://github.com/hazcod/muxy # It will be located in /usr/lib/go-1.9/github.com.
cd muxy
sudo make
./muxyProxy http://urlpathto.m3u8 # Set URL to .m3u8 file.
./muxyProxy '/local/path/to/.m3u' # Set path to .m3u8 file.

Useful command to check that you have correctly set GoPath and GoRoot: go env

@petrmenzel
Copy link
Author

petrmenzel commented Jan 31, 2018

I have run the ./muxyProxy

Added to my browser http://192.168.1.200:8880/lineup.json --> get list of something like this:
[{"GuideName":"T1","GuideNumber":"0.0","URL":"http://192.168.1.200:8880/stream/VERYLONGHASH=="}, {next channel}, {...}, {...}]

  • "GuideName":"T1" --> Could be "GuideName":"ČT1" --> utf-8 support is missing
  • http://192.168.1.200:8880/stream/VERYLONGHASH== run nothing in Google Chrome HTTP ERROR 500

@petrmenzel
Copy link
Author

in bash:
/Resources/playlist.m3u' E0131 13:07:33.551519 32219 streamer.go:40] Could not fetch channel playlist: Could not get channel playlist: unknown m3u type: E0131 13:07:33.653300 32219 streamer.go:40] Could not fetch channel playlist: Could not get channel playlist: unknown m3u type: E0131 13:07:33.784305 32219 streamer.go:40] Could not fetch channel playlist: Could not get channel playlist: unknown m3u type:

So the error could be this:
unknown m3u type

@hazcod
Copy link
Owner

hazcod commented Jan 31, 2018

That's because the parser only accepts m3u8 files, do you have the possibility to get a m3u8 instead of m3u?

@petrmenzel
Copy link
Author

I will try change output extension from script from .m3u to .m3u8 and I will see.

@petrmenzel
Copy link
Author

petrmenzel commented Jan 31, 2018

I was able to generate m3u8 file. But still "unknown type". Could you send me example of your working .m3u8 structure of the file? Thx you very much.

My structure:

#EXTM3U
#EXTINF:0 tvg-id="ct1hd" tvg-name="ČT1" tvg-logo="ct1hd.png" group-title="General",ČT1
http://media.kuki.cz:8116/ct1hd/stream.m3u8?type=live&sign=hash&expires=1517454001

@hazcod
Copy link
Owner

hazcod commented Jan 31, 2018

Afraid not, I have a m3u8 for my paid subscription.

@petrmenzel
Copy link
Author

Me too, but I need only structure to try make same.

@petrmenzel
Copy link
Author

I have minimalized the M3U8 file to this format:

#EXTM3U8
#EXTINF:0,CT1
url_of_the_stream
#EXTINF:0,CT2
url_of_the_stream
#EXTINF:0,CT24
url_of_the_stream

console log after tried to play in VLC

I0131 15:39:59.001144    5736 endpoint.go:119] 192.168.1.2:5639 GET /stream/aHR0cDovL21lZGlhLmt1a2kuY3o6ODExNi9jdDFoZC9zdHJlYW0ubTN1OD90eXBlPWxpdmUmc2lnbj03OFVUckNGeWNoR1JuV0htcm9xd3l3JmV4cGlyZXM9MTUxNzQ4ODA2Ng
E0131 15:39:59.001219    5736 endpoint.go:47] Could not decode stream URI: aHR0cDovL21lZGlhLmt1a2kuY3o6ODExNi9jdDFoZC9zdHJlYW0ubTN1OD90eXBlPWxpdmUmc2lnbj03OFVUckNGeWNoR1JuV0htcm9xd3l3JmV4cGlyZXM9MTUxNzQ4ODA2Ng
I0131 15:39:59.001238    5736 endpoint.go:14] Sending errorcode: 500

@petrmenzel
Copy link
Author

petrmenzel commented Jan 31, 2018

There will be problem with the type of the stream url. But not with the m3u8 structure.
The app works for .M3U8 same as for .M3U.

Correct structure for IPTV for MUXY should be this (nothing more):

#EXTINF:-1,channel_name_1
url_of_the_stream_1
#EXTINF:-1,channel_name_2
url_of_the_stream_2
#EXTINF:-1,channel_name_X
url_of_the_stream_X

I have tried public .m3u where are links in this types url_to_strem.ts but my type is stream.m3u8?type=live&sign=hash&expires=1517488066

I have also tested that the app works in same way for LOCAL stored .m3u and for URL stored .m3u.

Both of them url_to_strem.ts and stream.m3u8?type=live&sign=hash&expires=1517488066 work perfectly in VLC.

But after converting by app to the http://ip_adress:port/stream/long_hash happens this:

  • stream.m3u8?type=live&sign=hash&expires=1517488066unknown m3u type (Does not play anything in the VLC)
  • url_to_strem.tsReading line error: EOF (But in the VLC I can hear some "noise".)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants