Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMpeg adding silence: struggling to use -i anullsrc option

Tags:

ffmpeg

I am just trying to add a silent audio track to a video file using ffmpeg:

ffmpeg.exe -i video.mkv -i anullsrc -c:v copy -c:a aac -shortest test.mkv

I have ffmpeg precompiled release for windows 64bit (20170208)

Whenever I run I get this error:

anullsrc: No such file or directory

Thanks for any help.

like image 819
Kod4krome Avatar asked Feb 09 '17 21:02

Kod4krome


1 Answers

I had to specify the lavfi filter as well and put it before -i anullsrc:

-f lavfi

For a complete commandline:

ffmpeg -i video.mkv -f lavfi -i anullsrc -c:v copy -c:a aac -shortest test.mkv
like image 199
Kod4krome Avatar answered Oct 02 '22 09:10

Kod4krome