gpt4 book ai didi

带有音频的 FFMPEG SreenRecorder 不添加 DrawText

转载 作者:行者123 更新时间:2023-12-04 23:21:49 25 4
gpt4 key购买 nike

我正在使用 FFMPEG 使用 gdigrab 录制整个屏幕,以及录制麦克风音频和虚拟音频捕获器。花了很长时间,但我让它工作并保存为 mkv 文件。我正在使用 Vb.net 将字符串传递给 FFMPEG。这是字符串。
"/k ffmpeg.exe -y -rtbufsize 1500M -f dshow -i audio=@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{16F2BCE9-4F86-4C29-8B2C-B70508551DC7} -f dshow -i audio =@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}{8E146464-DB61-4309-AFA1-3578E927E935} -f gdigrab -framerate 50 -i desktop -codec:v h264_nvenc -qp 0 -vf drawtext=fontfile=C:\Windows\ARLRDBD.TTF:Text="& MyProgName & "fontcolor=white:fontsize=24:box=1:shadowcolor=darkblue:shadowx=1:shadowy=1:boxcolor=blue@0.6:boxborderw=5:x= 50:y=H-th-50:-filter_complex [0:a][1:a]amerge=inputs=2[a] -map 2 -map [a] "& str & "\Recordings\ScreenRecorder"& FileTime &“.mkv”
问题是它不会在屏幕上绘制文本,我收到以下错误。

    Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=@device_cm_{33D9A762-90C8-11D0-BD43-
00A0C911CE86}\wave_{16F2BCE9-4F86-4C29-8B2C-B70508551DC7}':
Duration: N/A, start: 840168.175000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=@device_sw_{33D9A762-90C8-11D0-BD43-
00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927E935}':
Duration: N/A, start: 840168.949000, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[gdigrab @ 000001b92bad9880] Capturing whole desktop as
1366x768x32 at (0,0)
[gdigrab @ 000001b92bad9880] Stream #0: not enough frames to
estimate rate; consider increasing probesize
Input #2, gdigrab, from 'desktop':
Duration: N/A, start: 1602928621.299032, bitrate: 1678562 kb/s
Stream #2:0: Video: bmp, bgra, 1366x768, 1678562 kb/s, 50 fps,
1000k tbr, 1000k tbn, 1000k tbc
[NULL @ 000001b92badb300] Unable to find a suitable output format
for '[0:a][1:a]amerge=inputs=2[a]'
[0:a][1:a]amerge=inputs=2[a]: Invalid argument
Received stop event after 9 passes
如果有人能看到我哪里出错并指出我正确的方向,那将不胜感激。

最佳答案

不要同时使用 -vf-filter_complex .只需使用 -filter_complex :

"/k ffmpeg.exe -y -rtbufsize 1500M -f dshow -i audio=@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{16F2BCE9-4F86-4C29-8B2C-B70508551DC7} -f dshow -i audio=@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}{8E146464-DB61-4309-AFA1-3578E927E935} -f gdigrab -framerate 50 -i desktop -codec:v h264_nvenc -qp 0 -filter_complex drawtext=fontfile=C:\Windows\ARLRDBD.TTF:text=" & MyProgName & "fontcolor=white:fontsize=24:box=1:shadowcolor=darkblue:shadowx=1:shadowy=1:boxcolor=blue@0.6:boxborderw=5:x=50:y=H-th-50[v];[0:a][1:a]amerge=inputs=2[a] -map [v] -map [a] " & str & "\Recordings\ScreenRecorder" & FileTime & ".mkv"

关于带有音频的 FFMPEG SreenRecorder 不添加 DrawText,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64401221/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com