USB HDMI Capture

@tmm1 Something changed on the server end. I can no longer run the command in cmd to list the devices.

C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -list_devices true -f dshow -i dummy
Access is denied.

I get the blue pop up " This app can not run on this PC. To find a version for your pc, contact the software publisher."

In the CMD output, it just says "Access Denied"

I ddi try running CMD as Admin, same issue.

I plugged in a different webcam i have, and went to look for the device name, but ran in to this issue.

EDIT: I just copied the ffmpeg and things from the older server backups into a separate folder and path and used that for looking up devices in cmd.

@tmm1 I have not changed anything with my other m3u lines, i just added the new device....yet now, nothing is streaming and the server logs say this.

2025/02/24 13:01:20.571996 [ERR] Failed to start ffmpeg: fork/exec C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe: %1 is not a valid Win32 application.
2025/02/24 13:01:20.573141 [TNR] Opened connection to M3U-USBHDMICapture for ch1201 WYZE USB CAM
2025/02/24 13:01:20.573141 [ERR] Error during stream M3U-USBHDMICapture ch1201 WYZE USB CAM: read |0: file already closed
2025/02/24 13:01:20.573141 [TNR] Closed connection to M3U-USBHDMICapture for ch1201 WYZE USB CAM
2025/02/24 13:01:20.573748 [SNR] Buffer statistics for 192.168.0.17 (Apple TV) for ch1201 WYZE USB CAM: buf=0% drop=0%
2025/02/24 13:01:52.206177 [ERR] Failed to start ffmpeg: fork/exec C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe: %1 is not a valid Win32 application.
2025/02/24 13:01:52.206177 [TNR] Opened connection to M3U-USBHDMICapture for ch1200 USB Webcam
2025/02/24 13:01:52.206177 [ERR] Error during stream M3U-USBHDMICapture ch1200 USB Webcam: read |0: file already closed
2025/02/24 13:01:52.206836 [TNR] Closed connection to M3U-USBHDMICapture for ch1200 USB Webcam
2025/02/24 13:01:52.206836 [SNR] Buffer statistics for 192.168.0.17 (Apple TV) for ch1200 USB Webcam: buf=0% drop=0%

server version is still: 2025.02.24.1812
Commercial detection also failing now cause it uses ffmpeg.

Weird. Is the new prerelease any better?

Working again ....so far.

Must be missing a step on MacOS here. FWIW the swiches are different too
blah latest

% ./ffmpeg -devices             
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 --
 D  avfoundation    AVFoundation input device
 D  lavfi           Libavfilter virtual input device
blah latest % ./ffmpeg -sources avfoundation
Auto-detected sources for avfoundation:
Cannot list sources: Function not implemented

See:

1 Like

@tmm1
I am trying to setup this on my Windows 11 machine but I think my M3U is wrong

#EXTM3U

#EXTINF:-1, channel-id="usb-hdmi",USB HDMI Capture
capture://USB3.0 HD Video/USB Digital Audio/?framerate=60
[dshow @ 00000289eb1d37c0] "USB3.0 HD Video" (video)
[dshow @ 00000289eb1d37c0]   Alternative name "@device_pnp_\\?\usb#vid_534d&pid_2109&mi_00#6&2d21bbdc&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 00000289eb1d37c0] "Digital Audio Interface (USB Digital Audio)" (audio)
[dshow @ 00000289eb1d37c0]   Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{E9D55639-2A44-4535-

It should be capture://dshow/...

1 Like
2025/02/24 13:58:16.096034 [TNR] Opened connection to M3U-HDMICAPTURE for ch9467 USB HDMI Capture
2025/02/24 13:58:16.096034 [HLS] Starting live stream for channel 9467 from 192.168.50.217
2025/02/24 13:58:16.171632 [HLS] ffmpeg: capture-usb-hdmi:  [dshow @ 000001b9717c7640] Could not enumerate video devices (or none found).
2025/02/24 13:58:16.172747 [HLS] ffmpeg: capture-usb-hdmi:  video=USB3.0 HD Video:audio=USB Digital Audio: I/O error
2025/02/24 13:58:16.177171 [ERR] Error during stream M3U-HDMICAPTURE ch9467 USB HDMI Capture: exit status 1
2025/02/24 13:58:16.177171 [TNR] Closed connection to M3U-HDMICAPTURE for ch9467 USB HDMI Capture
2025/02/24 13:58:16.178279 [HLS] ffmpeg: ch9467-dANY-ip192.168.50.217-remux:  Output file #0 does not contain any stream
2025/02/24 13:58:16.180472 [HLS] Stopping transcoder session ch9467-dANY-ip192.168.50.217 (out=0s finished=true first_seq=0 last_seq=-1)
2025/02/24 13:58:16.180472 [ERR] Probe cancelled for live stream after 84.4376ms and 0 bytes
1 Like

I can capture using this .....

C:\Users\epere>ffmpeg -f dshow -rtbufsize 100M -video_size 1280x720 -framerate 60 -vcodec mjpeg -i video="USB3.0 HD Video":audio="Digital Audio Interface (USB Digital Audio)" -vcodec h264_qsv -b:v 7000k -acodec aac vid_720p_60fps.mp4

1 Like

Try

capture://dshow/USB3.0 HD Video/Digital Audio Interface (USB Digital Audio)/?framerate=60

2025/02/24 14:18:31.834243 [HLS] ffmpeg: capture-usb-hdmi: [dshow @ 000001757dc08500] Could not enumerate video devices (or none found).
2025/02/24 14:18:31.835572 [HLS] ffmpeg: capture-usb-hdmi: video=USB3.0 HD Video:audio=Digital Audio Interface (USB Digital Audio): I/O error
2025/02/24 14:18:31.840092 [ERR] Error during stream M3U-HDMICAPTURE ch9467 USB HDMI Capture: exit status 1

Hmm weird. It says cannot see any devices.

Maybe this is due to running as a service?

Never mind it is my fault BRB

It is working is there a way to set codec to copy or higher bitrate

2025/02/24 14:50:50.092412 [HLS] Starting live stream for channel 9000 from 127.0.0.1
2025/02/24 14:50:50.620985 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001cd1033f440] Found EOI before any SOF, ignoring
2025/02/24 14:50:50.620985 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001cd1033f440] No JPEG data found in image
2025/02/24 14:50:50.653226 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001cd1033f440] EOI missing, emulating
2025/02/24 14:50:51.059827 [HLS] ffmpeg: capture-usb-hdmi:  Guessed Channel Layout for Input Stream #0.1 : stereo
2025/02/24 14:50:51.061440 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001cd121b1b00] Found EOI before any SOF, ignoring
2025/02/24 14:50:51.061440 [HLS] ffmpeg: capture-usb-hdmi:  [mjpeg @ 000001cd121b1b00] No JPEG data found in image
2025/02/24 14:50:51.061440 [HLS] ffmpeg: capture-usb-hdmi:  Error while decoding stream #0:0: Invalid data found when processing input
2025/02/24 14:50:51.072284 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd18c79f00] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.072861 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd18cdda00] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.073421 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd18d386c0] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.074566 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd18d89240] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.075128 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd19339cc0] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.075686 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd1934bfc0] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.076829 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd1941a040] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.077391 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd19428f00] deprecated pixel format used, make sure you did set range correctly
2025/02/24 14:50:51.078514 [HLS] ffmpeg: capture-usb-hdmi:  [swscaler @ 000001cd18c5cec0] [swscaler @ 000001cd194c1040] deprecated pixel format used, make sure you did set range correctly

2 Likes

See posts above

So maybe try
capture://dshow/USB3.0 HD Video/Digital Audio Interface (USB Digital Audio)/?framerate=60&video_size=1920x1080&bitrate=20000&format=ts&codec=copy

I had to set it to min 20000, just for it to look decent. 60000 and it is about the best i can get.
Also, set rez to 1080
Not sure what else could be done to improve quality.

2 Likes

Much sharper with higher bitrate.

Can you check the ffmpeg command running while it's streaming.

Get-WmiObject Win32_Process | select commandline | Select-String -Pattern "ffmpeg"

'Get-WmiObject' is not recognized as an internal or external command,
operable program or batch file.