Hi there!
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.
Source:
Ffmpeg output:
Tiff files: https://drive.google.com/file/d/1JxnBTHlcAZmwofdDSNKl36FhkFbqLi7b/view
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
-
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
Code:for %%a in ("*.tiff") do "convert.exe" "%%a" -colorspace sRGB -profile "sRGB2014.icc" %%~na.png" pause
Code: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 -
Thanks, i will try that in photoshop, that's a very good catch! This files are really really have prophoto color profile. What i'm doing: i've splitted video into frames and each frame is running through "topazlabs image to raw ai" and after that i will conevrt those images to video. As what i see, this is giving more details and can give lil bit more quality to the video.
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 11: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
Similar Threads
-
VDub Color Space problem processing Nexus 5x video
By RandomVHUser in forum Video ConversionReplies: 36Last Post: 21st Oct 2016, 16:20 -
Convert Video from Negative Mode to Full Color?
By JonnieGee in forum Video ConversionReplies: 5Last Post: 12th Feb 2016, 13:03 -
Lagarith lossless codec / Adobe Premiere color problem
By Woncler in forum EditingReplies: 3Last Post: 7th Jun 2015, 16:58 -
Problem color correction in all video players
By pranjev in forum Newbie / General discussionsReplies: 7Last Post: 4th Jan 2015, 18:56 -
[Solved]Color space RGB vs. YV12 with Lossless videos
By SnapPop in forum Newbie / General discussionsReplies: 52Last Post: 24th Nov 2014, 11:42