NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 39 40 41 42 43 44 Next »
Blaster Options?

 
  • 0 Vote(s) - 0 Average
Blaster Options?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,809
Threads: 769
Joined: Nov 2003
#11
2019-12-07, 05:14 PM
Behind the scenes NextPVR is still capable of calling a bat/sh script with before tuning an IPTV channel, but unfortunately there is no UI for configuring this. (because I wanted to keep it clean looking, and 99.9% of IPTV users would never need this)

As Martin says, this is probably best setup as a 'extras' tuner type. It's actually really straight forward to do. We're still in the process of writing up the process for the documentation, but if you try Martin's script above - he'll help you through the last little step to get it working in NextPVR v5.
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#12
2019-12-09, 01:14 AM
Ok, tried your idea and this is what i got. The channel change batch was called successfully and sat changed channel, but ffmpeg failed. I am curious as i don't want to process/convert the incoming stream as its in .ts format, and i think the ffmpeg you called would attempt to convert? please correct me if i am wrong.However, here is the text output from the Docker container shell:

root@nextpvr_amd642-5:/config/scripts# ./test.sh 119 | ffmpeg -i pipe: -f mpegs /dev/null
ffmpeg version 3.2.14-1~deb9u1 Copyright © 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_6
4-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresampl
e --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2
b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --ena
ble-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libop
enjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-lib
twolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --ena
ble-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl
2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --en
able-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mpegts, from 'pipe:':
Duration: N/A, start: 148.786544, bitrate: N/A
Program 1
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive),
1920x1080, 50 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 89 kb/s
[NULL @ 0x55c9bdcf3020] Requested output format 'mpegs' is not a suitable output format
/dev/null: Invalid argument
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,195
Threads: 958
Joined: May 2006
#13
2019-12-09, 01:19 AM (This post was last modified: 2019-12-09, 01:28 AM by mvallevand.)
Sorry my example was slightly off, I missed a t in mpegts

/test.sh 123 | ffmpeg -i pipe: -f mpegts /dev/null

I am only piping to fmpeg to make sure it is going to work. ffplay is better if you have a ui. The actual reader you will be using is curl.

It does look like it will work well as an extra

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#14
2019-12-09, 01:57 AM
Ok, some more progress, but still error'd

root@nextpvr_amd642-5:/config/scripts# ./test.sh 119 | ffmpeg -i pipe: -f mpegts /dev/null
ffmpeg version 3.2.14-1~deb9u1 Copyright © 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_6
4-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresampl
e --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2
b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --ena
ble-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libop
enjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-lib
twolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --ena
ble-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl
2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --en
able-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mpegts, from 'pipe:':
Duration: N/A, start: 2922.899533, bitrate: N/A
Program 1
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive),
1920x1080, 50 fps, 50 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 85 kb/s
File '/dev/null' already exists. Exiting.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,195
Threads: 958
Joined: May 2006
#15
2019-12-09, 02:06 AM (This post was last modified: 2019-12-09, 02:06 AM by mvallevand.)
It need might need a -y but you've already shown it will work assuming you are testing from a bash shell in docker. Place the file in config/scripts and give me a better filename and I can give you the next steps.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#16
2019-12-09, 02:14 AM
I was already running the test.sh from the /config/scripts folder Smile

I would suggest using a batch filename of Broadlink.sh
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,195
Threads: 958
Joined: May 2006
#17
2019-12-09, 02:23 AM (This post was last modified: 2019-12-09, 02:24 AM by mvallevand.)
Ok create this file as extras-Broadlink.xml in /config (via the host or docker)

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

and follow the steps from step # 5 https://forums.nextpvr.com/showthread.ph...#pid530793 (your extras name will be different.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#18
2019-12-09, 12:30 PM
That's cracked it. I had to make one modification to the pre-tuning batch file as the python files in the channel changer script are all relative to the current path, so I make the current directory match the directory that Broadlink.sh is running from:

cd $(dirname $0)
./BroadlinkChannelChange.sh $1
curl -s http://192.168.xxxx.xxxx:8080/tbs

I now get the channel changed and the streaming works. I will now attempt to integrate into Emby. Fingers crossed....
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,195
Threads: 958
Joined: May 2006
#19
2019-12-09, 01:26 PM
Glad that works and thanks for being a guinea pig. I use the extras extensively and they work very well. I did miss one thing, if you changer script writes anything to stdout you need to redirect output so the generic instruction will be

blaster.sh > /dev/null

I will also update the notes for the future wiki to make sure the final script is in the scripts folder and that it works with absolute paths. Technically the script can be outside the folder too if you change the xml file, but for documentation and backing up NextPVR configuration this approach makes it easier.

It should work fine with the v5 Emby plugin.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web App Record Series Options BrettB 5 2,253 2019-10-10, 11:44 AM
Last Post: BrettB

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

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

Linear Mode
Threaded Mode