先安裝dshow軟件 Screen Capturer Recorder,
項(xiàng)目地址:https://sourceforge.net/projects/screencapturer/files/
然后查看可用設(shè)備名字:ffmpeg -list_devices true -f dshow -i dummy
[dshow @ 0509d6c0] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0509d6c0] "Integrated Webcam" //筆記本攝像頭
[dshow @ 0509d6c0] Alternative name
"@device_pnp_\\?\usb#vid_0bda&pid_5689&mi_00#6&233dd6c7&0&0000#{65e8773d-8f56-11
d0-a3b9-00a0c9223196}\global"
[dshow @ 0509d6c0] "e2eSoft VCam"
[dshow @ 0509d6c0] Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\e2eSoft
VCam"
[dshow @ 0509d6c0] "screen-capture-recorder"
[dshow @ 0509d6c0] Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-
00A0C911CE86}\{4EA6930A-2C8A-4AE6-A561-56E4
B5044439}"
[dshow @ 0509d6c0] DirectShow audio devices
[dshow @ 0509d6c0] "楹﹀厠椋?(Realtek Audio)"
[dshow @ 0509d6c0] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-
00A0C911CE86}\wave_{8B8892E5-D3E5-47EC-8B5E
-CEEBF54014E7}"
[dshow @ 0509d6c0] "virtual-audio-capturer"
[dshow @ 0509d6c0] Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-
00A0C911CE86}\{8E14549B-DB61-4309-AFA1-3578
2
E927E935}"
dummy: Immediate exit requested
錄制視頻(默認(rèn)參數(shù))
桌面:ffmpeg -f dshow -i video="screen-capture-recorder" v-out.mp4
攝像頭: ffmpeg -f dshow -i video="Integrated Webcam" -y v-out2.flv (要根據(jù)自己攝像頭名稱(chēng))
錄制聲音(默認(rèn)參數(shù))
系統(tǒng)聲音:ffmpeg -f dshow -i audio="virtual-audio-capturer" a-out.aac
系統(tǒng)+麥克風(fēng)聲音:ffmpeg -f dshow -i audio="麥克風(fēng) (Realtek Audio)" -f dshow -i audio="virtual-audio-capturer" -filter_complex amix=inputs=2:duration=first:dropout_transition=2 a-out2.aac
同時(shí)錄制聲音和視頻(默認(rèn)參數(shù))
ffmpeg -f dshow -i audio="麥克風(fēng) (Realtek Audio)" -f dshow -i audio="virtualaudio-capturer" -filter_complex amix=inputs=2:duration=first:dropout_transition=2 -f dshow -i video="screen-capture-recorder" -y av-out.flv
查看視頻錄制的可選參數(shù)
ffmpeg -f dshow -list_options true -i video="screen-capture-recorder"
[dshow @ 02f0d6c0] DirectShow video device options (from video devices)
[dshow @ 02f0d6c0] Pin "Capture" (alternative pin name "1")
[dshow @ 02f0d6c0] pixel_format=bgr0 min s=1x1 fps=0.02 max s=1920x1080 fps=30
[dshow @ 02f0d6c0] pixel_format=bgr0 min s=1x1 fps=0.02 max s=1920x1080 fps=30
[dshow @ 02f0d6c0] pixel_format=bgr24 min s=1x1 fps=0.02 max s=1920x1080 fps=30
[dshow @ 02f0d6c0] pixel_format=rgb555le min s=1x1 fps=0.02 max s=1920x1080
fps=30
[dshow @ 02f0d6c0] pixel_format=rgb555le min s=1x1 fps=0.02 max s=1920x1080
fps=30
[dshow @ 02f0d6c0] pixel_format=rgb8 min s=1x1 fps=0.02 max s=1920x1080 fps=30
[dshow @ 02f0d6c0] pixel_format=yuv420p min s=1x1 fps=0.02 max s=1920x1080
fps=30
查看視頻錄制的可選參數(shù)
ffmpeg -f dshow -list_options true -i audio="virtual-audio-capturer“
[dshow @ 05a2d6c0] DirectShow audio only device options (from audio devices)
[dshow @ 05a2d6c0] Pin "Capture Virtual Audio Pin" (alternative pin name "1")
[dshow @ 05a2d6c0] min ch=2 bits=16 rate= 48000 max ch=2 bits=16 rate= 48000
ffmpeg -f dshow -list_options true -i audio="麥克風(fēng) (Realtek Audio)"
指定參數(shù)錄制音視頻文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-685222.html
ffmpeg -f dshow -i audio="麥克風(fēng) (Realtek Audio)" -f dshow -i
audio="virtual-audio-capturer" -filter_complex
amix=inputs=2:duration=first:dropout_transition=2 -f dshow -video_size
1920x1080 -framerate 15 -pixel_format yuv420p -i video="screen-capturerecorder" -vcodec h264_qsv -b:v 3M -y av-out.flv
ffmpeg -f dshow -i audio="麥克風(fēng) (Realtek Audio)" -f dshow -i
audio="virtual-audio-capturer" -filter_complex
amix=inputs=2:duration=first:dropout_transition=2 -f dshow -i
video="screen-capture-recorder" -vcodec h264_qsv -b:v 3M -r 15 -y avout2.mp4
ffmpeg -f dshow -i audio="麥克風(fēng) (Realtek Audio)" -f dshow -i
audio="virtual-audio-capturer" -filter_complex
amix=inputs=2:duration=first:dropout_transition=2 -f dshow -framerate 15
-pixel_format yuv420p -i video="screen-capture-recorder" -vcodec
h264_qsv -b:v 3M -r 15 -y av-out3.mp4
推薦一個(gè)零聲學(xué)院項(xiàng)目課,個(gè)人覺(jué)得老師講得不錯(cuò),分享給大家:
零聲白金學(xué)習(xí)卡(含基礎(chǔ)架構(gòu)/高性能存儲(chǔ)/golang云原生/音視頻/Linux內(nèi)核)
https://xxetb.xet.tech/s/VsFMs文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-685222.html
到了這里,關(guān)于音視頻 ffmpeg命令視頻錄制(Windows)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!