USB HDMI Capture

Does it help if you:

macOS > System Settings > Privacy & Security > Screen & Audio System Recording > :heavy_plus_sign: > ~/Library/Application Support/ChannelsDVR/latest/ffmpeg

Okay getting close hopefully

1 Like

No video no audio. Timeout after 32sec


2025/03/09 23:04:24.590472 [TNR] Opened connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/09 23:04:24.592403 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0x3bf0c680] Cannot open video device /dev/video0: No such file or directory
2025/03/09 23:04:24.592421 [HLS] ffmpeg: capture-usb-hdmi:  /dev/video0: No such file or directory
2025/03/09 23:04:24.592682 [ERR] Error during stream M3U-usbhdmi ch201 USB HDMI Capture: exit status 1
2025/03/09 23:04:24.592692 [TNR] Closed connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/09 23:04:24.592747 [SNR] Buffer statistics for 192.168.1.131 (Casey’s iPhone) for ch201 USB HDMI Capture: buf=0% drop=0%

Not sure about that one. Maybe the device needs to be replugged?

We're planning some upgrades soon that will hopefully address the issue you noted where its not closing.

Restarted machine and replugged in the card. At least it’s finding video0 again. Still times out after 32sec.


2025/03/09 23:28:50.318669 [TNR] Opened connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/09 23:28:50.911155 [HLS] ffmpeg: capture-usb-hdmi:  Option enc_time_base (set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). two special values are defined - 0 = use frame rate (video) or sample rate (audio),-1 = match source time base) cannot be applied to input url hw:Video,0 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
2025/03/09 23:28:50.911187 [HLS] ffmpeg: capture-usb-hdmi:  Error parsing options for input file hw:Video,0.
2025/03/09 23:28:50.911188 [HLS] ffmpeg: capture-usb-hdmi:  Error opening input files: Invalid argument
2025/03/09 23:28:50.911190 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0x344e4680] Some buffers are still owned by the caller on close.
2025/03/09 23:28:50.916223 [HLS] ffmpeg: capture-usb-hdmi:  ioctl(VIDIOC_QBUF): Bad file descriptor
2025/03/09 23:28:50.916978 [ERR] Error during stream M3U-usbhdmi ch201 USB HDMI Capture: exit status 1
2025/03/09 23:28:50.916997 [TNR] Closed connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/09 23:28:50.917091 [SNR] Buffer statistics for 192.168.1.131 (Casey’s iPhone) for ch201 USB HDMI Capture: buf=0% drop=0%

Just spins


2025/03/10 01:30:22.437841 [TNR] Opened connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/10 01:30:22.816777 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0xf2a5680] Dequeued v4l2 buffer contains corrupted data (0 bytes).
2025/03/10 01:30:22.843060 [HLS] ffmpeg: capture-usb-hdmi:  Guessed Channel Layout for Input Stream #1.0 : stereo
2025/03/10 01:30:22.843353 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0xf2a5680] Dequeued v4l2 buffer contains corrupted data (0 bytes).
2025/03/10 01:30:22.853388 [HLS] ffmpeg: capture-usb-hdmi:      Last message repeated 7 times
2025/03/10 01:30:22.853396 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0xf2a5680] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
2025/03/10 01:30:22.853400 [HLS] ffmpeg: capture-usb-hdmi:  [video4linux2,v4l2 @ 0xf2a5680] Dequeued v4l2 buffer contains corrupted data (0 bytes).
2025/03/10 01:30:23.562761 [HLS] ffmpeg: capture-usb-hdmi:      Last message repeated 22 times
2025/03/10 01:30:23.562789 [HLS] ffmpeg: capture-usb-hdmi:  [alsa @ 0xf2a75c0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 256)
2025/03/10 01:30:50.657294 [SNR] Buffer statistics for 192.168.1.131 (Casey’s iPhone) for ch201 USB HDMI Capture: buf=0% drop=0%
2025/03/10 01:30:50.657344 [ERR] Error during stream M3U-usbhdmi ch201 USB HDMI Capture: read |0: file already closed
2025/03/10 01:30:50.657351 [TNR] Closed connection to M3U-usbhdmi for ch201 USB HDMI Capture
2025/03/10 01:30:50.678512 [HLS] ffmpeg: capture-usb-hdmi:  av_interleaved_write_frame(): Broken pipe
2025/03/10 01:30:50.703383 [HLS] ffmpeg: capture-usb-hdmi:      Last message repeated 32 times
2025/03/10 01:30:50.703427 [HLS] ffmpeg: capture-usb-hdmi:  Error writing trailer of pipe:: Broken pipe
2025/03/10 01:30:50.703435 [HLS] ffmpeg: capture-usb-hdmi:  Error closing file pipe:: Broken pipe

No change - submitted dde049dc-181a-44ac-ae35-fd6563894310

@tmm1 sent you a pm on this

1 Like

capture://v4l2/video0
Using the device you linked, I can get video but no audio using Ubuntu 24.04.2. Video looks great!

I tried the last one you posted as well, but that just spins.
capture://v4l2/video0/hw:Video,0/?framerate=60

Hi, have you had any luck on getting the audio working? The picture is coming through perfect now.

Not with //capture. I get the same results as @timstephens24 above. I did find an hdmi audio stripper in my parts bin and I am having better results combining the separate audio with the video and streaming it to channels via m3u. It seems like Linux doesn’t like capturing the audio and video from the usb, it will capture one or the other but not both at the same time. I might share some scripts if I can get something working. I’m working on starting and stopping the m3u transcode based on when the channel is tuned in and out.

Sounds good thanks. Do you think I'd have better luck with a windows 11 pc? It's a shame that Linux doesn't like doing both. I get both in VLC. Fingers crossed you get something stable with the audio stripper

Yes I think windows is working much better based on the above posts. I haven’t tried in windows myself though.

Does this help?

Also found this:

https://trac.ffmpeg.org/wiki/Capture/V4L2_ALSA

@tmm1 @Rice

The Dell OptiPlex Micros are an excellent Channels bang for your buck. They have transcoding and I5 power with very low power usage.
You can get a 5060 under $100 on eBay and it will legitimately run Windows 11, a bunch of Dockers, and record 10 things at a time.
I just migrated to a 5090 ($160) for the extra cores and now I can record 20 things at once, run 8 Dockers, and use multiple threads to process commercials.
Through experimentation, I found that the I5 processors were power efficient but needed an I7 to run Chrome Capture for Channels. I went back to the I5 and ADBtuner so I wouldn't hear the fan running all day.
I can't tell you that a 7-year-old I5 processor will run the USB HDMI Capture hack, but it's gotta be better than the Pi.

1 Like

Can confirm working good!!

1 Like

Try adding /System/Library/CoreServices/launchservicesd under camera/audio/screen-recording permissions maybe?

https://developer.apple.com/forums/thread/772886?answerId=821956022#821956022

2 Likes