Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert image sequence to lossless movie [closed]

I have a sequence of images in TIF format, and I would like to create a movie at a fixed FPS (say 10 images per second) and that is lossless. Is there an easy way to do that? I've been trying with convert from Imagemagick, and ffmpeg, but I just can't figure out what settings to use to avoid any compression.

like image 838
astrofrog Avatar asked Jan 29 '11 20:01

astrofrog


People also ask

Is FFmpeg lossless?

FFV1 is a video codec developed within FFmpeg. It is lossless, meaning that it compresses video without introducing quantization degradations. Therefore, FFV1 is a good choice for ​archiving and preservation.


1 Answers

Try using a lossless codec, e.g. HuffYUV or FFV1:

  • ffmpeg -i frame%04d.png -c:v huffyuv test.avi
  • ffmpeg -i frame%04d.png -c:v ffv1 -qscale:v 0 test.avi

Both codecs look portable. HuffYUV appears to be the more popular, but for some reason, huffyuv encoding seems broken on my system, and I get weird colors and black horizontal banding. It could have something to do with the input being RGB (from PNG) and not YUV (input from a raw YUV420 video file works OK). So here are some alternatives (not completely lossless, but visually quite good):

  • ffmpeg -i frame%04d.png -qscale:v 0 test.avi
  • ffmpeg -i frame%04d.png -c:v mjpeg -qscale:v 0 test.avi
like image 198
mpenkov Avatar answered Oct 04 '22 16:10

mpenkov