jkaberg / tvhProxy

An small flask app to help Plex DVR connect with Tvheadend
Other
216 stars 107 forks source link

Does this app work? (tvhProxy without "tvh") #42

Open petrmenzel opened 6 years ago

petrmenzel commented 6 years ago

Hi, we have changed this app for our purpose. We do not need Tvheadend "tvh". But we need only virtual TV tuner filled by .m3u urls. So we deleted all connections with Tvheadend and added our working (tested in latest VLC player) urls from .m3u. But there is still problem with "Device not found. Ensure your device is powered on and connected to your network." #16 #21

device not found

Does this app work?

We have tried also antennas. But same issue.

Everything in log seems to be ok. But Plex DVR/TV does not work.

raptor75 commented 6 years ago

simple restart of plex after adding the tuner, will show it plus the number of tuners you configured

markrugman commented 6 years ago

App works for me, if I’ve got to this point then it works, however I do get the error but is still working.

hazcod commented 6 years ago

@petrmenzel FYI, I am doing the same in Go: https://github.com/hazcod/muxy

Edit: lots of problems, so not debugging any further for now.. telly might be a better choice.

jwrober commented 6 years ago

FWIW, I can only get tvhProxy working when run interactively from a command line. I get same error above when trying to run a daemon/service.

petrmenzel commented 6 years ago
@app.route('/lineup.json')
def lineup():
    lineup = [{
        'GuideNumber': '1234',
        'GuideName': 'HBO',
        'URL': 'http://url_to_the_stream.ts'
    }]

    return jsonify(lineup)

It would be fine to make some pull to automate this for easy use.

hazcod commented 6 years ago

@petrmenzel just use telly: https://github.com/tombowditch/telly

Good find about the max streams tough.

petrmenzel commented 6 years ago

Fist of all I have this structure of playlist.m3u 📁open⯈ program.m3u 📁open⯈ program_resolution.m3u 📁open⯈ 5_sec_long_video_changed_every_time.ts

It works nice in the VLC and it works in the IPTV.bundle. But I would like to use all features of the Plex and play it via tvhProxy (I prefer tvhProxy for the best stability).

Can someone explain me how it is possible that IPTV.bundle is able to play my playlist.m3u via Plex Player but it does not work if I give the same program.m3u from the file to the tvhProxy?

I am talking about the fragmented .ts stream. Via the tvhProxy you serve to the Plex TV 3 things: GuideNumber, GuideName, URL. I have noticed that IPTV.bundle deos similar things like the tvhProxy but it adds something more to the link. But I was not able to understand it correctly.

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10,
http://media.example.com/segment0.ts
#EXTINF:10,
http://media.example.com/segment1.ts
#EXTINF:10,
http://media.example.com/segment2.ts
#EXT-X-ENDLIST

Summary: I want to know what more I can serve to the Plex to be able play in the same way as IPTV.bundle my stream.

petrmenzel commented 6 years ago

@HazCod Telly cannot help me. It does same work as the tvhProxy. I need to investigate how is it possible that my playlist.m3u with fragmented 5_sec_long_video_changed_every_time.ts is playable with Plex Player via IPTV.bundle but is not playable with Plex Player via tvhProxy, Telly, Muxy etc. which serve the url stream program.m3u to Plex TV.

hazcod commented 6 years ago

Your playlist contain other playlists with rotating TS files instead of straight-foward TS files. Because they get rotated, the software reading it needs to support re-fetching the playlist and TS files.

For now, muxy/telly/tvhproxy do not support this. Plex does apparently.

petrmenzel commented 6 years ago

But question is how it works in IPTV.bundle, which do similar thing like muxy/telly/tvhProxy and is able to give Plex Player playable playlist.m3u?

hazcod commented 6 years ago

It works recursively, while we do not: https://github.com/Cigaras/IPTV.bundle/blob/master/Contents/Code/m3u_parser.py#L143

deanochips commented 6 years ago

"Device not found. Ensure your device is powered on and connected to your network." is being caused by no ssdp response which is being checked for since the latest plex version

DEBUG - DVR:Device: Testing grabber HDHomerun device device://tv.plex.grabbers.hdhomerun/12345678 at http://192.168.1.16:5004

DEBUG - DVR:Device: Device device://tv.plex.grabbers.hdhomerun/12345678 died

DEBUG - DVR:Grabber: Mystery discovered 0 compatible devices.`

i know this because i have been comparing responces between HRTunerProxy for engima2 boxes & tvhproxy

here is the change they made to stop errors https://github.com/OpenViX/HRTunerProxy/blob/master/plugin/ssdp.py