0

Using ffmpeg 4.1 on windows 7, I am trying to add null audio or empty video track if input file doesn't have it. I don't know how to use anullsrc/aevalsrc. I looked a lot and found that i have to provide the duration as well with anullsrc.

In my case, input files are in webm format which may contain both audio and video track or one of them. So, whatever track is missing that i want to add till the end.

I am new to ffmpeg. Please help.

Thanks, R.

1 Answer 1

2

If you have to do this for many files, first create a dummy video and audio file.

ffmpeg -f lavfi -i color -f lavfi -i anullsrc -ac 1 -ar 8000 -t 5 dummy.webm 

Now, you can make use of ffmpeg's automatic stream selection and -shortest option

ffmpeg -i input.webm -stream_loop -1 -i dummy.webm -c copy -shortest av.webm 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.