Lossless movie export. How do I do that ?

Or how do I export such that the color doesn't change. AVI makes changes the color and mov changes resolution and color.

If you export a still image (in BMP or PDF for example) then the color appears exactly the same as in mathematica. I would like to export a list of these still images in a movie file (mov, AVI, etc format) that has these same colors as the still or same colors as they appear, while working in mathematica

I would like to import my animated movies into Final cut pro. I have converters for that. It is for my science youtube channel so it is really important to me.

Any solution that can make me export movies from mathematica with the right colour in high resolution is appreciated. I do not care about the file size at this point.

  • $\begingroup$ So I don't necessarily need the mov or AVI format. I need just a format or piece of colour that export my list of images without altering the color or resolution etc. And it needs to do that in a way my converter (Uniconverter or Cisdem) can convert it into a Final cut pro format, without needing to alter the color or resolution. $\endgroup$ Commented Nov 25, 2020 at 15:21
  • 2
    $\begingroup$ Have you tried the option CompressionLevel -> 0 during export? $\endgroup$ Commented Nov 25, 2020 at 16:25
  • $\begingroup$ I have tried it now. It didn't do anything at all. I'm very grateful for your time and efforts though ! $\endgroup$ Commented Nov 26, 2020 at 11:13

2 Answers 2


The changes of colors go from the built-in algorithms of used video codec. The AVI or MOV are just container formats and do not change anything by itself. So, you can try to make uncompressed video. Of course, the file-size will be impressive for durable animation.

The simple way to make a "true color" video is making GIF animation. The color palette of GIF can be defined exactly.

  • $\begingroup$ I'm incredibly grateful for anyone trying to help. Please do provide concrete code. I'm at this point not savy enough to do this by myself. I have tried CompressionLevel -> 0. It didn't do anything at all. $\endgroup$ Commented Nov 26, 2020 at 11:16
  • $\begingroup$ The answer by Rom38 to make a GIF animation really worked, in the sense that it maintained colour and resolution. Thank you so much! $\endgroup$ Commented Nov 26, 2020 at 11:39
  • $\begingroup$ @ChrisDjango, The compression of AVI should be defined inside the external codec. The above answer about multipage tiff and png is good workaround. However, there is one problem - these formats are not supported by on-line players and require an external viewer to play animation. $\endgroup$
    – Rom38
    Commented Nov 28, 2020 at 15:12
  • $\begingroup$ Rom38 what do you mean with 'inside the external codec'? Do you mean this Export["triangle3.AVI", triangle3, CompressionLevel -> 0] ? I'm just learning. If you know a good tutorial or article about this please share. $\endgroup$ Commented Nov 29, 2020 at 10:00
  • $\begingroup$ @ChrisDjango, The usual license of MMA 12.0 does not contain normal video codec. Thus, Export["...avi",data] will give you raw video. The CompressionLevel is unknown option $\endgroup$
    – Rom38
    Commented Nov 29, 2020 at 11:46

GIF can store only 256 different colors. You can use animated PNG or multi-frame TIFF to export "Bit16" images:

In[1]:= frames = LinearGradientImage[#, 100, "Bit16"] & /@ {Red, Green, Blue};

In[2]:= pngFrames = ImportString[ExportString[frames, "PNG"]];

In[3]:= tiffFrames = ImportString[ExportString[frames, "TIFF"]];

In[4]:= ListableImageData[frames_List] := Map[ImageData[#, Automatic] &, frames]

In[5]:= ListableImageData[frames] === ListableImageData[pngFrames] ===

Out[5]= True
  • $\begingroup$ Your code didn't run on my Mathematica 10 version so I came up with something that did: frames = LinearGradientImage[{Red, Green, Blue}]; pngFrames = ImportString[ExportString[frames, "PNG"]]; tiffFrames = ImportString[ExportString[frames, "TIFF"]]; ListableImageData[frames_] := Map[ImageData[#, Automatic] &, frames]; ImageData[frames] === ImageData[pngFrames] This gives False. So it doesn't work $\endgroup$ Commented Nov 29, 2020 at 10:28
  • $\begingroup$ Animated PNG was added in 11.2. This works in 10.4: In[1]:= frames = Image[ConstantImage[List @@ #], "Bit16"] & /@ {Red, Green, Blue}; In[2]:= tiffFrames = ImportString[ExportString[frames, "TIFF"]]; In[3]:= ListableImageData[frames_List] := Map[ImageData[#, Automatic] &, frames] In[4]:= ListableImageData[frames] === ListableImageData[tiffFrames] Out[4]= True $\endgroup$ Commented Nov 29, 2020 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.