USB HDMI Capture

for me: streaming from the hdmi capture (not webcams) (I also will be getting a different dongle like capture device via Amazon Vine later in the week)

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\WINDOWS\system32> Get-WmiObject Win32_Process | select commandline | Select-String -Pattern "ffmpeg"

@{commandline=C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -f dshow -framerate
60 -video_size 1920x1080 -rtbufsize 40M -fflags discardcorrupt -copyts -probesize 8000000 -i
"video=J5-CAPTURE:audio=Digital Audio Interface (J5-AUDIO)" -enc_time_base -1 -max_muxing_queue_size 4096 -muxdelay 0
-ignore_unknown -map 0:v:0? -map 0:a? -map 0:s? -c:v h264_mf -g:v 60 -force_key_frames:v source -hw_encoding 1
-profile:v high -bsf:v h264_metadata=a53_cc=insert -filter:v format=nv12,fastdeint=blend,format=nv12 -b:v 50000k
-minrate 45000k -maxrate 55000k -bufsize 100000k -c:a aac -ac 2 -filter:a aresample=async=1 -c:s copy -f mpegts -}


PS C:\WINDOWS\system32>

my m3u

#EXTM3U
#EXTINF:-1, channel-id="usb-webcam",USB Webcam
capture://dshow/HD Pro Webcam C920/Microphone (HD Pro Webcam C920)/?framerate=30&video_size=1920x1080&bitrate=20000

#EXTM3U
#EXTINF:-1, channel-id="usb-WYZE",WYZE USB CAM
capture://dshow/HD USB Camera/Microphone (HD USB Camera)/?framerate=30&video_size=1920x1080&bitrate=20000

#EXTM3U
#EXTINF:-1, channel-id="usb-hdmi",USB HDMI Capture
capture://dshow/J5-CAPTURE/Digital Audio Interface (J5-AUDIO)/?framerate=60&video_size=1920x1080&bitrate=50000
PS C:\WINDOWS\system32> Get-CimInstance Win32_Process | select commandline | Select-String -Pattern "ffmpeg"

@{commandline=C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -f dshow -framerate
60 -video_size 1920x1080 -rtbufsize 40M -fflags discardcorrupt -copyts -probesize 8000000 -i "video=USB3.0 HD
Video:audio=Digital Audio Interface (USB Digital Audio)" -enc_time_base -1 -max_muxing_queue_size 4096 -muxdelay 0
-ignore_unknown -map 0:v:0? -map 0:a? -map 0:s? -c:v h264_qsv -g:v 60 -force_key_frames:v source -profile:v high
-forced_idr 1 -low_power 0 -filter:v format=nv12,fastdeint=blend,format=nv12|qsv -b:v 20000k -minrate 18000k -maxrate
22000k -bufsize 40000k -c:a aac -ac 2 -filter:a aresample=async=1 -c:s copy -f mpegts -}
@{commandline=C:\ProgramData\ChannelsDVR\latest\ffmpeg.exe -hide_banner -nostats -loglevel warning -progress
http://127.0.0.1:8089/hls/progress?key=ch9000-dANY-ip127.0.0.1-remux -fflags discardcorrupt+genpts -f mpegts
-probesize 8000000 -i - -enc_time_base -1 -max_muxing_queue_size 4096 -muxdelay 0 -map 0:v:0? -map 0:a?
-ignore_unknown -map 0:s? -c:v copy -c:a copy -c:s copy -f hls -hls_time 1.000000 -hls_list_size 3600
-hls_delete_threshold 1 -hls_flags temp_file+delete_segments -start_number 1 -hls_passthrough_subtitles 1
D:\ChannelsDVR\Streaming\ch9000-dANY-ip127.0.0.1-911130758\remux\stream.m3u8}

Thx. Try the latest prerelease. I think bitrate=8000 should be enough.

That's 8,000 Kbps or 8 Mbps, correct?

1 Like

Looks better to me, though i did not remove my bitrate value. so?

Looks good.

#EXTM3U

#EXTINF:-1, channel-id="usb-hdmi",USB HDMI Capture
capture://dshow/USB3.0 HD Video/Digital Audio Interface (USB Digital Audio)/?framerate=60&video_size=1920x1080
1 Like

@tmm1 So... does it no longer honor a &bitrate value in the m3u?

I see its behavior tends to be VBR? stays around 8k, but i do see it peaking up to at least my set value.

It uses whatever bitrate you provide. Yes the transcoder uses VBR.

Quality improvements will likely not be noticible above 6-8mbps

Anyway to not have it not transcode and just remux/ pass through the raw original signal?
Or is that not possible with how all this usb capture card stuff works?

Capture cards don't produce h264 video.

Mine Shows MJPEG so it needs to be transcoded.

C:\Users\epere>ffmpeg -f dshow -list_options true -i video="USB3.0 HD Video" 
[dshow @ 0000013863bee0c0] DirectShow video device options (from video devices)
[dshow @ 0000013863bee0c0]  Pin "Capture" (alternative pin name "0")
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1920x1080 fps=10 max s=1920x1080 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1600x1200 fps=10 max s=1600x1200 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1360x768 fps=10 max s=1360x768 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1360x768 fps=10 max s=1360x768 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x1024 fps=10 max s=1280x1024 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x1024 fps=10 max s=1280x1024 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x960 fps=10 max s=1280x960 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x960 fps=10 max s=1280x960 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x720 fps=10 max s=1280x720 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1280x720 fps=10 max s=1280x720 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1024x768 fps=10 max s=1024x768 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=1024x768 fps=10 max s=1024x768 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=800x600 fps=10 max s=800x600 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=800x600 fps=10 max s=800x600 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=720x576 fps=10 max s=720x576 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=720x576 fps=10 max s=720x576 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=720x480 fps=10 max s=720x480 fps=60.0002
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=720x480 fps=10 max s=720x480 fps=60.0002 (pc, bt470bg/bt709/unknown, center)
[dshow @ 0000013863bee0c0]   vcodec=mjpeg  min s=640x480 fps=10 max s=640x480 fps=60.0002
1 Like

Well, i don't know, just the specs for mine list it does
compressions

USB™ 3.0: MJPEG/YUV 4:2:2

USB™ 2.0: MJPEG

encode format

MP4, MJPEG, H.264 / AVC + AACX

So i thought it could just output that and direct into Channels.
The card shows h264 even in the native win 11 Camera app and does mp4 h264 when i hit record in that app. Also when using in Cyberlink capture preview window. But, maybe that is the software that is encodeing some raw signal? i do not know much about how these things work. So thought i woudl ask.

You can run the command @Edwin_Perez showed to see the supported formats

OK, I'm making progress. Using

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

the video from my FireTV plays flawlessly in full 1080p! At first I was getting just clicks for the audio, but then I went into the FireTV and changed from DD+ to PCM, and everything started working, including audio. Now, I can watch full quality video from this source on my AppleTV in the living room, and looks as good as it does direct on the YTTV app. So, big kudos to @tmm1 for fixing all the little issues that came up. My log is 100% clean, no errors being displayed.

Question: is Dolby Digital a possibility with these capture cards? Or, is PCM the only alternative?

Next step: now that the video capture part is working fine, I need to figure out the ADBTuner part. From the previous posts and from @turtletank I understood that the M3U URL should be of the form:

http://CHANNELS_DVR_HOST_OR_IP:8089/devices/M3U-USBHDMI/channels/CHANNEL_NUMBER/stream.mpg?format=ts

However, mine is:

http://127.0.0.1:8089/devices/M3U-FireTVCapture/channels.m3u?format=ts&codec=copy

In other words, missing the CHANNEL_NUMBER part. Am I doing something wrong?

Thanks,
-Kal.

These Capture USB cards only use Stereo or Mono.

Look at the guide and use the channel number that was assigned

Or if you download the channels.m3u file and look inside you'll see the stream url

Where will I find the channels.m3u file in Windows 10?

The link you pasted earlier

I guess you can use this input into ADBTUNER .... To launch app tune to a channel and Capture the Stream. You can have a USB hub running several Capture cards.

http://127.0.0.1:8089/devices/M3U-HDMICapture/channels/9000/stream.mpg?format=ts&codec=copy)

Ah! I didnt realize you could paste that into the browser, and it downloads a file. Learning...