NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 91 92 93 94 95 … 102 Next »
Using executable blaster with extras channels

 
  • 0 Vote(s) - 0 Average
Using executable blaster with extras channels
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#1
2020-02-08, 05:17 PM
Hi - I now have an STB/capture card 4K setup running into NPVR. See this thread: https://forums.nextpvr.com/showthread.ph...499&page=1

However, my next task/problem is to get the blaster element working. I've originally been around this wheel once sort of in this thread: https://forums.nextpvr.com/showthread.ph...t=gdogg371 using my blaster script with an old 1080 DVB-T card. To concisely explain my blaster functionality:

1) It's a command line executable with arguments expected afterwards to make it do anything.
2) It literally mimics the STB remote 100% pretty much. So if you wanted to select channel 401, using NPVR v4 I mapped these as per the above thread to channel arguments 2, 3, 4.

I'm a bit lost though as to how to integrate my blaster with the way we have set things up using extras and v5 in this thread. I get that I need to add my blaster command line statement to my .bat file above my commands to activate a stream through VLC. What exactly should this format look like though? For example (and as a probably incorrect) stab in the dark, would my .bat file perhaps look something like this?


Code:
"C:\MyLocation\MyExecutableFile.exe {channel_d2} {channel_d3} {channel_d4}"

"G:\VLC\vlc <my very long vlc command>"


...or is there a (completely) different way of doing this in extras?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2020-02-08, 05:35 PM
The only thing passed into the extras at this point is {channel}, which is effectively the channel number. If you want individual digits, you'd need to extract them from that channel number yourself.

That said, I'll add support for {channel_d1} {channel_d2} {channel_d3} {channel_d4} in the next build.
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#3
2020-02-08, 05:37 PM
(2020-02-08, 05:35 PM)sub Wrote: The only thing passed into the extras at this point is {channel}, which is effectively the channel number. If you want individual digits, you'd need to extract them from that channel number yourself.

That said, I'll add support for {channel_d1} {channel_d2} {channel_d3} {channel_d4} in the next build.

Hi Sub - how can I extract the numbers myself? I'm fine extending a blaster script to do so, but where am I extracting from in NPVR?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2020-02-08, 05:51 PM
(2020-02-08, 05:37 PM)gdogg371 Wrote:
(2020-02-08, 05:35 PM)sub Wrote: The only thing passed into the extras at this point is {channel}, which is effectively the channel number. If you want individual digits, you'd need to extract them from that channel number yourself.

That said, I'll add support for {channel_d1} {channel_d2} {channel_d3} {channel_d4} in the next build.

Hi Sub - how can I extract the numbers myself? I'm fine extending a blaster script to do so, but where am I extracting from in NPVR?
If your extras has something like this:
Code:
<extras>

  <channel name="{channel-name}">
    <command>mybatchfile.bat</command>
    <args>{channel}</args>
  </channel>

</extras>
...then <args> is the command line past into your batch file. ie, the channel number. Inside the batch file, you can access this variable as %1. (If you were on linux it'd be $1 in a shell script)

In your batch file you can do whatever scripting you want to do to break that number into separate digit. I couldn't tell you exactly what to do in you batch file - I'm no batch file scripting expert. I'd probably be googling something like "batch file zero pad number separate digits"
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,134
Threads: 957
Joined: May 2006
#5
2020-02-08, 05:54 PM
You need to learn how to web search https://stackoverflow.com/questions/4575...-cmd-batch

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#6
2020-02-08, 05:58 PM
(2020-02-08, 05:54 PM)mvallevand Wrote: You need to learn how to web search https://stackoverflow.com/questions/4575...-cmd-batch

Martin

There are many ways to skin a cat and this is not how I would do it. I'd use Python or C++
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,134
Threads: 957
Joined: May 2006
#7
2020-02-08, 07:55 PM (This post was last modified: 2020-02-08, 10:17 PM by mvallevand.)
Yes you could pass %1 to another app but that is not you asked. If you followed that links you would see several solution but I suggest this if your STB is faster with zero padding (add the padding number of zeroes you need

SET CHANNEL=00%1
SET CHANNEL=%CHANNEL:~-3%
SET D1=%CHANNEL:~0,1%
SET D2=%CHANNEL:~1,1%
SET D3=%CHANNEL:~2,1%

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#8
2020-02-12, 08:05 PM (This post was last modified: 2020-02-12, 08:06 PM by gdogg371.)
Just so you both know I'm not dead, I have now amended my C++ executable so that it takes a channel argument from NPVR of the fashion '401' via my .bat file triggering my .exe and then splits this out into three separate character strings '4', '0', '1'...these go through a BasePairMap which is a sort of C++ dictionary/lookup, is converted into integers, which then are converted to binary in a statement passed to my STB API...out of brain for today, but will be back tomorrow to finally try and hook everything up for testing...
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#9
2020-02-14, 04:43 PM (This post was last modified: 2020-02-14, 04:57 PM by gdogg371.)
(2020-02-12, 08:05 PM)gdogg371 Wrote: Just so you both know I'm not dead, I have now amended my C++ executable so that it takes a channel argument from NPVR of the fashion '401' via my .bat file triggering my .exe and then splits this out into three separate character strings '4', '0', '1'...these go through a BasePairMap which is a sort of C++ dictionary/lookup, is converted into integers, which then are converted to binary in a statement passed to my STB API...out of brain for today, but will be back tomorrow to finally try and hook everything up for testing...


Ok, back in the saddle today. So the content of my batch file is now as thus:

Code:
"G:\Visual Studio 2017\C++ Projects\SkyQChannelChanger\Release\SkyQChannelChanger.exe {channel}"

"G:\VLC\vlc" --ffmpeg-hw --avcodec-hw=any dshow:// :dshow-vdev="Video (00 Pro Capture HDMI 4K+)" :dshow-adev="Audio (2- 00 Pro Capture HDMI 4K+)" :dshow-threads=8 :dshow-aspect-ratio=16\:9 :dshow-size="3840x2160" :dshow-pixel_format=yuv444p16le :dshow-tune=film :dshow-preset=lossless :dshow-profile=main10 show-vcodec=h264 :dshow-fps=50 :dshow-crf=0 :dshow-acodec=mp4a :dshow-stereo-mode=5 :dshow-force-surround-sound=0 :dshow-ab=128 :dshow-samplerate=44100 :no-dshow-config :live-caching=300 --sout "#transcode{venc=ffmpeg,vcodec=mp2v,threads=8,aspect=16:9,width=3840,height=2160,fps=50,acodec=a52,ab=1500,channels=2,samplerate=48000,soverlay}:standard{access=file,dst=-,mux=ts}"

I tried having the two commands in one set of quotations and separated by ' & '. I've also tried the blaster command with and without {channel) as well as a hard coded channel command of the fashion '401'. With this batch file I get the EPG successfully calling up the VLC commands and opening a channel, but the blaster bit does nothing. I have confirmed the revised blaster executable works by passing a complete command line of 'G:\Visual Studio 2017\C++ Projects\SkyQChannelChanger\Release>SkyQChannelChanger.exe 401', which it then splits up into '4' '0' '1' as my STB requires.

Any idea as to what I am doing wrong?

Thanks
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,134
Threads: 957
Joined: May 2006
#10
2020-02-14, 05:09 PM
If you notice my last example the parameter to the batch file is %1 for the xml file I gave you. I may have confused you when I posted in linux format ($1) in a few posts.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Scan finds few channels GiuseppeKK 1 64 2025-07-05, 10:10 PM
Last Post: mvallevand
  EPG not found for some channels - DVB/ATSC (NextPVR version 7) Nimoder 36 2,409 2025-06-27, 10:53 PM
Last Post: mvallevand
  Since v7: EPG mostly "no listings", and channels change during recordings :'( rightbryce 40 4,381 2025-06-23, 01:15 AM
Last Post: sub
  IR Blaster for HD PVR 2 -- HaupBlast.exe and hcwirblast.dll issue MPG 27 1,950 2025-06-22, 03:36 PM
Last Post: jcole998
  EPG not found for some channels via DVB-T2 (version 7) Kotoka 84 6,452 2025-06-21, 05:10 PM
Last Post: sub
  Channel 7 TV channels do not load into my list cmacd 1 364 2025-05-26, 07:37 AM
Last Post: Renryant
  No Audio Stream on most IPTV Channels pascholnahui 15 1,166 2025-05-24, 09:35 PM
Last Post: mvallevand
  Problem with encrypted channels achim_m 0 192 2025-05-03, 03:34 PM
Last Post: achim_m
  Channels not displaying in client(s) Druhl 1 304 2025-02-17, 05:08 PM
Last Post: sub
  Guide information not displaying on some channels three6zerocool 50 3,990 2025-01-19, 10:33 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