

pix_fmt yuv420p - use YUV pixel format and 4:2:0 Chroma subsampling output.mp4 crf 20 - constant quality mode, very high quality (lower numbers are higher quality, 18 is the smallest you would want to use). profile:v high - use H.264 High Profile (advanced features, better quality). c:v libx264 - the video codec is libx264 (H.264). c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p Thus the files it will detect are everything from image-00000 to image-99999. The d indicates decimal integers, 5 is number of digits, the leading zero indicates that numbers requiring fewer digits will be filled, in the left, with zeroes so that every number contains exactly 5 digits.

image- means all of the files start with this. This determines the file name sequence it looks for. Is the number of frames (images) per second, -i image-%05d.jpg This is the command all together: ffmpeg -framerate 25 -i image-%05d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4
#Convert photo to movie install#
You can use ffmpeg, which you can install with the command: sudo apt install ffmpeg I already have the photos they were taken with an ordinary digital camera.

This had the same effect as previous - only the first frame is used.Īdditional: This question has been suggested as a possible duplicate, but it relates to acquiring images using a webcam connected to a PC. It was suggested that I list every file individually, so with a bit of Python I generated this avconv -i image-01.jpg image-02.jpg image-03.jpg image-04.jpg image-05.jpg image-06.jpg image-07.jpg image-08.jpg image-09.jpg image-10.jpg image-11.jpg image-12.jpg image-13.jpg image-14.jpg image-15.jpg image-16.jpg image-17.jpg image-18.jpg image-19.jpg image-20.jpg image-21.jpg image-22.jpg image-23.jpg image-24.jpg image-25.jpg image-26.jpg image-27.jpg image-28.jpg image-29.jpg image-30.jpg image-31.jpg image-32.jpg image-33.jpg image-34.jpg image-35.jpg image-36.jpg image-37.jpg image-38.jpg image-39.jpg image-40.jpg image-41.jpg image-42.jpg image-43.jpg image-44.jpg image-45.jpg image-46.jpg image-47.jpg image-48.jpg image-49.jpg image-50.jpg image-51.jpg image-52.jpg image-53.jpg image-54.jpg image-55.jpg image-56.jpg image-57.jpg image-58.jpg image-59.jpg image-60.jpg image-61.jpg image-62.jpg image-63.jpg image-64.jpg image-65.jpg image-66.jpg image-67.jpg image-68.jpg image-69.jpg image-70.jpg image-71.jpg image-72.jpg image-73.jpg image-74.jpg image-75.jpg image-76.jpg image-77.jpg image-78.jpg image-79.jpg image-80.jpg image-81.jpg image-82.jpg image-83.jpg image-84.jpg image-85.jpg image-86.jpg image-87.jpg image-88.jpg -r 25 -c:v libx264 -crf 20 -pix_fmt yuv420p movie.mov Where am I going wrong, and what do I need to do? This produces a larger file, and makes a video that lasts for about 3 seconds (approx the length I was expecting) but it contains just the first frame.Īnother answer on the first linked question suggests using ImageMagick, so I gave this a try convert -delay 1 image-*.jpg output.mp4īut this produced an error convert.im6: delegate failed `"ffmpeg" -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -i "%M%%d.jpg" "%u.%m" 2> "%Z"' error/delegate.c/InvokeDelegate/1065. This question gives a slightly different way of formatting the file name, so I tried avconv -i "image-%02d.jpg" -r 25 -c:v libx264 -crf 20 -pix_fmt yuv420p movie.mov (I am guessing that the * has used the first match, rather than every match). I tried changing it to avconv -i "image-*.jpg" -r 25 -c:v libx264 -crf 20 -pix_fmt yuv420p movie.movĪnd this produces a video file of length 0:00 that appears to only contain one frame. My files are named image-NN.jpg (NN being an integer) and I have used the command avconv -i "image-%d.jpg" -r 25 -c:v libx264 -crf 20 -pix_fmt yuv420p movie.movĪs per the linked question, but this just gives a No such file image-%d.jpg error. I have adapted the instructions given in this question but have experienced some issues.įirstly, not all of the required packages are available, but are replaced by libav-tools, which is already installed - so I think that's not an actual problem? I am attempting to create a video file from a set of JPG images.
