0

I have a folder of .tifs that are really noisy images (digital images from a microscope). They are also quite small in dimmension, like 260x260 pixels.

I want to turn them into a playable movie that works across windows and macs.

I tried libx264, but I get this horrible patchwork of squares pattern across the image.

I tried a lot of options with libx264, like -crf 24, -crf 0 (supposedly lossless, its not). I've tried different -pix_fmts.

In general my commands looked like

ffmpeg -framerate 33 -i Out01x\Singles_%04d.tif -c:v libx264 -crf 0 -pix_fmt yuv420p test2.avi

So then I tried a lossless format, huffyuv

ffmpeg.exe -framerate 33 -i Out01x\Singles_%04d.tif -c:v huffyuv Out01x.avi

This initially looked ok. But then I found it doesn't support .mov or quicktime. Which isn't going to work, because my colleagues will need .mov support.

I then tried just a straight .png lossless format.

ffmpeg -framerate 33 -i Out01x\Singles_%04d.tif -c:v png test.mov

This looks okay also, and appears to play in quicktime (although I'm still waiting for someone with a mac to confirm).

Is .png really my best option here? It seems not very 'standard'. But I'm not a video professional, so maybe it is considered a good option.

It doesn't work in windows media player. But none of these do, so I blame WMP more than the codec issues. They all work in vlc, quicktime (on windows) and other windows players.

Is there a better way to do this?

Edit:

Here is a screenshot of the patchwork I'm seeing. With lines I drew to highlight a portion of it.

patchwork example

12
  • Couple of answers here: superuser.com/questions/486325/lossless-universal-video-format one suggesting a modification to one of your commands, another suggesting vp9 (webm) having a lossless mode...
    – Mokubai
    Commented Feb 12, 2018 at 12:41
  • @Mokubai Yes, I've seen that answer and tried all those commands. Still same result with the patchwork, even when using -crf 0. I also had tried the vp9 suggestion. And 1. its not supported in .mov, and 2, even in .avi format it was crashing vlc on my windows 10 using their suggested command.
    – Nertskull
    Commented Feb 12, 2018 at 12:48
  • @Nertskull For source-matching, you want ffmpeg -framerate 33 -i Out01x\Singles_%04d.tif -c:v libx264 -crf 0 test2.mov - for playback, you will want VLC. The pix_fmt is subsampling the chroma data before it is sent to the encoder, so you lose information there, not due to the encoder.
    – Gyan
    Commented Feb 12, 2018 at 13:32
  • Some players downsample video to 4:2:0 before rendering, so it can give a misleading impression about the fidelity of the converted file. See video.stackexchange.com/q/16674/1871
    – Gyan
    Commented Feb 12, 2018 at 13:34
  • @Mulvya I tried your command, exactly. And played back in VLC. And it still shows the patchwork pattern.
    – Nertskull
    Commented Feb 12, 2018 at 16:12

0

You must log in to answer this question.

Browse other questions tagged .