NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Extras v
1 2 3 4 Next »
HDHR-Flex template

 
  • 0 Vote(s) - 0 Average
HDHR-Flex template
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,845
Threads: 177
Joined: Aug 2016
#1
2024-11-09, 06:09 PM
I'm trying to get an HDHR EXTRA template to work and having trouble finding a variable to use for the channel number in the <args> line.

This is the bash command...
Code:
ffmpeg -re -v panic -i "$1" -vcodec copy -acodec copy -f mpegts -

And this is the EXTRA that I have currently
Code:
<?xml version='1.0' encoding='utf-8'?>
<extras title="HDHR Override">
  <channel number="{channel-number}" name="{channel-name}">
    <command>bash</command>
    <args>-c /var/opt/nextpvr/scripts/hdhrconnect/hdhrconnect.sh http://10.239.92.190:5004/tuner0/v{channel}</args>
  </channel>
</extras>

In the <args> line the {channel} variable shows up as 2 rather than 2.1 in the logs so the stream fails.

Is there a way to get the whole channel number as a variable to make this work?

I attached some logs if helpful.


Attached Files
.zip   logs-20241109-1207.zip (Size: 799.42 KB / Downloads: 0)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,927
Threads: 956
Joined: May 2006
#2
2024-11-09, 09:07 PM
I can't give you a template because the argument doesn't exist but if you want you can have multiple channels in an extra which I think this python script will generate for you. https://forums.nextpvr.com/showthread.ph...#pid551326

Martin
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,845
Threads: 177
Joined: Aug 2016
#3
2024-11-15, 07:21 PM (This post was last modified: 2024-11-15, 07:23 PM by VCR58.)
Depending on the client used I would like to choose the ffmpeg script to run. When the client is the browser for example I would run this script
Code:
ffmpeg -re -v panic -i "$1" -vcodec h264 -acodec acc -f mpegts -
.

When the client is the NVidia Shield I would run this script.
Code:
ffmpeg -re -v panic -i "$1" -vcodec copy -acodec copy -f mpegts -

NextPVR displays the web client in the logs like this
Code:
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36

When the NVShield is the client the log looks like this
Code:
user_agent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003

Is there a way to determine what client is being used as a test in the ffmpeg script?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,927
Threads: 956
Joined: May 2006
#4
2024-11-15, 07:41 PM
The same script is also called for recordings so there is a third possibility.

Just create a second extra don't merge and use different channel groups for the browser and the shield.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom HDHR Extra mvallevand 53 13,720 2021-08-26, 12:31 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode