GithubHelp home page GithubHelp logo

jpoet / hauppaugeusb Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 5.0 195 KB

MythTV wrapper around the Hauppauge HD-PVR2/Colossus2 driver

License: GNU General Public License v3.0

C++ 61.80% Makefile 1.46% C 36.74%

hauppaugeusb's People

Contributors

jpoet avatar jwittkoski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hauppaugeusb's Issues

can't complie ./Wrappers/linux/../../Logger.h:27:10: fatal error: boost/log/sources/severity_logger.hpp: No such file or directory

see next msg..

the ubuntu says
E: Unable to locate package libboost-log-dev

can't complie give this

st -I./Hauppauge/Common/EncoderDev/HAPIHost/MChip pkg-config --cflags libusb-1.0 ./Hauppauge/Common/Rx/ADV7842/Wrapper.cpp -o Wrapper.o
In file included from ./Wrappers/linux/log.h:5,
from ./Hauppauge/Common/Rx/ADV7842/Wrapper.cpp:11:
./Wrappers/linux/../../Logger.h:27:10: fatal error: boost/log/sources/severity_logger.hpp: No such file or directory
27 | #include <boost/log/sources/severity_logger.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:61: Wrapper.o] Error 1

ubuntu 22.04 thx

Failed to open dev.

When running the /opt/Hauppauge/bin/hauppauge2 app as a normal user I get the error
Failed to open dev.

Using sudo works as normal.

I figured this was a udev issue so I double checked my config and it looks correct. My user is in the plugdev group. What am I missing here? I am on latest Ubuntu desktop.

99-Hauppauge.rules
# Device 1 SUBSYSTEMS=="usb",ATTRS{idVendor}=="8246",ATTR{serial}=="E505-00-00D6A555",MODE="0664",GROUP="plugdev",SYMLINK+="hdpvr2_1",TAG+="systemd",RUN="/bin/sh -c 'echo -1 > /sys$devpath/power/autosuspend'"

--list output with sudo
[Bus: 1 Port: 1] 2040:0xe505 E505-00-00D6A555 HD PVR 2 Gaming Edition Plus w/SPDIF w/MIC (Siena2-05a) Number of possible configurations: 1 Device Class: 0 VendorID: 8256 ProductID: 58629 Manufacturer: Hauppauge Serial: E505-00-00D6A555 Interfaces: 1 ||| Number of alternate settings: 1 | Interface Number: 0 | Number of endpoints: 6 | Descriptor Type: 5 | EP Address: 129 | Descriptor Type: 5 | EP Address: 132 | Descriptor Type: 5 | EP Address: 136 | Descriptor Type: 5 | EP Address: 1 | Descriptor Type: 5 | EP Address: 2 | Descriptor Type: 5 | EP Address: 134 |

No HDMI audio -- ever!

I believe this is a separate issue from the other ticket with a similar title. In my case, I just acquired an HD-PVR2 Gaming Edition (not Plus) and cannot get HDMI audio to work at all. When I pass the output to ffprobe, it reports "0 channels" in the audio. I have tried every audio codec. I have tried multiple source devices. I have also tried the Transcode branch.

Here is some debug output for you to look at.
log.txt

No HDMI Audio

Within the last few days I've not been getting audio trying to record thru HDMI. Mediainfo says there is audio, but none is playing. The only way i can get it to work is if I connect composite cables and get the RCA audio.

I tried a fresh install of Ubuntu and Min, same problem still happening. Tried with STB and DVD players, no HDMI audio.

Initializing CS8416 chip doesn't work on devices without S/PDIF

On models of the PVR2 which don't include S/PDIF, specifically model 157310, whenever trying to record any input, HauppaugeUSB exits out with the following error message:

000:00:04.867405 N 29875 [main] HauppaugeDev.cpp:127 (set_input_format) - Input width: 1920 height: 1080 interlaced: 1 vFreq: 60 audio SR: 0
000:00:04.867625 E 29875 [main] FX2Device.cpp:115 (I2CWriteRead) - I2C: Improper answer: status 07
terminate called after throwing an instance of 'std::runtime_error'
  what():  CS8416: device is not ready

This appears to be because the CS8416 chipset is being initialized regardless of what the audio input is. The same issue occurs when trying to use HDMI on models without S/PDIF, making it impossible to use HauppaugeUSB with this particular model. I am unsure of why CS8416 is being used when the audio input is HDMI, but testing on two different models (157310 & 157320), removing the CS8416 audio selection has no impact on the HDMI audio input.

Keeping all of the audio_CS8416 stuff in the spdif conditional ensures PVR2 devices without S/PDIF input are still able to run.

Configuration Options

Sorry in advance because: 1) This is not an issue with this software and, 2) the author of this repository is not the manufacturer of the devices supported and is not responsible for technical support. If anyone knows a place to better inform myself, please let me know.

My issue is related with -more or less- understanding the configuration options. Some of them are self explanatory. Others are understandable, others are easily researched in the web but some others are difficult to understand for a noob in video production and/or aren't well documented in the web.

This is my attempt at requesting information to advanced users how often deal with this daily or as a living. If you could please explain to me what do these configuration options do or are intended to do or what they mean:

  1. codec 9 "PASSTHROUGH" (option -d)
  2. audiobitrate 29 "MAX" (option -R)
  3. transport stream bitrate. More specifically, what is the difference between this and videobitrate? (option -t)
  4. videocodingmode 2,3 "MBAFF, PAFF" (option -X)
  5. bframes (option -B)
  6. videolatency (option -A). More specifically, this doesn't appear to affect the latency between input source and the result viewed from the screen.

Thanks!

MBAFF encoding of interlaced content

I noticed that 1080i25 content recorded by hauppauge2 is always in separate field mode (where effectively the h.264 encoder codes each 1920x540/544 field separately) rather than in MBAFF mode where the encoder looks at both fields as an interlaced frame and then at a macro block level analyses each block for static content (where the block will be coded 'frame' progressively) or moving content (where the block will be coded 'field' interlaced) Very early h.264 interlaced encoders were separate fields only - but MBAFF offers significantly quality improvements so is now near-universal in Blu-ray and DVB encoding.

MBAFF encoding almost always delivers significantly improved picture quality for a given bitrate.

Looking at the original Hauppauge source code for references to MBAFF there is reference to a "VideoCodingMode" attribute (which hauppauge2 doesn't expose - unlike the other related attributes like VBR Max/Min, Audio format etc) This "VideoCodingMode" has 4 values - 0 (Frame), 1 (Field - which I take to mean Separated Fields), 2 (MBAFF - usually the best quality choice), 3 (PAFF - which is like MBAFF but decided on at the frame rather than macro block level - and good for handling psf content where there is no motion between two fields in a frame - i.e. p25 content carried in an i25 stream)

I'm not a coding expert - but would there be an option of exposing the "VideoCodingMode" in hauppauge2?

(And thanks so much for your efforts in improving the functionality of the HD PVR2 in Linux - it's hugely appreciated!)

Hang on CTRL-C

I've only seen this once, but wanted to document it just in case.

It doesn't exit at the end, it just hangs. CTRL-C doesn't stop the process, I had to kill it.

$ /opt/Hauppauge/bin/hauppauge2 -s E505-00-00D656E8 -i 3 -o /tmp/test.ts
000:00:00.022717 C [main] hauppauge2.cpp:344 (main) - Initializing [Bus: 6, Port: 3] E505-00-00D656E8
000:00:00.236962 N [main] HauppaugeDev.cpp:501 (Open) - Opening Hauppauge USB device.
000:00:00.244543 N [main] HauppaugeDev.cpp:523 (Open) - FX2 ready after 0 tries.
000:00:04.004409 N [main] HauppaugeDev.cpp:543 (Open) - encDev ready
000:00:04.004490 N [main] HauppaugeDev.cpp:571 (Open) - Using 1080p6050 stereo RGB EDID.
000:00:04.006225 N [main] HauppaugeDev.cpp:575 (Open) - rxDev ready
000:00:04.011750 N [main] HauppaugeDev.cpp:476 (open_file) - Output to '/tmp/test.ts'
000:00:04.011795 N [main] HauppaugeDev.cpp:588 (Open) - Hauppauge USB device ready.
000:00:05.480841 N [main] HauppaugeDev.cpp:420 (init_hdmi) - Invalid Output Params, retrying.
000:00:05.547124 N [main] HauppaugeDev.cpp:129 (set_input_format) - Input width: 1280 height: 720 interlaced: 0 vFreq: 59.9369 audio SR: 48000
000:00:05.548035 N [main] HauppaugeDev.cpp:193 (set_input_format) - I2S audio from ADV7842
000:00:05.548059 N [main] HauppaugeDev.cpp:195 (set_input_format) - Audio Input: HDMI
000:00:05.548080 N [main] HauppaugeDev.cpp:220 (set_input_format) - Audio codec: AUTO
000:00:05.982552 N [main] HauppaugeDev.cpp:460 (init_hdmi) - HDMI video input initialized.
^C000:00:25.293447 W [HAPI-cmd] Hapi.cpp:382 (cmdThreadFunc) -  pMsgWaitingRsp=0x188f520 waiting for 2761ms(limit=5000)

000:00:26.424310 W [HAPI-cmd] Hapi.cpp:382 (cmdThreadFunc) -  pMsgWaitingRsp=0x188f520 waiting for 3892ms(limit=5000)

000:00:27.555071 W [HAPI-cmd] Hapi.cpp:369 (cmdThreadFunc) - SEVERE: pMsgWaitingRsp=0x188f520 appears stuck after 5023ms

000:00:27.555131 E [HAPI-cmd] Hapi.cpp:379 (cmdThreadFunc) - SEVERE: pMsgWaitingRsp=0x188f520 removed from queue

000:00:28.000465 E [main] Hapi.cpp:3249 (HAPI_Stop) - HWAPI_MESSAGE_STOP fail!!! sem err:3, rspCode:0x01000000

000:00:28.000509 E [main] CHapi.cpp:2829 (hapiStop) - hapiStop() encoder returned hapiErr=0x1

000:00:28.000542 W [main] CHapi.cpp:1218 (hapiResetHW) - hapiResetHW() gHWapiHandle=0x1864c50 gHapi=0x185be30 hapiErr=1 _API_ok=1

KDE

Does this work on KDE systems? Tried it with KDE Neon and Kubunto but keep getting errors executing "make".

Invalid output params and cannot determine video mode

I recently updated everything on my gentoo system (including boost, gcc, kernel 5.10.27, etc).

After loading hdpvr and recompiling the HauppaugeUSB project, I got the following errors:

2021-05-01T16:05:18.222007 INFO <main> HauppaugeDev.cpp:385 (init_component) Invalid Output Params (1440571368x22080), retrying.
2021-05-01T16:05:18.272369 CRIT <main> HauppaugeDev.cpp:392 (init_component) Cannot determine video mode.

I have attached the full log with debug level output enabled.

Any ideas/hints?

Thanks in advance!
erroout.txt

AC3 over HDMI not working

I can't seem to get AC3 working over HDMI.

Previously I was doing this (HDMI + SPDIF), and I get video and AC3 audio:

$ /opt/Hauppauge/bin/hauppauge2 -s E505-00-00AFF854 -i 3 -a 1 -d 2 -o /tmp/test.ts
000:00:00.022632 C [main] hauppauge2.cpp:344 (main) - Initializing [Bus: 6, Port: 4] E505-00-00AFF854
000:00:00.228772 N [main] HauppaugeDev.cpp:501 (Open) - Opening Hauppauge USB device.
000:00:00.236327 N [main] HauppaugeDev.cpp:523 (Open) - FX2 ready after 0 tries.
000:00:03.996212 N [main] HauppaugeDev.cpp:543 (Open) - encDev ready
000:00:03.996255 N [main] HauppaugeDev.cpp:552 (Open) - Using 1080p6050 w/AC3 EDID.
000:00:03.997879 N [main] HauppaugeDev.cpp:575 (Open) - rxDev ready
000:00:04.011538 N [main] HauppaugeDev.cpp:476 (open_file) - Output to '/tmp/test.ts'
000:00:04.011614 N [main] HauppaugeDev.cpp:588 (Open) - Hauppauge USB device ready.
000:00:05.485521 N [main] HauppaugeDev.cpp:129 (set_input_format) - Input width: 1920 height: 1080 interlaced: 0 vFreq: 59.9369 audio SR: 48000
000:00:05.491087 N [main] HauppaugeDev.cpp:153 (set_input_format) - Audio Input set to S/PDIF
000:00:05.491112 N [main] HauppaugeDev.cpp:220 (set_input_format) - Audio codec: AC3
000:00:06.003114 N [main] HauppaugeDev.cpp:460 (init_hdmi) - HDMI video input initialized.
^C000:00:51.526799 C [main] hauppauge2.cpp:456 (main) - Done.

Resulting files show an AC3 stream with 5.1 channels:

Input #0, mpegts, from 'test.ts':
  Duration: 00:00:37.44, start: 2.962133, bitrate: 8654 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s

I recompiled with the recent HDMI + AC3 changes, and tried getting the AC3 via HDMI, like this:

$ /opt/Hauppauge/bin/hauppauge2 -s E505-00-00AFF854 -i 3 -a 3 -d 2 -o /tmp/test.ts
000:00:00.022598 C [main] hauppauge2.cpp:344 (main) - Initializing [Bus: 6, Port: 4] E505-00-00AFF854
000:00:00.227819 N [main] HauppaugeDev.cpp:501 (Open) - Opening Hauppauge USB device.
000:00:00.235404 N [main] HauppaugeDev.cpp:523 (Open) - FX2 ready after 0 tries.
000:00:03.994868 N [main] HauppaugeDev.cpp:543 (Open) - encDev ready
000:00:03.994925 N [main] HauppaugeDev.cpp:552 (Open) - Using 1080p6050 w/AC3 EDID.
000:00:03.996542 N [main] HauppaugeDev.cpp:575 (Open) - rxDev ready
000:00:04.007780 N [main] HauppaugeDev.cpp:476 (open_file) - Output to '/tmp/test.ts'
000:00:04.007837 N [main] HauppaugeDev.cpp:588 (Open) - Hauppauge USB device ready.
000:00:05.365975 N [main] HauppaugeDev.cpp:420 (init_hdmi) - Invalid Output Params, retrying.
000:00:05.432272 N [main] HauppaugeDev.cpp:129 (set_input_format) - Input width: 1920 height: 1080 interlaced: 0 vFreq: 59.9369 audio SR: 48000
000:00:05.437821 N [main] HauppaugeDev.cpp:176 (set_input_format) - 'SPDIF' from HDMI via 8416
000:00:05.437843 N [main] HauppaugeDev.cpp:195 (set_input_format) - Audio Input: HDMI
000:00:05.437885 N [main] HauppaugeDev.cpp:220 (set_input_format) - Audio codec: AC3
000:00:05.972960 N [main] HauppaugeDev.cpp:460 (init_hdmi) - HDMI video input initialized.
^C000:00:34.655755 C [main] hauppauge2.cpp:456 (main) - Done.

But there is no audio in the resulting file. There is an ac3 stream, I just can't hear anything. File shows ac3 stream with no channels:

Input #0, mpegts, from 'test.ts':
  Duration: 00:00:20.12, start: 2.973478, bitrate: 8260 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 ([129][0][0][0] / 0x0081), 0 channels, fltp

Compile on Mythbuntu 16.04.3?

I have a system running Mythbuntu 16.04.3. I think I have installed the equivalent dev packages (all the libboost-*-dev and libusb-1.0-0-dev). Following the instructions in the readme.md led me first to errors like the following:

In file included from MythTV.cpp:21:0:
MythTV.h:152:23: error: field ‘m_ready’ has incomplete type ‘std::atomic<bool>’
     std::atomic<bool> m_ready;
                       ^
In file included from /usr/include/c++/5/bits/shared_ptr_atomic.h:33:0,
                 from /usr/include/c++/5/memory:83,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/thread/thread_time.hpp:9,
                 from /usr/include/boost/thread/lock_types.hpp:18,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:12,
                 from /usr/include/boost/thread/thread_only.hpp:17,
                 from /usr/include/boost/thread/thread.hpp:12,
                 from ./Wrappers/linux/../../Logger.h:26,
                 from ./Wrappers/linux/log.h:5,
                 from ./Wrappers/linux/baseif.h:14,
                 from ./Hauppauge/Common/FX2API/FX2Device.h:4,
                 from ./Hauppauge/Common/EncoderDev/encoderDev_DXT.h:5,
                 from Common.h:24,
                 from MythTV.h:24,
                 from MythTV.cpp:21:
/usr/include/c++/5/bits/atomic_base.h:126:12: note: declaration of ‘struct std::atomic<bool>’
     struct atomic;

So I added #include <atomic> to MythTV.h, which got me to:

g++ -g -c -Wall -std=c++11 -fdiagnostics-color -DBOOST_LOG_DYN_LINK -pthread -m64 -g -O3 -D_GNU_SOURCE -DDRIVER_BUILD -DHAUPPAUGE -DHCW_E5BDA `pkg-config --cflags libusb-1.0` -I..
 -I./Hauppauge/Common -I./Wrappers/linux -I./Hauppauge/Common/FX2API -I./Hauppauge/Common/Rx/ADV7842 -I./Hauppauge/Common/Rx/ADV7842/RX -I./Hauppauge/Common/Rx/ADV7842/RX/LIB -I./
Hauppauge/Common/Rx/ADV7842/RX/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV7842/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV784
2/MACROS -I./Hauppauge/Common/Rx -I./Hauppauge/Common/EncoderDev -I./Hauppauge/Common/EncoderDev/HAPIHost -I./Hauppauge/Common/EncoderDev/HAPIHost/MChip `pkg-config --cflags libus
b-1.0` HauppaugeDev.cpp -o HauppaugeDev.o
g++ -g -c -Wall -std=c++11 -fdiagnostics-color -DBOOST_LOG_DYN_LINK -pthread -m64 -g -O3 -D_GNU_SOURCE -DDRIVER_BUILD -DHAUPPAUGE -DHCW_E5BDA `pkg-config --cflags libusb-1.0` -I..
 -I./Hauppauge/Common -I./Wrappers/linux -I./Hauppauge/Common/FX2API -I./Hauppauge/Common/Rx/ADV7842 -I./Hauppauge/Common/Rx/ADV7842/RX -I./Hauppauge/Common/Rx/ADV7842/RX/LIB -I./
Hauppauge/Common/Rx/ADV7842/RX/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV7842/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV784
2/MACROS -I./Hauppauge/Common/Rx -I./Hauppauge/Common/EncoderDev -I./Hauppauge/Common/EncoderDev/HAPIHost -I./Hauppauge/Common/EncoderDev/HAPIHost/MChip `pkg-config --cflags libus
b-1.0` hauppauge2.cpp -o hauppauge2.o
g++ Logger.o Common.o MythTV.o HauppaugeDev.o hauppauge2.o -o hauppauge2  `pkg-config --libs libusb-1.0` -lpthread libADV7842.a -lboost_program_options -lboost_log -lboost_log_set
up -lboost_system -lboost_thread -lboost_filesystem
libADV7842.a(USBif.o): In function `USBWrapper_t::USBWrapper_t()':
/home/user/src/Hauppauge/HauppaugeUSB/./Wrappers/linux/USBif.cpp:20: undefined reference to `libusb_init'
/home/user/src/Hauppauge/HauppaugeUSB/./Wrappers/linux/USBif.cpp:32: undefined reference to `libusb_set_debug'

I'm stuck here -- is anyone else successful in compiling it on 16.04.3? I'll note that extracting the Hauppauge download to a separate directory compiles fine, but I do notice that it uses it's built-in libusb (1.0.18).

For reference: pkg-config --cflags libusb-1.0 gives -I/usr/include/libusb-1.0.

Stuck in disconnected loop

My device was plugged in so I'm not sure how it got in this state, but the messages continue indefinitely and a CTRL-C does NOT stop the process.

$ /opt/Hauppauge/bin/hauppauge2 -s E505-00-00D656E8 -i 3 -a 3 -d 2 -o test.ts
000:00:00.022780 C [main] hauppauge2.cpp:344 (main) - Initializing [Bus: 1, Port: 5] E505-00-00D656E8
000:00:00.291421 N [main] HauppaugeDev.cpp:501 (Open) - Opening Hauppauge USB device.
000:00:01.430321 E [main] USBif.cpp:550 (bulkWrite) - cannot bulk write to endpoint 0x01: No such device (it may have been disconnected)
000:00:01.430455 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.441681 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.442841 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.553087 E [main] USBif.cpp:550 (bulkWrite) - cannot bulk write to endpoint 0x01: No such device (it may have been disconnected)
000:00:01.553202 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.564418 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.565569 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.675803 E [main] USBif.cpp:550 (bulkWrite) - cannot bulk write to endpoint 0x01: No such device (it may have been disconnected)
000:00:01.675895 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.687118 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.688268 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:00:01.798487 E [main] USBif.cpp:550 (bulkWrite) - cannot bulk write to endpoint 0x01: No such device (it may have been disconnected)
000:00:01.798592 E [main] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)

... messages continue ...

Cannot determine video mode

I always have this error:

/opt/Hauppauge/bin/hauppauge2 -s E585-00-00AF9EBE  -i 1 -a 1 -o /tmp/test1.ts
2020-05-30T12:30:04.397554 CRIT <main> Logger.cpp:83 (setLogLevelFilter) Changing loglevel to NOTC
2020-05-30T12:30:04.397640 CRIT <main> hauppauge2.cpp:347 (main) Starting up
2020-05-30T12:30:04.411423 CRIT <main> hauppauge2.cpp:360 (main) Initializing [Bus: 7, Port: 1] E585-00-00AF9EBE
2020-05-30T12:30:26.642636 CRIT <main> HauppaugeDev.cpp:392 (init_component) Cannot determine video mode.
2020-05-30T12:30:26.944407 CRIT <main> hauppauge2.cpp:476 (main) Done.

I'm using a Colossus 2.

Some models not working

Thanks for your work on this project — it's a lifesaver. My two HDPVR2s that have the micro-USB connector are working great. My three that use full-size USB are not, and all of them fail with the following output:

2021-07-22T17:07:54.745100 CRIT <main> Logger.cpp:83 (setLogLevelFilter) Changing loglevel to NOTC 2021-07-22T17:07:54.745249 CRIT <main> hauppauge2.cpp:347 (main) Starting up 2021-07-22T17:07:54.759594 CRIT <main> hauppauge2.cpp:360 (main) Initializing [Bus: 3, Port: 3] E504-00-00ACD92B 2021-07-22T17:08:04.251564 WARN <HAPI-cmd> Hapi.cpp:383 (cmdThreadFunc) pMsgWaitingRsp=0x5622eb167aa0 waiting for 3366ms(limit=5000) 2021-07-22T17:08:05.383079 WARN <HAPI-cmd> Hapi.cpp:383 (cmdThreadFunc) pMsgWaitingRsp=0x5622eb167aa0 waiting for 4498ms(limit=5000) 2021-07-22T17:08:06.114168 ERRR <main> Hapi.cpp:3187 (HAPI_Start) HWAPI_MESSAGE_START fail!!! sem err:3, rspCode:0x01000000 2021-07-22T17:08:06.114341 ERRR <main> HauppaugeDev.cpp:686 (StartEncoding) Encoder start capture failed.

The models are 157221 and 157220. They work on other operating systems. The differences I've found are:

The full-size USB models report a Device Status in lsusb of 0x0003, Self-Powered, Remote Wakeup Enabled. The micro-USB models report 0x0001, Self-Powered. The idProduct is 0xe504 as opposed to 0xe505 on the newer, working ones.

Also, and this may be the biggest clue of all (?) the older units don't seem to obey the permissions rules in the udev, meaning the app only sees them if i run it as sudo.

As reported by the script, we have

[Bus: 3 Port: 2] 2040:0xe514 E514-00-00AB340A HD PVR 2 model 1512 w/SPDIF, Alt bling (Siena2-02) (a 220)
Number of possible configurations: 1 Device Class: 0 VendorID: 8256 ProductID: 58644

for both models.

Debug log attached.
hauppauge2-E514-00-00AAAEA7.144744.log

No audio AC-3 over HDMI on Colossus2 with HDMI only connection

I am unable to record audio using the HDMI with audio codec set to AC-3.

AAC audio over HDMI works, AC-3 over SPIDF works.

I am using a colossus 2 that has SPIDF input.

/opt/Hauppauge/bin/hauppauge2 -s E585-00-00D642B7 -a 3 -d 2 -i 3 -o /tmp/temp.ts --v --loglevel debug

output attached
output.txt

HDPVR2 Model

Do all models of the HDPVR2 work with this? If so it may be nice to add it to the README.

My HDPRV 1 just died and I am looking for a replacement, however there are 3 versions of the hdpvr2 available on Hauppauge's site.

Thank you.

HDPVR 2 not recognized from OBS or VLC

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.

Compile error

I tried to compile it on Gentoo which uses openrc and got this error:

g++ -g -c -Wall -std=c++11 -fdiagnostics-color -DBOOST_LOG_DYN_LINK -pthread -m64 -g -O3 -D_GNU_SOURCE -DDRIVER_BUILD -DHAUPPAUGE -DHCW_E5BDA `pkg-config --cflags libusb-1.0` -I.. -I./Hauppauge/Common -I./Wrappers/linux -I./Hauppauge/Common/FX2API -I./Hauppauge/Common/Rx/ADV7842 -I./Hauppauge/Common/Rx/ADV7842/RX -I./Hauppauge/Common/Rx/ADV7842/RX/LIB -I./Hauppauge/Common/Rx/ADV7842/RX/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV7842/HAL -I./Hauppauge/Common/Rx/ADV7842/RX/HAL/4G/ADV7842/MACROS -I./Hauppauge/Common/Rx -I./Hauppauge/Common/EncoderDev -I./Hauppauge/Common/EncoderDev/HAPIHost -I./Hauppauge/Common/EncoderDev/HAPIHost/MChip `pkg-config --cflags libusb-1.0` Logger.cpp -o Logger.o
Logger.cpp:25:32: fatal error: systemd/sd-journal.h: No such file or directory
 #include <systemd/sd-journal.h>
                                ^
compilation terminated.
make: *** [Makefile:61: Logger.o] Error 1

compile error

following instructions; i get this error when i compile;

lboost_log_setup -lboost_system -lboost_thread -lboost_filesystem pkg-config --libs libusb-1.0 -lpthread
/usr/bin/ld: libADV7842.a(FX2Device.o): in function FX2Device_t::loadFirmware()': /home/g/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference to FX2Device_t::m_firmwareBytesLen'
/usr/bin/ld: /home/g/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference to `FX2Device_t::m_firmwareBytes'
collect2: error: ld returned 1 exit status
make: *** [Makefile:56: hauppauge2] Error 1

i am on arch linux; i believe i have the prerequisites installed; thanks for any help

Make error Ubuntu 22.04

Trying to get the HDPVR2 working on Ubuntu. When using Make I keep getting "/bin/sh: 1: pkg-config: not found
"
The I get several "417: undefined reference to `libusb_strerror'"

libusb is installed.

Unplugging and plugging in USB doesn't work

When the USB cable is unplugged from the Hauppauge PVR2 and plugged back in, HauppaugeUSB doesn't gracefully resume recording when the cable is plugged back in, and stays in an error state constantly, outputting the following logs:

000:02:00.298116 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298140 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298161 E [Buffer] mchip_base.cpp:345 (UsbGetPortState) - UsbGetPortState(4) FAILED

000:02:00.298184 E [Buffer] CHapi.cpp:785 (powerDownHW) - CHapi::powerDownHW() UsbGetPortState() FAILED!!

000:02:00.298259 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298282 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298319 E [Buffer] mchip_base.cpp:307 (UsbSetPortState) - UsbSetPortState(4, 0x05) FAILED

000:02:00.298396 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298411 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298423 E [Buffer] mchip_base.cpp:307 (UsbSetPortState) - UsbSetPortState(0, 0xb7) FAILED

000:02:00.298436 E [Buffer] mchip_port_a.cpp:228 (MCHIP_PortA_Set_POWER_ENABLE_H) - MCHIP_PortA_Set_POWER_ENABLE_H: UsbSetPortState failed!!

The only fix is to kill the application and start it up again.

Steps to Reproduce:

  1. Start up the application and leave it running

    sudo /opt/Hauppauge/bin/hauppauge2 -s <serial number> -i 1 -a 0 -o ~/test-unplug.ts

  2. Unplug the USB cable from the device

  3. Plug back in the USB cable into the device

  4. hauppauge2 continues to run, and just keeps outputting error logs, and does not continue to output video to the file

MythTV

To get the HDPVR2 to work with MythTV, do you have to have a channel changing script?

0 byte recording in mythtv after latest round of updates

My working mythtv config stopped working after this latest round of updates. Here is the log file entry:

hauppauge2-E585-00-00D642B7.8095.log
2020-05-19T08:39:11.406560 CRIT <main> Logger.cpp:83 (setLogLevelFilter) Changing loglevel to NOTC
2020-05-19T08:39:11.406607 CRIT <main> hauppauge2.cpp:347 (main) Starting up
2020-05-19T08:39:11.415937 CRIT <main> hauppauge2.cpp:360 (main) Initializing [Bus: 3, Port: 1] E585-00-00D642B7
2020-05-19T08:39:30.505425 WARN <HAPI-cmd> Hapi.cpp:383 (cmdThreadFunc) pMsgWaitingRsp=0x7f5b9c005c90 waiting for 2647ms(limit=5000)
2020-05-19T08:39:31.637447 WARN <HAPI-cmd> Hapi.cpp:383 (cmdThreadFunc) pMsgWaitingRsp=0x7f5b9c005c90 waiting for 3779ms(limit=5000)
2020-05-19T08:39:32.769335 WARN <HAPI-cmd> Hapi.cpp:370 (cmdThreadFunc) SEVERE: pMsgWaitingRsp=0x7f5b9c005c90 appears stuck after 4911ms
2020-05-19T08:39:32.769426 ERRR <HAPI-cmd> Hapi.cpp:380 (cmdThreadFunc) SEVERE: pMsgWaitingRsp=0x7f5b9c005c90 removed from queue
2020-05-19T08:39:33.293754 ERRR <> Hapi.cpp:3254 (HAPI_Stop) HWAPI_MESSAGE_STOP fail!!! sem err:3, rspCode:0x01000000
2020-05-19T08:39:33.293864 ERRR <> CHapi.cpp:2829 (hapiStop) hapiStop() encoder returned hapiErr=0x1
2020-05-19T08:39:33.293894 WARN <> CHapi.cpp:1218 (hapiResetHW) hapiResetHW() gHWapiHandle=0x7f5b9c003dd0 gHapi=0x7f5b9c003e90 hapiErr=1 _API_ok=1

If I run /opt/Hauppauge/bin/hauppauge2 -s E585-00-00AF4321 -a 1 -d 2 -o /tmp/test.ts I can record video.

Any suggestions on what changed / how to fix?

Here's the config file (added the .txt to get it to upload):
colossus2-1.conf.txt

Myth runs the following command
/opt/Hauppauge/bin/hauppauge2 -c /opt/Hauppauge/etc/colossus2-1.conf

Failed to open dev (v2)

As a non-root user I am unable to run hauppauge2. Double checked the serial number is correct and that I am in video group.

/opt/Hauppauge/bin/hauppauge2 -s E585-00-00AF9EBE -R 7 -r 4000000 -d 1 -C 0 -p 4 -A 0 -o /tmp/testpipe_stream
2020-06-05T17:03:00.261606 CRIT

Logger.cpp:83 (setLogLevelFilter) Changing loglevel to NOTC
2020-06-05T17:03:00.261684 CRIT hauppauge2.cpp:352 (main) Starting up
Failed to open dev.
2020-06-05T17:03:00.267399 CRIT hauppauge2.cpp:360 (main) Device E585-00-00AF9EBE not found on USB bus.
Failed to open dev.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.