USB HDMI Capture

I have an old i5 nuc running raspberry pi os. Would that be ok? I can't get windows 11 on it.

Have now got it installed on my NUC and it is streaming both audio and video. However as soon as I close the stream and try to launch it again, it spins. I then have to use a different USB port for it to work again. Thanks @tmm1

This is what I am gettting when it works:
2025/03/18 21:47:56.666002 [TNR] Opened connection to M3U-Test for ch9031 USB HDMI Capture
2025/03/18 21:47:57.290344 [HLS] ffmpeg: capture-usb-hdmi: Guessed Channel Layout for Input Stream #1.0 : stereo

This is what I get when I close the stream and reopen it:
2025/03/18 21:49:24.757776 [TNR] Opened connection to M3U-Test for ch9032 USB HDMI Capture
2025/03/18 21:49:25.175327 [HLS] ffmpeg: capture-usb-hdsmi: [video4linux2,v4l2 @ 0xa5e66c0] Dequeued v4l2 buffer contains corrupted data (0 bytes).
2025/03/18 21:49:25.183303 [HLS] ffmpeg: capture-usb-hdsmi: Guessed Channel Layout for Input Stream #1.0 : stereo
2025/03/18 21:49:25.183663 [HLS] ffmpeg: capture-usb-hdsmi: [video4linux2,v4l2 @ 0xa5e66c0] Dequeued v4l2 buffer contains corrupted data (0 bytes).

This is NOT a problem with the USB HDMI Capture software, but wondering if another user ran into this type of problem. I have this capture dongle: Amazon.com.

I have had it setup and working fine. However a couple of days ago, it stopped recording audio with the video. I did some trouble shooting, and looks like the FireTV stick is working fine (audio and video are fine when direct connected to the TV). However, when I use it on a computer (with OBS or other program), no audio is present. So, I am assuming the capture dongle somehow crapped out with no audio. Anyone else have this type of issue? Is there a way to "revive" this dongle, or do I just have to buy a new one?

EDIT: After fiddling about for a bit (not sure what all I did, was just trying stuff), the thing started working again with audio on OBS. So, I connected it back up to Channels, and hoping for the best.

QUESTION: I just want to be sure I have everything right - On Sources, I have two sources: the capture device, and the ADBTuner. The capture device is set to "Disabled" state, and the ADBTuner is "Enabled". Is this the right way?

Another question: Am I supposed to be able to watch Live TV with this, or just schedule recordings? The reason I ask is, when I go to watch live, it just spins, shows "reconnecting" and "Remux started" for a while and then just gives up. Is that the expected behavior, or is something still wrong?

OK, I think I restored some sanity, and it seems to be back up working.

During the machinations I did, one of the things I did was update to the latest pre-release, thinking this would be a good idea. Turns out it was not. I reverted to the previous one I was using (2025.02.24.2322), and everything started working as before, including audio.

@tmm1 were the later releases for linux only? The latest is sure broken in Windows, which is what I am using. LMK, if you need me to do anything help debug the situation.

Please submit diagnostics

I cant wait to try this!!! Hopefully this weekend :slight_smile:

Here is the log of the error I get when I try to view the Live TV using the USB HDMI Capture Source:

2025/03/20 10:34:05.343746 [TNR] Opened connection to M3U-FireTVCapture for ch9000 USB HDMI Capture
2025/03/20 10:34:05.343746 [HLS] Starting live stream for channel 9000 from 127.0.0.1
2025/03/20 10:34:05.833702 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001fd56cc0440] Found EOI before any SOF, ignoring
2025/03/20 10:34:05.833853 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001fd56cc0440] No JPEG data found in image
2025/03/20 10:34:06.280156 [HLS] ffmpeg: capture-usb-hdmi:  [aist#0:1/pcm_s16le @ 000001fd52c486c0] Guessed Channel Layout: stereo
2025/03/20 10:34:06.280156 [HLS] ffmpeg: capture-usb-hdmi:  [vost#0:0/h264_mf @ 000001fd502a40c0] -enc_time_base -1 is deprecated, use -enc_timebase demux
2025/03/20 10:34:06.280662 [HLS] ffmpeg: capture-usb-hdmi:  [aost#0:1/aac @ 000001fd502a3e00] -enc_time_base -1 is deprecated, use -enc_timebase demux
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  [Eval @ 000000061b3fe000] Undefined constant or missing '(' in 'prev_t))'
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  [Eval @ 000000061b3fe000] Missing ')' or too many args in 'gt(floor(t),floor(prev_t))'
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  [vost#0:0/h264_mf @ 000001fd502a40c0] Invalid force_key_frames expression 'gt(floor(t),floor(prev_t))'
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  [out#0/mpegts @ 000001fd52b93ac0] Error processing forced keyframes
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  Error opening output file -.
2025/03/20 10:34:06.280688 [HLS] ffmpeg: capture-usb-hdmi:  Error opening output files: Invalid argument
2025/03/20 10:34:06.581968 [ERR] Error during stream M3U-FireTVCapture ch9000 USB HDMI Capture: exit status 0xffffffea
2025/03/20 10:34:06.581968 [TNR] Closed connection to M3U-FireTVCapture for ch9000 USB HDMI Capture
2025/03/20 10:34:06.581968 [HLS] ffmpeg: ch9000-dANY-ip127.0.0.1-remux:  [in#0/mpegts @ 000001c984fc3bc0] could not find codec parameters
2025/03/20 10:34:06.581968 [HLS] ffmpeg: ch9000-dANY-ip127.0.0.1-remux:  Error opening input file -.
2025/03/20 10:34:06.581968 [HLS] ffmpeg: ch9000-dANY-ip127.0.0.1-remux:  Error opening input files: End of file
2025/03/20 10:34:06.589059 [HLS] Stopping transcoder session ch9000-dANY-ip127.0.0.1 (out=0s finished=true first_seq=0 last_seq=-1)
2025/03/20 10:34:06.590163 [ERR] Probe cancelled for live stream after 1.2462277s and 0 bytes

@krishkal Please update to the latest DVR pre-release and try this again.

OK, it seems to be working now! Thanks!

2 Likes

Even though it seems to be working fine, I do see this in the logs, over and over again... is this normal?

2025/03/20 15:07:34.814323 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 00000217a052c380] Found EOI before any SOF, ignoring
2025/03/20 15:07:34.815213 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 00000217a052c380] No JPEG data found in image
2025/03/20 15:07:34.815213 [HLS] ffmpeg: capture-usb-hdmi:  [vist#0:0/mjpeg @ 000002179dbb4d80] Error submitting packet to decoder: Invalid data found when processing input

Would it be possible for the logs to ignore these lines? It creates thousands of these lines in the logs when streaming.


2025/03/20 17:02:40.822663 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294074063, next:13449462 st:0 invalid dropping
2025/03/20 17:02:40.822677 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294074063, next:13449462 invalid dropping st:0
2025/03/20 17:02:40.844102 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294090727, next:13466128 st:0 invalid dropping
2025/03/20 17:02:40.844162 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294090727, next:13466128 invalid dropping st:0
2025/03/20 17:02:40.855191 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294107399, next:13482794 st:0 invalid dropping
2025/03/20 17:02:40.855206 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294107399, next:13482794 invalid dropping st:0
2025/03/20 17:02:40.866359 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294124053, next:13499460 st:0 invalid dropping
2025/03/20 17:02:40.866379 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294124053, next:13499460 invalid dropping st:0
2025/03/20 17:02:40.887549 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294140717, next:13516126 st:0 invalid dropping
2025/03/20 17:02:40.887639 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294140717, next:13516126 invalid dropping st:0
2025/03/20 17:02:40.909010 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294157389, next:13532792 st:0 invalid dropping
2025/03/20 17:02:40.909041 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294157389, next:13532792 invalid dropping st:0
2025/03/20 17:02:40.920227 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294174044, next:13549458 st:0 invalid dropping
2025/03/20 17:02:40.920232 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294174044, next:13549458 invalid dropping st:0
2025/03/20 17:02:40.941514 [HLS] ffmpeg: capture-usb-hdmi:  DTS 927294190707, next:13566124 st:0 invalid dropping
2025/03/20 17:02:40.941517 [HLS] ffmpeg: capture-usb-hdmi:  PTS 927294190707, next:13566124 invalid dropping st:0

Here's the error I'm getting with

#EXTM3U
#EXTINF:-1, channel-id="camera",USB Capture
capture://dshow/C36 Video/Digital Audio Interface (C36 Audio)/?framerate=60&video_size=1920x1080

Log:

2025/03/21 08:24:06.890052 [TNR] Opened connection to M3U-USBCapture for ch9005 USB Capture
2025/03/21 08:24:06.890052 [HLS] Starting live stream for channel 9005 from 10.10.12.25
2025/03/21 08:24:07.103618 [HLS] ffmpeg: capture-camera:  [aist#0:1/pcm_s16le @ 0000020a522f7f40] Guessed Channel Layout: stereo
2025/03/21 08:24:07.104146 [HLS] ffmpeg: capture-camera:  [vost#0:0/h264_mf @ 0000020a522fab80] -enc_time_base -1 is deprecated, use -enc_timebase demux
2025/03/21 08:24:07.104146 [HLS] ffmpeg: capture-camera:  [aost#0:1/aac @ 0000020a522fec80] -enc_time_base -1 is deprecated, use -enc_timebase demux
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  [Eval @ 000000c6119fdb40] Undefined constant or missing '(' in 'prev_t))'
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  [Eval @ 000000c6119fdb40] Missing ')' or too many args in 'gt(floor(t),floor(prev_t))'
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  [vost#0:0/h264_mf @ 0000020a522fab80] Invalid force_key_frames expression 'gt(floor(t),floor(prev_t))'
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  [out#0/mpegts @ 0000020a522e37c0] Error processing forced keyframes
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  Error opening output file -.
2025/03/21 08:24:07.104655 [HLS] ffmpeg: capture-camera:  Error opening output files: Invalid argument
2025/03/21 08:24:07.134117 [ERR] Error during stream M3U-USBCapture ch9005 USB Capture: exit status 0xffffffea
2025/03/21 08:24:07.134117 [TNR] Closed connection to M3U-USBCapture for ch9005 USB Capture
2025/03/21 08:24:07.134117 [HLS] ffmpeg: ch9005-dANY-ip10.10.12.25-remux:  [in#0/mpegts @ 000001dc36887bc0] could not find codec parameters
2025/03/21 08:24:07.134117 [HLS] ffmpeg: ch9005-dANY-ip10.10.12.25-remux:  Error opening input file -.
2025/03/21 08:24:07.134117 [HLS] ffmpeg: ch9005-dANY-ip10.10.12.25-remux:  Error opening input files: End of file
2025/03/21 08:24:16.933664 [ERR] Probe failed for live stream after 10.0424215s and 0 bytes
2025/03/21 08:24:17.198732 [HLS] Couldn't generate stream playlist for ch9005-dANY-ip10.10.12.25: Couldn't find playlist: C:\-- Channels DVR\Streaming\ch9005-dANY-ip10.10.12.25-2668537006\remux\stream.m3u8: CreateFile C:\-- Channels DVR\Streaming\ch9005-dANY-ip10.10.12.25-2668537006\remux\stream.m3u8: The system cannot find the file specified.
2025/03/21 08:24:17.198732 [HLS] Stopping transcoder session ch9005-dANY-ip10.10.12.25 (out=0s finished=true first_seq=0 last_seq=-1)

HDMI Capture works fine in VLC. Any help greatly appreciated, thanks!

Update prerelease

That worked, thanks!

Ok so it randomly started working today. Then I did a bit of cable management and it stopped working again and I now have to reconnect every time I want to stream. Having the same error log as before. @tmm1

Make sure you are using a blue usb 3.0 port.

Most of those USB Capture devices even though they have a blue plug are really USB 2.0... they are fake USB 3.0.

Here is a screenshot of my card that Claims to be 3.0 and has a blue Cable....

Thanks @Rice The framefate dropped from 60 to 20fps on an i7 nuc running linux. It was in a usb 3/ lightning port when it was working at 60fps. tried a in a blue usb 3.0 and drops to 20 fps and stops working too.

I think you mean Thunderbolt.

Thanks yes I did mean that :slight_smile: