[FFmpeg-user] Requesting colormatrix advice

Phil Rhodes phil_rhodes at rocketmail.com
Mon Nov 6 18:16:08 EET 2023


 A number of potentially complex interactions govern what's going on here. FFmpeg has never been particularly smart about how it interprets colour and brightness encoding, and it is not very well documented in that regard, but to be fair, files are not always (or even often) marked correctly with flags indicating what they contain, the flags may be nonstandard, etc. It's tricky.

If it's a blu-ray it'll generally be in 709, unless it's one of the Sony 4K Blu-Rays which uses xvYCC. It's hard to prove a negative but those are the only situations I'm aware of.  Assume what's on the disc will be studio swing 709 unless it is a 4K blu-ray.
If it's a blu-ray of a TV show which was shot on film, it will have been scanned and electronically colour corrected for the blu-ray.
I'm not sure BT specifically stands for anything in particular, it just refers to the series of standards which deals with broadcast TV stuff. In the opening page of the standards document, it's annotated "Broadcasting service (television)." 
No, that's not an SMPTE standard; that's an ITU standard, from the Radio sector of the International Telecommunication Union; hence, the current version is properly titled ITU-R BT.709-6. The standard is free to download but it won't help you much, probably.
Oversaturation particularly of reds is one of the issues that will arise from mixing up 601 and 709 and scaling issues are another, but there are so many ways this can be wrong, and places to change settings, that I hesitate to speculate further without further info. You are likely to be facing several confounding issues at once.
If you intend to watch the resulting file on a computer, you should not need to change the colourspace as sRGB and 709 have identical primaries (they do not have identical brightness mapping but it should not look wildly wrong). You may need to scale the studio swing data to full swing to avoid washed-out shadows and dull highlights.
Unfortunately the likelihood is you'll simply have to experiment until you find the right solution, although I would expect it should be possible to fix it using known scaling and remapping. Really, you should not have to start eyeballing colour corrections in this scenario. If you find yourself having to apply manually-configured filters I'd suspect you're not doing it right somehow, and should step back and look at it again.
-P

    On Monday, 6 November 2023 at 15:23:41 GMT, markfilipak.imdb at gmail.com <markfilipak.imdb at gmail.com> wrote:  
 
 On 11/6/23 09:16, Devin Heitmueller wrote:
> On Sun, Nov 5, 2023 at 10:42 PM <markfilipak.imdb at gmail.com> wrote:
>>
>> Hello All,
>>
>> I have a 1990s TV show -- called 'SOURCE' here -- made by Paramount. The show was renowned for its
>> production values. It's on Blu-ray from Paramount. The Blu-ray was made in 2012 (may be a clue to a
>> colorspace variant used).
> 
> If it is standard definition and from the 1990's then the original content is almost certainly in BT.601. 

Thanks, Devin,
To add to the fun/mystery, though it was a TV show, Paramount shot it on film, so maybe it was color 
graded on film(?), whatever 'BT' that would be (probably not SMPTE). It looks like too big a color 
shift to simply be BT601 rendered via BT709. It's the saturation that clues me to that. The reds are 
saturated in play and in the ffmpeg HEVC encoding but they can't actually be saturated on disc 
because I can draw detail out of them. I think there's a 'limited' versus 'full' range thing going on.

I'm currently transcoding it with this:
-vf colorcorrect=saturation=0.85:rh=-0.06:bh=-0.1
It looks good, but that's to my eyes, on my laptop, with my laptop's video settings. I'm out of my 
depth with no oars. (Attenuating the blue bothers me, but hey, to my eyes the discs have a blue cast 
in addition to saturated reds.)

Paramount has done this to other TV shows. I'm hoping someone with experience of Paramount's 
film-to-TV-to-disc work will offer advice.

> Now if you're referring to the
> BluRay remaster, then who knows what they did.  If done properly I
> would expect them to convert the colorspace to BT.709 ...

How convert? According to ffprobe, the discs have no colormatrix. So, I think, ffmpeg has no choice 
other than to accept it as BT709 -- 'conversion' not possible. I don't know how to parse M2TS, so I 
can't check on whether ffprobe is being truthful. Any parsing ideas would be welcome.

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
  


More information about the ffmpeg-user mailing list