haseeb
haseeb

Reputation: 300

ffmpeg images list (text file) to video with overlay watermark

I have 250 images / day of 4000*3000 pixels in a text file.

file '/home/user/camdata/nonseqdata.jpg'
file '/home/user/camdata/strangedata.jpg'

i created mp4 video with this command

ffmpeg -y -f concat -safe 0 -i ecam.001_20210525.txt -c:v libx264 -vf "scale=1280:720,fps=25,format=yuv420p" out.mp4

Now i need to add watermark to video.(in same command) closest example i found on web, trying to modify that and use in my case is like..

ffmpeg -r 25 -f image2 -s 1280x720 -i ecam.001_20210525.txt -i wm.png -filter_complex "[0:v][1:v] overlay=0:0" -vcodec libx264 -crf 25  -pix_fmt yuv420p test_overlay.mp4
OR
ffmpeg -r 25 -f concat -safe 0 -s 1280x720 -i ecam.001_20210525.txt -i wm.png -filter_complex "[0:v]pad=width=mainw:height=mainh:x=0:y=0,[1:v] overlay=0:0" -c:v libx264  test_overlay.mp4

BUT it error out to >> Decoder (codec none) not found for input stream #0:0 Q. how exactly to fix this.? i need output to be 720p or 1080p.?

Upvotes: 0

Views: 836

Answers (1)

Gyan
Gyan

Reputation: 93058

Use

ffmpeg -y -f concat -safe 0 -i ecam.001_20210525.txt -i wm.png -filter_complex "[0]scale=1280:720[v];[v][1]overlay=x=0:y=0,fps=25,format=yuv420p" -c:v libx264 out.mp4

Upvotes: 1

Related Questions