View Full Version : What is the proper way to flag x264 encoded video to bt.709 for Bluray
fifteen
28th May 2009, 20:46
Question 1:
What is the proper way to flag x264 encoded video to bt.709 for standalone Bluray players?
Here, they are using all 3 VUI settings that relate to the matrix:
--colorprim bt709 –transfer bt709 –colormatrix bt709
http://www.avsforum.com/avs-vb/showthread.php?p=16520200#post16520200
Is this the correct method of doing this? Do all three settings need to be used??? Just one or two??
Question 2:
My workflow is, I take my RGB rendered images, convert them to YV12 with Avisynth and encode with x264.
In the past, I made the mistake of not specifying the matrix for ConvertToYV12() and so Avisynth uses the default bt601 instead of bt709 (from what I understand is the HD standard).
Generally, do Bluray players actually listen to the VUI settings set in x264??? If they do, is there some way of modifying the x264 encoded bitstream and add VUI settings indicating that the RGB to YV12 conversion was made with bt601??
(I no longer have the RGB images for some of the encodes and was hoping for a patching solution)
:thanks:
juGGaKNot
28th May 2009, 21:18
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
?
2 : avisynth uses limited rec601 ( 16-235 ) pc601 and pc709 are fullrange 0-255
I think so.
LE : if you do not want fullrange than use rec.709.?
LE2: wait, from rgb ? i use the same
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
over 1280
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.601")
x264.exe -fullrange on
under 1280
fifteen
28th May 2009, 21:20
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
?
2 : avisynth uses limited rec601 ( 16-235 ) pc601 and pc709 are fullrange 0-255
I think so.
I'm only interested in Bluray and, correct me if i'm wrong, Bluray does not use fullrange. But that still doesn't answer question 1 or 2.
juGGaKNot
28th May 2009, 21:26
My workflow is, I take my RGB rendered images, convert them to YV12 with Avisynth and encode with x264.
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
I'm only interested in Bluray and, correct me if i'm wrong, Bluray does not use fullrange. But that still doesn't answer question 1 or 2.
BLU-RAY or RGB to BLU-RAY ?
RGB is fullrange
RGB :
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
blu-ray :
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="rec.709")
x264.exe -fullrange off
OFC i might be wrong, just a starting point.
fifteen
28th May 2009, 21:38
BLU-RAY or RGB to BLU-RAY ?
RGB is fullrange
RGB :
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="pc.709")
x264.exe -fullrange on
blu-ray :
AVIsource("%mypath%\%mymovie%.avi")
ConvertToYV12(matrix="rec.709")
x264.exe -fullrange off
OFC i might be wrong, just a starting point.
I understand what you're saying. But it's not addressing my questions. I know how to convert. I should have been a little more clear. By Bluray support, I mean STANDALONE Bluray players.
Generally, do Bluray players actually listen to the VUI settings set in x264???
I don't think so. They probably just expect it to be BT.709 and therefore setting the flags or changing them in previously encoded streams would not make any difference.
fifteen
28th May 2009, 22:08
I don't think so. They probably just expect it to be BT.709 and therefore setting the flags or changing them in previously encoded streams would not make any difference.
But if I were to flag it to test on different Bluray players to confirm....Would I set the flags in the way it is done in the first post? Or differently?
G_M_C
29th May 2009, 07:36
AFAIK High def, and so also Blu-ray, is encoded as BT.709 as per definition. So if you make shure you feed x264 with a source that is in BT.709 every STD will play/display it fine.
Comatose
29th May 2009, 16:41
I noticed that many BDs are flagged as BT.709. AFAIK, you only need --colormatrix bt709 to make x264 insert the same flag. I don't know if it matters, but better to be safe than sorry. It can't hurt to use it, anyway.
(I no longer have the RGB images for some of the encodes and was hoping for a patching solution)
Since there's a long history of players/decoders/whatever ignoring this flag, I don't know whether just flagging it as BT.601 will do any good.
You can use the ColorMatrix() avisynth plugin to a video with a certain colorimetry to another.
You can check the Blu-ray spec (if it's publicly available) to see whether paying attention to this flag is mandatory for players. A lazier way would be to encode a video with some orange area. If the colorimetry is off, the orange area will have a purple tint. You'd have to try really hard to avoid seeing something that isn't there, though, since you'd have nothing to compare to. And if YOUR player works properly, that doesn't mean the rest do :\
fifteen
29th May 2009, 16:53
I noticed that many BDs are flagged as BT.709. AFAIK, you only need --colormatrix bt709 to make x264 insert the same flag. I don't know if it matters, but better to be safe than sorry. It can't hurt to use it, anyway.
I agree about the flagging. I remember reading somewhere on a forum that it was optional in the spec.
So proper flagging only requires the colormatrix flag?
What software are you using to see that many BDs are flagged as BT.709?
Comatose
29th May 2009, 17:01
DGAVCIndex/DGIndex (for MPEG-2). If there are no *s next to the colorimetry, that means it was declared in the stream. Or at least that's what I figured after testing - this doesn't seem to be documented anywhere.
I don't THINK you need the rest (because, at the end of the day, this is what defines the colors, and DG/AVCIndex only needs this flag to determine it), but it would be best to check with someone/somewhere more knowledgeable about this :P
nurbs
29th May 2009, 17:14
Straight from the DGAVCIndex manual:
Colorimetry - Displays the colorimetry scheme used by the stream. Note that if the stream does not declare the colorimetry, then ITU-R BT.709* is reported for HD video, and ITU-R BT.470-2* is reported for SD video. The * character indicates that the stream did not declare the colorimetry. The actual value read from the stream is shown in brackets.
Comatose
29th May 2009, 17:22
I guess I'm blind :P
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.