Capture pictures and creat video script

hay Mister @miguel, can I get a copy of the script we made last year for the weather project?
I am doing it in this stupid way which is not counting the pictures in the ffmpeg line.

I will look for it. Why are your screenshots so big and the text so small ? :slight_smile:

You should zoom in a bit, or use the quote command to paste it in here.

Something like this:

Or better yet, use the three backticks ` and quote it:

sudo raspistill -vf -hf -0 /home/pi/Desktop/img001.jpg -w 2592 -h 1944
sleep 10
sudo raspistill -vf -hf -0 /home/pi/Desktop/img002.jpg -w 2592 -h 1944
sleep 10
sudo raspistill -vf -hf -0 /home/pi/Desktop/img003.jpg -w 2592 -h 1944
sleep 10
sudo raspistill -vf -hf -0 /home/pi/Desktop/img004.jpg -w 2592 -h 1944
sleep 10
sudo raspistill -vf -hf -0 /home/pi/Desktop/img005.jpg -w 2592 -h 1944
sleep 10
sudo raspistill -vf -hf -0 /home/pi/Desktop/img006.jpg -w 2592 -h 1944
sudo ffmpeg -framerate 24 - i img%06d.jpg /home/pi/Desktop/ 'date' .mp4

It’s not outputting the video because the ffmpeg command line is not detecting the images from 1 to 6.

yeah…

ffmpeg -framerate 24 - i img%06d.jpg /home/pi/Desktop/`date`.mp4

What does img%06d.jpg mean? what is it you’re trying to do with that filename?

I am trying to compress all the 6 images into an mp4 video.
That thing should work as a loop counter to count the pictures

Oh ok,

Try something like

-pattern_type glob -i "*.jpg"

instead. That will grab all the *.jpgs in the directory.

1 Like

Oh all we learned about linux and I never thought of the star to include all files.
Maybe my brain was offline :joy::joy::joy: