NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 … 5 6 7 8 9 Next »
Extra Device v. IPTV Device for a Network Based Encoder

 
  • 0 Vote(s) - 0 Average
Extra Device v. IPTV Device for a Network Based Encoder
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#1
2020-01-24, 04:34 AM
I've been poking around at other posts trying to figure out what the best option is to add my network based encoder as a device.

The network encoder currently produces an H265 stream with AC3 (stereo) audio at http://172.16.1.4/0.ts.  I use a custom python script to change channels, and I've confirmed that is working in the Docker container.  To change channels you do python3 /config/scripts/iguana-blaster/execute.py -c {channel}.  This combination works as an IPTV device in NPVR4, and I thought about just leaving it that way.  But the IPTV device in NPVR5 only imports mu3 files, not the XML file I can export from NPVR4.  So that leaves me 2 options:

1- Figure out the format of the mu3 import file so I can import the channels and, ideally, the channel changer script.  I think this might not quite work, as I saw a post indicating that to add channel changing to NPVR5's IPTV device I would have to modify the database directly (which I can do if I have to, but is not my first choice).

2- Figure out the Extras format.  This feels like it should be easier since the encoder already provides a valid stream, but I can't figure out the format.  Other posts about Extra devices seem to be based on having to do a bunch of stuff to get a file that vlc or ffmpeg can convert into a transport stream, and I'm hoping I don't have to do that here.

Thanks.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,878
Threads: 954
Joined: May 2006
#2
2020-01-24, 04:47 AM
For this Extras device you would put this file in /config/extras-uray.xml

Code:
<extras>
  <channel name="{channel-name}">
    <command>bash</command>
    <args>-c "/config/scripts/uray.sh {channel}"</args>
  </channel>
</extras>

and this in /config/scripts/uray.sh (making sure it is executable)
Code:
#irblasting code
curl  http://172.16.1.4/0.ts
wait
exit $?

After that it acts just like an HDPVR in Windows v5

Why are you considering docker it could make blasting difficult?

Martin
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#3
2020-01-24, 05:07 AM
(2020-01-24, 04:47 AM)mvallevand Wrote: For this Extras device you would put this file in  /config/extras-uray.xml

Code:
<extras>
  <channel name="{channel-name}">
    <command>bash</command>
    <args>-c "/config/scripts/uray.sh {channel}"</args>
  </channel>
</extras>

and this in /config/scripts/uray.sh (making sure it is executable)
Code:
#irblasting code
curl  http://172.16.1.4/0.ts
wait
exit $?

After that it acts just like an HDPVR in Windows v5

Why are you considering docker it could make blasting difficult?

Martin

It's one part stubbornness and one part plans for new hardware.  I'm going to get a Synology NAS and would really like to run NPVR5 on it.  I could also build a Linux based NPVR5 box, but I'm trying to reduce the clutter some (and not spend extra on hardware for the NPVR5 box).  Thus the Docker image.  Today I wrote a websocket wrapper around my blaster script so it can run in client/server mode.  The Docker image runs the client and sends the channel request to the websocket server running on the machine that has the USB device in it.  For now that's on Windows, but I'll eventually move the blaster to a RPi I have laying around.  I basically now have a network based IR blaster to go with my network based encoder.

As it happens, this option let's me run Docker on my Mac and get NPVR completely configured before I transfer everything to the NAS (whenever I get it).  But really it became a programming problem to solve.  This probably isn't a solution anyone else would do or use, but it gave me something interesting to work on.
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#4
2020-01-24, 05:36 AM
And just to followup, that worked perfectly. Thanks. Running the Docker image on my Mac and Kodi on the same machine, I was able to change channels and watch the stream with absolutely no problem. Through the web browser the video struggled to keep up, but I expected that given the transcoding that happens to get it into the web browser. I will never use NPVR that way, so I don't really care.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#5
2020-01-24, 03:25 PM
(2020-01-24, 05:36 AM)pkscout Wrote: And just to followup, that worked perfectly.  Thanks.  Running the Docker image on my Mac and Kodi on the same machine, I was able to change channels and watch the stream with absolutely no problem.
Great!

Quote:Through the web browser the video struggled to keep up, but I expected that given the transcoding that happens to get it into the web browser.  I will never use NPVR that way, so I don't really care.
Is your encoder producing H.264 + AAC? If so, there is some logic in there where it'll try to avoid re-encoding to get the video into a format that can be played in the browser. I've mainly tested that with an IPTV source, but it should also work with an Extra source (if not the first time you watch a channel, then hopefully from the second watch of the channel ... where it knows a little bit more about the channel from that first attempt). This allows my Synology NAS to be able to stream video to my browser.
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#6
2020-01-24, 03:39 PM
(2020-01-24, 03:25 PM)sub Wrote:
(2020-01-24, 05:36 AM)pkscout Wrote: And just to followup, that worked perfectly.  Thanks.  Running the Docker image on my Mac and Kodi on the same machine, I was able to change channels and watch the stream with absolutely no problem.
Great!

Quote:Through the web browser the video struggled to keep up, but I expected that given the transcoding that happens to get it into the web browser.  I will never use NPVR that way, so I don't really care.
Is your encoder producing H.264 + AAC? If so, there is some logic in there where it'll try to avoid re-encoding to get the video into a format that can be played in the browser. I've mainly tested that with an IPTV source, but it should also work with an Extra source (if not the first time you watch a channel, then hopefully from the second watch of the channel ... where it knows a little bit more about the channel from that first attempt). This allows my Synology NAS to be able to stream video to my browser.

It can produce that, but I'm having it do H265 AC3 because that solves a problem I was having with one of my client devices (a Vero 4K+ running OSMC/Kodi). that device stutters with interlaced content (1080i) content that comes in H264 for some reason (they're trying to track it down), so I had to downscale the cable box to 720p to fix that.  With the new encoder H265 is fine at 1080i, so that's what I did.  And it's AC3 because my old soundbar doesn't know what to do with AAC in a video track apparently.  It's really not a big deal. I only even tried it as part of the testing to make sure NPVR was doing the video before I added Kodi to the mix.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,878
Threads: 954
Joined: May 2006
#7
2020-01-24, 03:40 PM
I'm trying to convince sub that we need an option to support mp3 in transcoding for sound bars.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#8
2020-01-24, 03:43 PM
(2020-01-24, 03:39 PM)pkscout Wrote: It can produce that, but I'm having it do H265 AC3 because that solves a problem I was having with one of my client devices (a Vero 4K+ running OSMC/Kodi). that device stutters with interlaced content (1080i) content that comes in H264 for some reason (they're trying to track it down), so I had to downscale the cable box to 720p to fix that. 
Ah, ok - that'd explain it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  IPTV streaming uses 100% CPU callumjk 2 1,001 2024-04-18, 05:11 PM
Last Post: sub
  Trouble with IPTV provider with frequently changing URLs chelseatv 3 1,769 2023-11-17, 02:33 PM
Last Post: mvallevand
  AMD64 based Docker Image with Python3 pkscout 20 6,801 2023-07-23, 04:15 PM
Last Post: pkscout
  IPTV repeat one? pewter_waggle 5 1,088 2023-03-25, 05:06 PM
Last Post: sub
  Adding multiple IPTV devices Khalimerot 21 3,828 2023-02-20, 11:13 AM
Last Post: Khalimerot
  Sat>IP device not accessible Connor 23 7,955 2022-10-25, 01:58 PM
Last Post: mvallevand
  IPTV only one stream can be recorded at a time rojerki 2 1,099 2022-05-22, 11:10 AM
Last Post: rojerki
  Unable to Add IPTV XMLTV (m3u works fine) add45 34 8,353 2021-05-25, 03:10 PM
Last Post: add45
  Device not showing in Synology docker irrits 4 2,126 2021-04-18, 07:24 AM
Last Post: irrits
  repeating sections of IPTV playback sstavross 10 4,050 2020-04-07, 10:13 AM
Last Post: sstavross

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode