NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 2 3 4 5 6 … 34 Next »
Extra - {channel} argument not working?

 
  • 0 Vote(s) - 0 Average
Extra - {channel} argument not working?
blitz2kx
Offline

Junior Member

United States
Posts: 2
Threads: 1
Joined: Jun 2024
#1
2024-06-11, 02:56 PM (This post was last modified: 2024-06-11, 03:26 PM by blitz2kx.)
Greetings everyone.

Currently trying to get an Extra setup with an HDMI capture device, as well as a python3 script that changes channels in Linux (Mint). NextPVR version 6.1.5.231022

So some backstory, I saw on another thread a user recommended a python3 script that can channel change over network using the mac address of their cable STB. This script works just fine for me in linux. The video stream I am inputting is an rtmp stream..all of this is called in through an sh script. The video stream is working just fine when tuning in NextPVR, however the channels do not change.

When executing the script from shell the channel changes just fine and ffmpeg loads the rtmp stream immediately after (specifying of course the channel number in the command line argument).

This same exact call in my extra using {channel} however doesnt seem to do the trick. The video loads just fine, but the STB does not change the channel.

My extras file:                                                                                  
<extras>
<channel name="{channel-name}">
<command>/home/blitz/SpectrumSTBControl/changeChannel.sh</command>
<args>username password {channel} macaddress</args>
</channel>
</extras>

-----------------------
Contents of changeChannel.sh
!/bin/bash

python3 "/home/blitz/SpectrumSTBControl/changeChannel.py" "$@"
ffmpeg -i "rtmp://192.168.1.221/live" -c:v copy -c:a copy -f mpegts -

-------------------------
Like I said, when executing the sh file directly in bash/sh or shell it works just fine.
When tuning in NextPVR, video works great, but channels do not change. Anyone can see any issues with this approach? Thanks!

[EDIT]

Upon inspecting the logs, it does seem it is sending the arguments as it should - (Sorry didnt post them because my account credentials are all over them, but this is what i found):
2024-06-11 11:19:34.936 [DEBUG][57] checking: EXTRA Recorder (extras-Spectrum5.xml)
2024-06-11 11:19:34.936 [DEBUG][88] host_callback: ...
2024-06-11 11:19:34.936 [DEBUG][57] enabled and present
2024-06-11 11:19:34.936 [DEBUG][57] has channel
2024-06-11 11:19:34.936 [DEBUG][57] live tv is possible
2024-06-11 11:19:34.936 [DEBUG][57] Running: /home/blitz/SpectrumSTBControl/changeChannel.sh username password 27 macaddress
2024-06-11 11:19:34.936 [DEBUG][57] Child PID: 1150578
2024-06-11 11:19:34.944 [DEBUG][57] Creating writer: LIVE&/home/blitz/recordings/live-27 ESPNTPA-1146968-8.ts
2024-06-11 11:19:34.944 [DEBUG][57] live mode
2024-06-11 11:19:34.944 [DEBUG][57] Created Mutex: Global\NPVR-mutex-e510b20bac2804c2d41fabea5ad0d52b
2024-06-11 11:19:34.944 [DEBUG][57] Created map: /home/blitz/recordings/live-27 ESPNTPA-1146968-8.ts.map
2024-06-11 11:19:34.944 [DEBUG][57] StartStream [LIVE&/home/blitz/recordings/live-27 ESPNTPA-1146968-8.ts] allocated handle: 8
2024-06-11 11:19:34.944 [DEBUG][57] Live TV handle: 0x360008
2024-06-11 11:19:34.944 [DEBUG][57] StartStream(25591:27 ESPNTPA, LIVE&/home/blitz/recordings/live-27 ESPNTPA-1146968-8.ts) allocated handle: 3538952
2024-06-11 11:19:34.944 [DEBUG][57] Handle: 360008
2024-06-11 11:19:34.944 [DEBUG][57] StreamNative@9 (storing stream handle: 3538952)
2024-06-11 11:19:34.944 [DEBUG][57] clientHandle[8b51c588-1373-41fb-bb59-cc58011fa5f8] = 3538952 *

Very strange as it just does not actually change the channel, but works when running script on own.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,820
Threads: 954
Joined: May 2006
#2
2024-06-11, 03:37 PM
It is possible python3 or some libraries you are using might not be installed for the nextpvr user.

Martin
blitz2kx
Offline

Junior Member

United States
Posts: 2
Threads: 1
Joined: Jun 2024
#3
2024-06-11, 03:54 PM (This post was last modified: 2024-06-11, 04:29 PM by blitz2kx.)
(2024-06-11, 03:37 PM)mvallevand Wrote: It is possible python3 or some libraries you are using might not be installed for the nextpvr user. 

Martin

Didnt even think of that, - thanks for the reply Martin!

You are absolutely right - that python script requests an oath module and that for sure is not running under the nextpvr user.

Not going to lie, my unix knowledge is pretty basic - but how simple would it be to just su as nextpvr and install these? would I need the password of the nextpvr user to do so? Thanks for your help

[edit]

Got it working, that was it! Thanks Martin, will leave this for anyone with same issue.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Special characters in an extra link ballfam 3 533 2024-08-12, 02:41 PM
Last Post: ballfam
  Live stream not working while recording pciber 6 857 2024-06-10, 07:48 AM
Last Post: pciber
  BBC Four HD missing from Channel scan - Astra 28.2E Heifer 12 2,080 2024-03-03, 01:49 PM
Last Post: mvallevand
  HDHomerun channel scan not working WagMan 2 716 2023-12-06, 02:38 PM
Last Post: mvallevand
  Different Errors depending on channel (no tuner found/transcoding Error) idefixrc 3 769 2023-11-21, 12:45 PM
Last Post: mvallevand
  Australian IPTV Channel 10 refusing "VLC/2.2.6 LibVLC/2.2.6" header Leigh 1 738 2023-10-23, 11:46 AM
Last Post: mvallevand
  No regions or auto-detect in channel scan Paul_G 1 570 2023-08-04, 02:03 PM
Last Post: mvallevand
  EPG with extra ballfam 23 2,472 2023-07-27, 10:03 PM
Last Post: ballfam
Photo Copy Channel Lineup in Linux boukmandutty 11 1,589 2023-06-15, 06:53 PM
Last Post: mvallevand
  Keyboard hot keys not working andrew66 10 1,249 2023-05-10, 08:31 AM
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