[FFmpeg-user] Overlay Error reoccurring

John Henderson acaciasd at googlemail.com
Wed Oct 21 09:02:49 EEST 2020


Hi There,

I have this code, which works correctly without the overlay code

/k ffmpeg.exe -y -rtbufsize 1500M

*-vf drawtext=fontfile=C:\Windows\ARLRDBD.TTF:text='Snatch Media
Player':fontcolor=white:fontsize=24:
box=1:shadowcolor=darkblue:shadowx=1:shadowy=1:boxcolor=blue at 0.6:boxborderw=5:x=50:y=H-th-50*


-f dshow -i audio="Microphone (High Definition Audio Device)" -f dshow -i
audio=virtual-audio-capturer -f gdigrab -framerate 50 -i desktop -codec:v
h264_nvenc -qp 0 -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map 2 -map
"[a]"
 C:\Users\User\source\repos\Mini-Media-Streamer\Mini-Media-Streamer\bin\Debug\Recordings\ScreenRecorder20201021064941.mkv

The error I keep getting is...

Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Microphone (High Definition Audio Device)':
  Duration: N/A, start: 1171381.310000, 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=virtual-audio-capturer':
  Duration: N/A, start: 1171382.071000, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[gdigrab @ 000001c801d08740] Capturing whole desktop as 1366x768x32 at (0,0)
[gdigrab @ 000001c801d08740] Stream #0: not enough frames to estimate rate;
consider increasing probesize
Input #2, gdigrab, from 'desktop':
  Duration: N/A, start: 1603259834.426866, bitrate: 1678562 kb/s
    Stream #2:0: Video: bmp, bgra, 1366x768, 1678562 kb/s, 50 fps, 1000k
tbr, 1000k tbn, 1000k tbc
[NULL @ 000001c801d10040]


*Unable to find a suitable output format for
'box=1:shadowcolor=darkblue:shadowx=1:shadowy=1:boxcolor=blue at 0.6:boxborderw=5:x=50:y=H-th-50'box=1:shadowcolor=darkblue:shadowx=1:shadowy=1:boxcolor=blue at 0.6:boxborderw=5:x=50:y=H-th-50:
Invalid argument*
Received stop event after 7 passes

I am not sure if I have the overlay code in the correct position or should
I be adding it to the  "-filter_complex "[0:a][1:a]amerge=inputs=2[a]"" as
an additional Item.

The overlay runs correctly on its own using windows cmd.

Any help or suggestions would be awesome.

John


More information about the ffmpeg-user mailing list