I am capturing video of the screen using FFmpeg and its work perfectly with or without audio.

I want to capture video with silent audio and I am using "anullsrc" filter but it's not working

-y -rtbufsize 100M -f dshow -framerate $fps$ -i anullsrc=channel_layout=stereo:sample_rate=44100 -i video="screen-capture-recorder" -c:v libx264 -r $fps$ -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -movflags +faststart "$output$"


Correct syntax is

-y -rtbufsize 100M -f dshow -framerate $fps$ -i video="screen-capture-recorder" -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -c:v libx264 -r $fps$ -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -movflags +faststart "$output$"

Your dshow options..etc were being applied to the audio input, not video. And anullsrc is a source filter within ffmpeg, so -f lavfi has to be set.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.