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
« Previous 1 2 3 4
Extra Device for Hauppauge CableCard Tuner

 
  • 0 Vote(s) - 0 Average
Extra Device for Hauppauge CableCard Tuner
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#1
2021-02-20, 04:03 PM
I am having an issue with my LAN and V5 using the Hauppauge DCR-3250 Cable Card Triple Tuner. It is a TCP issue and will take some time to resolve. In the meantime, I am using V4, which uses UDP, as a workaround. I would like to return to V5 but I need to create an "extra" device to access the tuner using UDP. My research into creating an extra device has come from the Wiki snd examples from two other extra sources:

extra-locast.xml:
  <channel name="WCBS" number="2.1" group="locast" tvg-id="16689.locast.org" output="m3u8">
    <command>cmd</command>
    <args>/c "C:\Users\Public\NPVR-data\scripts\locast\locast.bat" 104</args>
    <icon>https://static.locastnet.org/logo/NewYork/WCBS.png</icon>
  </channel>

Locast.bat:
@echo off
python C:\Users\Public\NPVR-data\scripts\locast\locast.py --tune %1 %2

extra-nasa.xml:
  <channel name="NASA TV Media">
    <command>c:/Program Files/NextPVR/Other/ffmpeg.exe</command>
    <args>-user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0" -referer "https://www.nasa.gov/" -headers "Cookie: domain: nasa-i.akamaihd.net\r\nOrigin: https://www.nasa.gov" -i https://nasa-i.akamaihd.net/hls/live/253..._2000.m3u8 -codec copy -f mpegts -</args>
  </channel>

If added the following channel to extra-nasa.xml for accessing the tuner device:
  <channel name="UDP Source">
<command>cmd</command>
    <args>/c "i:\Nextpvr-capture\curlcap\StartUDPTuner.bat"</args>
  </channel>

StartUDPTuner.bat:
@echo off
:: Clear the tuner
"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config" 192.168.1.155 set /tuner0/channel none
:: Tune vChannel 504
"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config" 192.168.1.155 set /tuner0/vchannel 504
:: Direct output to target PC IPaddr and port using UDP and start the stream
"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config" 192.168.1.155 set /tuner0/target udp://192.168.1.154:5004
:: Receive stream with FFMPEG and re-redirect to stdout.
"C:\Program Files\NextPVR\Other\ffmpeg.exe" -f mpeg -i udp://192.168.1.154:5004 -f mpegts
::"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config" 192.168.1.155 set /tuner0/channel none

Trying to watch the channel with the desktop app produces no picture or sound though the tuner is sending the stream: Launching VLC specifying port 5004 produces perfect picture and sound. If I tell FFMPEG to save the stream as a .ts file, file playback is flawless.

Attached are the logs from a service restart to cancelling the desktop app's empty screen.

Does anyone have a suggestion about what might be wrong? I'd really appreciate the help.

Thanks.


Attached Files
.zip   logs-20210220-1059.zip (Size: 144.26 KB / Downloads: 1)
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#2
2021-02-20, 04:17 PM
There is now an Extras sub forum and there is a developers forum so this post is mis-placed.

You would need to start the server before starting the streaming from the HDHR and you need to redirect the ffmpeg output to stdout.

"C:\Program Files\NextPVR\Other\ffmpeg.exe" -v panic -timeout 10000000 -i udp://192.168.1.154:5004 -f mpegts -
"C:\Program Files\Silicondust\HDHomeRun\hdhomerun_config" 192.168.1.155 set /tuner0/target udp://192.168.1.154:5004

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,788
Threads: 769
Joined: Nov 2003
#3
2021-02-20, 04:51 PM
(moved to the extras forum)
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#4
2021-02-20, 04:54 PM
Sorry, Martin. Will you move this to the Add-ons:Extras forum?

And thanks for the help. I missed that final hyphen for ffmpeg. Also, what is the -timeout parameter? I can't find it in the ffmpeg documentation and I may need to adjust it.

JohnC
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#5
2021-02-20, 05:03 PM
When you start the ffmpeg server listening on the UDP port the -timeout gives you the microseconds it will wait. I figured 10 seconds is safe.

If you want 3 devices you will need 3 extras with different ports.

Martin
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#6
2021-02-20, 07:42 PM
Made some progress and the desktop app does present a watchable picture. That's good. On the downside though, the picture is pixelated with very small checkboard squares at full screen. Also, I noticed that Wireshark shows the incoming data protocol as MPEG TS and not the UDP I was expecting. Could these two items be related?

I also checked CPU usage during live TV and saw that ffmpeg was consuming 25% of the CPU. Is that normal or is there transcoding going on? Is there a "passthru" option that can be used? Should I be using the -c:[v|a|s] copy options? Hauppauge told me the device output is normal MPEG2.

I've uploaded a 30-sec NextPVR capture on DropBox that you can view using this link:
https://www.dropbox.com/preview/GeneralE...e=personal

Getting very close...

JohnC


Attached Files
.zip   logs-20210220-1426.zip (Size: 149.56 KB / Downloads: 0)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#7
2021-02-20, 08:03 PM
Wireshark is smart, mpegts is fine. I was just using your ffmpeg a/v options, if it was me I would use -codec copy so it wouldn't transcode. Technically sub want extras to produce h264/aac if you want web player support. I don't need that so I often ignore that spec.

Also I don't know who else you are addressing these posts to but I don't plan on providing either general extra or ffmpeg usage support in the future. I expect people creating extras will do their own experimentation and figure it out themselves.

Martin
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#8
2021-02-20, 08:28 PM
I went ahead and tried using the options -c:v copy -c:a copy -c:s copy and the picture is now perfect. CPU usage went to 7%.

We're all good, Martin.

Thanks for the help.

JohnC
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#9
2021-02-25, 06:43 PM
I have the extra device working beautifully with the DCR-3250. Recordings are clean and complete. I do have one problem and I'd like an opinion on a proposed solution:

The problem occurs when two back-to-back programs are recording on the same channel. Usually, NextPVR will use the same device and simply tell it to change the channel. This also allows recording of overlapped post- and pre-padding times. Unfortunately, the script "PostProcessing.bat" is invoked at the end of the first program but does not indicate that the device is still in use. So...my script turns off the tuner and the second program recording is stopped after the first program's post-padding. I thought about using "ParallelProcessing.bat" but I see a sequencing issue with Parallel... being invoked for the second program before Post... of the first due to padding.

For now I could access the database SCHEDULED_RECORDINGS and test if the device is in use for any entry in the schedule. If not, turn off the stream.

I would like to suggest that a new script be invoked to convey the current state of a device as being either "in-use" or "free" when NextPVR needs it or releases it independent of the program being recorded. This way, the script would stay in the execution context of NextPVR and avoid permission issues.

Any opinion on this?

Thanks.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#10
2021-02-25, 06:53 PM
Don't stop the tuner in your script let it timeout when it is not being used. You aren't locking it so that shouldn't cause any issue.

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
  TabloTV Extra mvallevand 17 5,382 2025-03-13, 10:55 PM
Last Post: mvallevand
  NRSC5 as Extras tuner Siftingice 1 379 2025-02-11, 05:27 PM
Last Post: mvallevand
  Reminder Pluto TV Extra removed mvallevand 0 509 2025-01-04, 06:32 PM
Last Post: mvallevand
  extras.xml device using VLC? davy 1 551 2024-11-20, 02:33 PM
Last Post: mvallevand
  help requested with sending IR Blast command with extra _Dam0_ 3 658 2024-10-11, 12:53 PM
Last Post: mvallevand
  Getting Pluto extra to work ballfam 163 18,157 2024-08-08, 07:23 PM
Last Post: mvallevand
  Is 'TabloTv Extra' Compatible with Gen 4 Devices? POWerSUrgeSW3 4 1,284 2024-06-23, 01:23 PM
Last Post: mvallevand
  windows media player extra buntay20 4 1,129 2023-12-17, 06:48 PM
Last Post: Jaggy
  PlutoTV Extra Commerical Exit freezing bisonfan 13 2,899 2023-12-16, 07:42 PM
Last Post: mvallevand
  Extra donation access -plutotv bisonfan 3 1,064 2023-09-04, 07:26 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