VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Mar 2012
    Location
    United Kingdom
    Search PM
    I'm trying to extract a screenshot from a single frame of H264 video file from a blu-ray, like so:
    Code:
    ffmpeg -ss 00:32:07.930 -i 00002.m2ts -vframes 1 "C:\Screenshot.png"
    However the video was encoding wrongly for the RGB range, so when displayed on a TV, it has a washed out look to it. How can I forcibly (through FFMPEG ideally) alter the RGB range of my screenshot. so that it restores the correct saturation?

    i.e. the equivilent of changing my TV's range from "limited" to "full", even though your blu-ray player is outputting for limited range RGB.

    This is what FFMPEG says about the original video track:
    Code:
    Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Last edited by bergqvistjl; 22nd May 2020 at 11:38.
    Quote Quote  
  2. Originally Posted by bergqvistjl View Post
    I'm trying to extract a screenshot from a single frame of H264 video file from a blu-ray, like so:
    Code:
    ffmpeg -ss 00:32:07.930 -i 00002.m2ts -vframes 1 "C:\Screenshot.png"
    However the video was encoding wrongly for the RGB range, so when displayed on a TV, it has a washed out look to it. How can I forcibly (through FFMPEG ideally) alter the RGB range of my screenshot. so that it restores the correct saturation?

    i.e. the equivilent of changing my TV's range from "limited" to "full", even though your blu-ray player is outputting for limited range RGB.

    This is what FFMPEG says about the original video track:
    Code:
    Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc


    If it has a "washed out look" on the TV (assuming you have the equipment setup correctly) this imples low contrast, wrong (elevated) black level, depressed white level

    So you would scale in YUV limited to full and that will increase the contrast

    add this
    Code:
    -vf zscale=rangein=limited:range=full,format=yuv420p,zscale=rangein=limited:matrix=709,format=gbrp
    If it's still "off", post a video sample . It might be your description was not correct, or production was not "limited" vs. "full" , but something else
    Quote Quote  
  3. Member
    Join Date
    Mar 2012
    Location
    United Kingdom
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by bergqvistjl View Post
    I'm trying to extract a screenshot from a single frame of H264 video file from a blu-ray, like so:
    Code:
    ffmpeg -ss 00:32:07.930 -i 00002.m2ts -vframes 1 "C:\Screenshot.png"
    However the video was encoding wrongly for the RGB range, so when displayed on a TV, it has a washed out look to it. How can I forcibly (through FFMPEG ideally) alter the RGB range of my screenshot. so that it restores the correct saturation?

    i.e. the equivilent of changing my TV's range from "limited" to "full", even though your blu-ray player is outputting for limited range RGB.

    This is what FFMPEG says about the original video track:
    Code:
    Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc


    If it has a "washed out look" on the TV (assuming you have the equipment setup correctly) this imples low contrast, wrong (elevated) black level, depressed white level

    So you would scale in YUV limited to full and that will increase the contrast

    add this
    Code:
    -vf zscale=rangein=limited:range=full,format=yuv420p,zscale=rangein=limited:matrix=709,format=gbrp
    If it's still "off", post a video sample . It might be your description was not correct, or production was not "limited" vs. "full" , but something else
    I was able to do it by opening the PNG in GIMP, going to Colors -> Levels and changing the Input Levels on the histogram from 0 & 255, to 16 & 235, which then restored the colour to what I was expecting.
    Quote Quote  



Similar Threads