OpenViX / HRTunerProxy

Setup Enigma2 to act as HR-Tuner Proxy
GNU General Public License v2.0
75 stars 26 forks source link

tunerports #40

Open Dosepower opened 5 years ago

Dosepower commented 5 years ago

Is it possible to change tuner Ports to the transcoding ports? so plex nas hasnt to handle Transcoding and the my in-net connection is not completly broken.

wivaku commented 4 years ago

Yes please! The VU+ box I use offers the transcoded stream on port 8002 (and the regular hi-res stream on port 8001).

wivaku commented 4 years ago

The hardcoded way of using the proxy stream: In getLineUp.py change the port from 8001 (hi-res) to 8002 (low-res proxy):

def createJSON(self, ip="0.0.0.0", port=8002, dvb_type="DVB-S"):

Of course it would be great if this can be selected by the Plex admin (similar to HDHomeRun Extend), or as config in the HRTunerProxy plugin on the STB device. Similar to how HDHomeRun can specify the quality / internal transcoder. https://support.plex.tv/articles/225877347-live-tv-dvr/

More important, using the proxy stream will create an issue with the aspect ratio. The 16:9 content is shown as stretched 4:3. In Plex you can -while watching a stream- change the Playback Settings > Quality. Default: Convert to 1080p HD (Maximum).

By setting it to Play Original Quality you get the correct aspect 16:9 ratio. But this needs to be done for every time a channel is selected / recorded.

Have not found an equivalent way to make that a permanent setting in Plex.
You can change remote / home streaming quality setting, but there is no play original quality setting. As a workaround I have disabled automatically adjust quality in Plex Settings > Quality.

image

image

image

image

steef84 commented 2 years ago

Is it possible to implement this? Would be great to let the transcoding be done on the enigma2 box.

EDIT; just downloaded the source files from HRTunerProxy on my enigma2 box so I could edit the getLineUp.py file.

Rebooted my E2 box. It seems not to start transcoding. Do I miss something?

Huevos commented 2 years ago

Probably broken syntax in the file.

steef84 commented 2 years ago

Well I should be clearer I guess.

Can add the tuner in PLEX, picture starts playing on my clients. But it seems to stream, not transcode. Only thing I changed is portnumber, as stated by @wivaku. Or am I wrong and I oversee something?

wivaku commented 2 years ago

Hoi Steef, not sure I understand. Both of the ports will result in a stream.
The original (:8001) is the original 1920x1080 resolution,
the transcoded one (:8002) is 720x480.

:8001

Stream #0:1[0x8fd]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x907](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x961](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:4[0x962](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:5[0x963](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)

:8002

Stream #0:0[0x11]: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 30 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x12]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s

BTW. It appears the transcoded stream results in the same (large) filesize as the original.

steef84 commented 2 years ago

Yes both ports give video. Port 8001 raw stream, 8002 transcoded stream. You seem right it doenst affect the filesize when using your fix. Downscaling filesize is just one important feature of transcoding, and making the stream better for transporting over the network

wivaku commented 2 years ago

I may have the solution for the filesize issue (which of course is not related to HRTunerProxy).
Transcoding bitrate and framerate can be set using OpenWebif: Settings > Transcoding Setup
Default is set to: bitrate 2000000 (2mbps) - not sure why it is set to such a high bitrate.
I have now set it to: 768000 (768kbps) - and have changed framerate from 30 to 25.

steef84 commented 2 years ago

Yes for me I downscaleded my options already in Openwebif. Somehow stream on port 8002 seams not to transcode. Would be nice to select port in HRTunerproxy settings. Much more easy.

neokicia commented 1 year ago

Is there any way to stream to another external network? HrTunerProxy is visible in my plex server, I can add bouquets with channels and epg but unfortunately when I try to start stream I get a message about a bad connection problem and a request to fix the antenna. Stream works fine on home network. Unfortunately, I cannot move the plex server to the location where the enigma2 tuner is located, so I would like to be able to stream to the other network via an external ip address. All ports on the router are forwarded.

Huevos commented 1 year ago

So if you expose the box to the public internet how are you going to stop people connecting to it?

neokicia commented 1 year ago

So if you expose the box to the public internet how are you going to stop people connecting to it?

I have some feature on my mikrotik. I had a few uninvited guests, but good firewall settings prevented it. Anyone tried to stream to Plex from an external LAN in hrtunerproxy?

Huevos commented 1 year ago

HRTunerProxy uses the SSDP protocol for discovery, which uses the IP 239.255.255.250, which is a local IP. For non-local clients that is going to be a problem. https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol

neokicia commented 1 year ago

So if you expose the box to the public internet how are you going to stop people connecting to it?

Only one ip address it can connect to my box.

Huevos commented 1 year ago

SSDP, all devices need to be on the same LAN.

neokicia commented 1 year ago

So it is not possible to change the configuration to work outside the local LAN?

Huevos commented 1 year ago

Yes it is possible, e.g. set up a VPN from your LAN and let your clients connect to it.

neokicia commented 1 year ago

I tried vpn but I couldn't manage the docker configuration in synology to make PleX work stably.