jpoet / HauppaugeUSB

MythTV wrapper around the Hauppauge HD-PVR2/Colossus2 driver
GNU General Public License v3.0
16 stars 5 forks source link

HDPVR 2 not recognized from OBS or VLC #19

Open maurox1988 opened 4 years ago

maurox1988 commented 4 years ago

Thank you so much for the repository. I finally can capture videos from my HDPVR 2 model 157210 on Ubuntu 20.04 thanks to your code. (I tried with the drivers for my model but it didn't work so I tried with the drivers on the example and it worked).

I was wondering if there is a way OBS can recognize my capture device for video and audio. I also tried with VLC but with no success.

Thank you so much.

neyuru commented 4 years ago

Yes- there is a way. Although currently is not optimal. Here are the steps for OBS: 1) make sure your capture card is working. It is sufficient if the command line hauppauge2 is working. 2) On OBS, go to sources -> add -> media source 3) Place the name on your media source e.g. HDPVR-HDMI 4) Under "Local file" click browse. Search the *.ts file that is captured by hauppauge2. The default example is /tmp/test.ts

That's it. I mentioned this is not optimal because the .TS file is actually being written to disk and if it had the capability to be a virtual file (e.g. not growing in time when hauppauge2 is executed) then you could in theory manage it better with OBS.

I don't know how hard would be to change this behavior (or give the option to do so) but maybe @jpoet can chime in.

jpoet commented 4 years ago

The hauppauge2 program sends the transport stream to stdout by default. You might be able to rig it up where that ends up going to a named pipe. Then OBS or VLC could read from the named pipe? I dont' know about OBS, but for VLC you can also just do something like

/opt/Hauppauge/bin/hauppauge2 | vlc -

stevenviola commented 4 years ago

@maurox1988 I needed similar functionality and created a fork which used ffmpeg-devel to allow for hauppauge2 to output to an output format supported by ffmpeg. This means you can output to UDP and I'd imagine you can configure OBS to pull in that feed. A multicast UDP feed would probably be ideal so you can have OBS pull in the stream but also open the feed on VLC at the same time.

neyuru commented 4 years ago

Thanks @jpoet ! I can confirm that using a named pipe does allow direct streaming to OBS. I need to test it more thoroughly but initial impressions are that it works ;)

jpoet commented 4 years ago

neyuru, Steven's suggestion is also a good one. You should be able to do something like: hauppauge2 --conf yourconifgfile | ffmpeg <options to unicast or multicast>

neyuru commented 4 years ago

Thanks, I didn't understand the solution. Now I've researched it a little and found that OBS has output to ffmpeg built in (Custom Output ffmpeg) which has UDP support. Is this functionality the same as what was Steven suggesting?