Log in

View Full Version : How to prepare a RGB master for Blu-ray encoding?


Maxiuca
20th June 2008, 23:20
I've been asked by a friend to encode a short animation (CG) he directed (independent and low-budget production) and then author it to Blu-ray.
He brought me a hard drive with the master which is simply TIFF image sequence (48-bit color - 16-bit per channel). I've converted them to a sequence of PNG file (24 color of course) so that it can be read by AviSynth.

At this step I got a little confused. I know that this short film was entirely made in sRGB colorspace (monitors have been calibrated to sRGB, rendered in sRGB, then the whole post-production was made in Nuke that had also colorspace set to sRGB and in the end the TIFFs have been saved in sRGB).
I have to convert the colorspace to ITU-R BT.709 and scale the luma to TV range.

I'm wondering if in this case would a simple "ConvertToYUY2(matrix="Rec709")" be enough to make the video ready for Blu-ray? Seems little to simple :)

Blue_MiSfit
21st June 2008, 00:18
Sounds good to me :)

I would convert straight to YV12, unless your encoding software requires or recommends YUY2 input.

From there, encode away into (ideally) H.264 or VC1. x264 is a prime candidate, provided you follow BluRay specs :)

~MiSfit

mikeytown2
21st June 2008, 20:02
In the future I would recommend using ImageMagick Reader (http://forum.doom9.org/showthread.php?t=135928) for the TIFF sequence, thus no intermediate PNG's. I second Blue_MiSfit recommendation to go with YV12.

ConvertToYV12(matrix="rec709")

Maxiuca
21st June 2008, 21:49
Thanks for the ImageMagick plugin advice. I'll try to load the 16-bit TIFFs directly.
I've choosen YUY2 cause I'm haven't tested all encoders yet and their ability to accept YV12. If I decide to use x264 then I'll of course use YV12, but I'm also considering Sonic CineVision to be sure the stream is 100% Blu-ray compatible.

Blue_MiSfit
21st June 2008, 22:38
Cool - I'm sure x264 produces better quality results - provided you follow the BluRay profile :)

~MiSfit

Maxiuca
21st June 2008, 23:16
mikeytown2,

I've tried the Immaavs plugin but unfortunatelly the image sequence reading does not work properly.
For example if you use file matrix like file.%04d.tif and "start=1000, end=3000" parameters, the plugin will just read first 2000 tiffs starting from file.0000.tif and ending with file.1999.tif
I'll report the bug to the author of this plugin in the other thread.

Blue_MiSfit,

can you recomend me any tested and proven MeGUI Blu-ray profiles (apart from the Sharktooth's profiles (http://forum.doom9.org/showthread.php?t=101813))? Or maybe the Sharktooth's profiles are good enough?

IanB
21st June 2008, 23:59
Work around, copy file.1000.tif to file.0000.tif then start=0, end=3001, Trim(1000, 3000)

Maxiuca
22nd June 2008, 00:29
Unfortunatelly it's not that easy... I won't be getting into the details here, but in this case it's not that easy. It's doable of course, but would take a lot of time and some work.
I've got 8-bit PNGs and I won't gain anything in opening the 16-bit TIFF sequence directly since avisynth is not able to process 16-bit images. It would make sense if I could go 48-bit RGB -> YV12 directly, but there is no such possiblity and it has to be 48-bit RGB -> 24-bit RGB - > YV12 either way.

Gavino
22nd June 2008, 00:58
Unfortunatelly it's not that easy... I won't be getting into the details here, but in this case it's not that easy. It's doable of course, but would take a lot of time and some work.
By "it's not easy", I assume you mean IanB's workaround?

If it behaves like ImageSource (apart from the start number bug), then you only have to make sure file.0000.tif exists, since any missing files in the sequence are replaced with a blank frame.
(You shouldn't have to copy all 1000 files, if that's what you're thinking.)

Maxiuca
22nd June 2008, 01:33
By "it's not easy", I assume you mean IanB's workaround?
I mean, it's not that easy in this case. For some reason the master TIFF sequence have been stored on a FAT32 formatted hard drive and tiffs have been placed in 11 folders named "00000-02000", "02001-04000" and so on (up to "20000-23000"). Because it's the only copy (yeah, I know, I'm gonna suggest my friend a backup on another drive) I don't want to mess with it in any way. So this means I need to copy all files to another drive and I don't have time nor free disc space to do it (it's almost 400 GB and the drive is a WD MyBook, so no eSATA connector). Since he was so nice to make those 8-bit PNGs for me and there is no advantage in reading the TIFFs directly there is no need to do it.

mikeytown2
22nd June 2008, 07:58
Oh well, use the PNG's for now. It has to be converted to 8 bit anyway, so quality wise, I probably wouldn't worry about it too much, since your final output options are kinda limited. Although I will admit that I can't wait till everything supports YV48 (I'm not holding my breath (http://www.google.com/search?q=YV48+16+bit)); the color range will be amazing! Just what to do with all those 6 bit LCD's?


According to wikipedia (http://en.wikipedia.org/wiki/H.264#Profiles) AVC High profile is adopted into Blu-ray.

So in MeGUI (http://sourceforge.net/project/showfiles.php?group_id=156112) the 3 presets that I would feel confidant with are
CE-Highprofile
SA-Blu-ray
SA-Blu-ray_fast

Me personally, I would probably pick "SA-Blu-ray".


Edit: RipBot (http://forum.doom9.org/showthread.php?t=127611) is another option