VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. 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
    Quote Quote  
  2. 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 ?
    Quote Quote  
  3. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    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 ?
    Quote Quote  
  4. You should specify explicitly parameters related to color space and quantization range. Also perhaps try to avoid to use SWScaler.
    Quote Quote  
  5. 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
    If prores was good enough, then ffmpeg using the png sequence

    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
    Image Attached Files
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    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 ?
    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.
    Quote Quote  
  7. 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
    Quote Quote  



Similar Threads