Thursday, May 2, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 29203  / 1 Year ago, mon, february 20, 2023, 1:18:50

I have 400 PNG images, from which I want to generate a Quicktime movie (.mov). The filenames have the style:



img1.png
img2.png
...
img10.png
imp11.png
...
img100.png
img101.png
...


I used to do that on a Mac using ImageJ but unfortunately this requires a 32 bit version of Java. I also tried it using ImageJ on Ubuntu, but the option to create a Quicktime movie does not exist there.


More From » video-conversion

 Answers
4

I'd do it with avconv (or ffmpeg), but you have to do it on the command line.



Install required program



Open the terminal application and install the required programs:



sudo apt-get install libav-tools libavcodec-extra-53 libavdevice-extra-53 libavformat-extra-53 libavutil-extra-51 libpostproc-extra-52 libswscale-extra-2


Go to the directory containing the image sequence:



cd /path/to/images/


Convert:



avconv -i "img%d.png" -r 25 -c:v libx264 -crf 20  -pix_fmt yuv420p img.mov



  • -i "img%d.png" uses these files as the input, %d is a placeholder for the number

  • -r 25 the desired frame rate, 25 FPS in this case

  • -c:v libx264 use the h264 codec x264

  • -crf 20 the video quality, 20 is pretty high, the default is 23

  • -pix_fmt yuv420p a compatible pixel format



Note that in contrast to e.g. VLC, older quicktime players are pretty picky about what they play. Be sure to test it in quick time, you may have to adapt the codec options / output format (For example, you could replace img.mov with img.mkv to get a Matroska video)



avconv doc


[#32136] Tuesday, February 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wenceslockro

Total Points: 494
Total Questions: 127
Total Answers: 97

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;