Just want to know, Is that possible to add sound to the final video along with an overlay image?
Yes, FFmpeg provides the -i option to specify the input audio file, and the -c:a option to specify the audio codec to use for the output file.
For example, to add a WAV file called audio.wav to a video file called video.mp4 and create an output file called output.mp4, you can use the following command:
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output.mp4This will copy the video stream from the input file and encode the audio stream using the AAC codec. The -strict experimental option is necessary to enable ffmpeg to use the experimental AAC encoder.
To add an image overlay to a video, you can use the overlay filter. For example, to add an image called image.png as an overlay on top of the video, you can use the following command:
ffmpeg -i video.mp4 -i image.png -filter_complex “overlay=10:10” output.mp4This will add the image as an overlay on the video, with the top-left corner of the image at the position (10, 10) in the video. You can adjust the position of the overlay by changing the values of the overlay filter.
Got it but, what if I need to combine these two?