qtav播放采集卡

打印提示这个,

"delay -0.503952s @282907.518s pts:282907.014"


搜索代码

qDebug("delay %fs @%.3fs pts:%.3f", diff, d.clock->value(), pkt.pts);

F:\qt-project\QtAV\src\VideoThread.cpp:424


同时打开音视频会不会好点

https://github.com/wang-bin/QtAV/issues/766



test@DESKTOP-Q93AOQR C:\ffmpeg\bin>.\ffmpeg -f dshow -list_devices true -i dummy
ffmpeg version 2022-11-28-git-becbb22eb0-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
   built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp -
-enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvi
d --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzi
mg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --ena
ble-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enab
le-librubberband
   libavutil      57. 43.100 / 57. 43.100
   libavcodec     59. 54.100 / 59. 54.100
   libavformat    59. 34.102 / 59. 34.102
   libavdevice    59.  8.101 / 59.  8.101
   libavfilter     8. 50.101 /  8. 50.101
   libswscale      6.  8.112 /  6.  8.112
   libswresample   4.  9.100 /  4.  9.100
   libpostproc    56.  7.100 / 56.  7.100
[dshow @ 000001cc4e3cb100] "UHD Video 1 (LT8581-UHD Card)" (video)
[dshow @ 000001cc4e3cb100]   Alternative name "@device_pnp_\\?\pci#ven_8888&dev_8581&subsys_00078888&rev_00#6&3a91b353&0&0008000a#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\hdvideo1"
[dshow @ 000001cc4e3cb100] "JYJS Video Streaming" (video)
[dshow @ 000001cc4e3cb100]   Alternative name "@device_pnp_\\?\usb#vid_048d&pid_9325&mi_00#7&30d34b43&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 000001cc4e3cb100] "OBS Virtual Camera" (video)
[dshow @ 000001cc4e3cb100]   Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{A3FCE0F5-3493-419F-958A-ABA1250EC20B}"
[dshow @ 000001cc4e3cb100] "HDMI01 (JYJS Audio Streaming)" (audio)
[dshow @ 000001cc4e3cb100]   Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{C9751416-2BC5-46E8-9A21-55923B6623B8}"
[dshow @ 000001cc4e3cb100] "UHD Audio 1 (LT8581-UHD Card) (LT8581-UHD Card)" (audio)
[dshow @ 000001cc4e3cb100]   Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{0B79909D-E4B9-4268-BF86-52A3B797ABAE}"



//采集卡

//usb1:Live Streaming Video Device
//usb2:JYJS Video Streaming
//pcie:UHD Video 1 (LT8581-UHD Card)
#define QS_PLAY_CAMERA QString("avdevice:dshow:video=JYJS Video Streaming")

//同时播放音视频,发现延迟更大

https://github.com/wang-bin/QtAV/issues/766

#define QS_PLAY_CAMERA QString("avdevice:dshow:video=JYJS Video Streaming:audio=HDMI01 (JYJS Audio Streaming)")


m_player->play(QS_PLAY_CAMERA);



ffmpeg -f dshow -list_options true -i video="JYJS Video Streaming"



ffmpeg 录制参数:

https://www.cnblogs.com/mjios/p/14717028.html

posted on 2023-03-06 18:00  katago  阅读(70)  评论(0编辑  收藏  举报