XDCAM MPEG-2 Encoder (Limited Range is not Limited)

Here you can submit bugreports
Post Reply
User avatar
FranceBB
Posts: 232
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

XDCAM MPEG-2 Encoder (Limited Range is not Limited)

Post by FranceBB »

Hi,
in the XDCAM MPEG-2 encoder, the output is flagged as "Limited" range (16-235) 0 - 0.7V, even though it's not.
Let me explain this.
If the input file has illegal values (out of range values), the file is encoded as it is and just flagged as "limited".
So, if it has out of range values, there will also be out of range values in the encoded file!
This is an issue for broadcast companies, 'cause they need a real TV Range file,
that's why I strongly suggest you to add a clipping option in the XDCAM node.
Clipping can be achieved via Avisynth or ffmpeg itself:

Avisynth:

Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)

ffmpeg:

ffmpeg -i "sample.mov" -vf lut=y=clipval:u=clipval:v=clipval


This is an example of a waveform with out of range values (Full Range):
Image

This is an example of a waveform after clipping (Limited Range - Tv Range):
Image
admin
Site Admin
Posts: 1661
Joined: Sat Feb 08, 2014 10:39 pm

Re: XDCAM MPEG-2 Encoder (Limited Range is not Limited)

Post by admin »

Hi FranceBB, thank you for your input.

First, the XDCAM-HD specs. does not prohibit the use of full swing. A lot of cameras utilize the whole range for more dynamics and FFAStrans tries to honor this. And this is an important principal; Do not alter the original media more than neccessary. So, a lot of broadcast equipment can easily deal with the full range without causing havoc on the muxers. But sure, I have seen shows that air with too high levels due to bad equipment. Anyway, FFAStrans will NOT clamp video more than it needs to. That "said", because the XDCAM-HD specs. are comformed to studio swing, the option to add clamping, or limited dynamic range is not a bad idea and I will take a look at the options. In the mean time, you can easily do this yourself using AviSynth. FFAStrans has the inbuilt "Color conversion"-filter which also lets you limit video range.

-steinar
Post Reply