adding silent audio in ffmpeg

后端 未结 4 1064
天涯浪人
天涯浪人 2020-12-04 09:15

I\'m trying to use ffmpeg to add a silent audio track to a MOV file.

I created a silent audio track longer than the video, and intend to use the -shortest option wit

4条回答
  •  北海茫月
    2020-12-04 10:00

    Create video from image or convert image into video then add slient audio using ffmpeg.

    You can use the anullsrc audio source filter in ffmpeg. Example to make a 5.1 channel, 48000 Hz sample rate, 10 seconds silent video file from image:

    ffmpeg -loop 1 -i img002.jpg -f lavfi -i anullsrc=channel_layout=5.1:sample_rate=48000 -t 10 -c:v libx264 -t 10 -pix_fmt yuv420p -vf scale=480:320 -y output.mp4
    

    img002.jpg: Input image file

    -i anullsrc: Add silent audio

    -t 10: Number of seconds

    scale=480:320: Video resolution width=420 and height=320

    -y: Overwrite existing output file

    output.mp4: Output file

提交回复
热议问题