I'm trying to create lossless video from .tiff files but in the output colors in the video are not the same. Any tips?
My command is:
ffmpeg -f image2 -r 30 -i "Base000%03d.tiff" -c:v prores -c:a pcm_s16le output.mov
But you can see that colors not the same.
Tiff files: https://drive.google.com/file/d/1JxnBTHlcAZmwofdDSNKl36FhkFbqLi7b/view
+ Reply to Thread
Results 1 to 7 of 7
The problem is your TIFF sequence uses a ProPhoto color profile . FFmpeg isn't color managed
If you wanted to use FFmpeg, you would need to convert the prophoto profile to something like sRGB first then feed that into FFmpeg
But what applications are you using, and what applications is this destined for ? You could just convert it in photoshop for example, you can export video from PS
Or gimp or most image editors should be able to batch convert the images to sRGB
And did you really mean "lossless?" Prores video won't give you "lossless". Or were you just referring to the colors ?
To my eyes the color is not far off.
Maybe an adjustment of brightness and or contrast could give a satisfactory result.
But where is the audio coming from ?
You should specify explicitly parameters related to color space and quantization range. Also perhaps try to avoid to use SWScaler.
You can use imagemagick to batch convert to srgb png sequence, then use that png sequence as input ffmpeg . There might be a way to pipe the output from IM convert to ffmpeg directly
It Windows would look like this; you need to adjust the paths
for %%a in ("*.tiff") do "convert.exe" "%%a" -colorspace sRGB -profile "sRGB2014.icc" %%~na.png" pause
ffmpeg -r 24 -i "Base%06d.png" -vf zscale=matrix=470bg,format=yuv422p10le -c:v prores -profile:v 3 -vendor apl0 -an "output.mov"
I just did 3 frames to reduce the filesize for this demo test . You can test if it looks ok in your other application. Sometimes you might have to adjust the metadata with a bitstream filter, or use another format than prores
I though that "ffmpeg -f image2 -r 30 -i "Base000%03d.tiff" -c:v prores output.mov" was best command to make a lossless video from this images. What then command should be?
Thanks for all replies in this thread guys!
Last edited by eobardthawne; 8th Oct 2019 at 12:45.
There aren't any 16bit RGB "lossless" video formats (or maybe ffv1 supports it) . Prores is probably "good enough" for most purposes, it's only "visually lossless", not mathematically lossless. Also it isn't necessarily compatible for all situations. If you wanted to playback on a TV or device for example. So it depends on what the target or goal or playback scenario is
If you wanted it truly lossless, I would leave it as 16bit PNG or TIFF sequence
But if you decide prores is ok might want to use 444 profile instead of 422 , because 422 indicates the chroma subsampling. format=yuv444p10le and profile:v 4
EDIT: yes, ffv1 does support 16bit RGB as -c:v ffv1 -pix_fmt gbrp16le . But ffv1 is even less compatible with programs and devices. It's only playable in a software media player