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.
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.