benwaggoner
2nd April 2012, 18:21
I've been mulling mezzanine files lately, and been thinking about H.264 as a mezzanine format.
There was a discussion about this a while ago, but it's probably time for a new thread.
http://forum.doom9.org/showthread.php?t=153689
Here's my thinking, comparing H.264 to other common mezzanine formats like MPEG-2, ProRes, and (more rarely) Cineform.
Pros
Supports >4:2:0, >8-bit, and RGB
Supports progressive and interlaced
Good aspect ratio flagging
Better efficiency than MPEG-2
Better maximum quality than MPEG-2, particularly with heavy film grain
Broadly supported in decode
Lots of container and audio codec options
Both intra-only and intraframe encoding options
Lossless encoding mode available
Cons
Slower to decode in software
Modes beyond 8-bit 4:2:0 not as widely supported
Modes beyond 8-bit 4:2:0 less often HW decoded
The Cons aren't really that bad, considering, and High Profile MPEG-2 isn't universally supported as well.
I imagine doing something like this, but feedback appreciated!
CALVC only. CABAC is less advantagous at higher bitrates, and a lot more expensive to decode.
Use the most restrictive profile matching the source. So, if coming from MPEG-2 4:2:2, use High 4:2:2 8-bit. But ProRes HQ would use 10-bit 4:2:2
Use Level 3.0 for SD, Level 3.2 for 720p, Level 4.1 for 1080 <50p.
Allow full buffer size and peak bitrate for the Profile@Level.
Encode with a low CRF. 10? Emperical testing would be done to find a CRF where a few generations of encoding could be applied without introducing artifacts that would impact the final encode.
Short Closed GOPs for fast random access. 1-2 seconds max?
Mux in the source audio without recompression.
--preset fast? This sort of thing is generally done on fast machines, and often the source decode is the bottleneck. Having a significantly smaller mezzanine can be worth a someone slower time to create. And, of course, a lower bitrate mezzanine would be faster to transcode from.
Questions:
Would using slices with CAVLC meaningfully help software decoding speed on multicore machines?
What --tune mode? Default? Grain?
What alpha/beta? -2, -2 low enough?
What B-frame pattern? Strict pyramid with 3 B (IbBbP)? All P-frames? Simple IbP?
MPEG-4 file or Transport Stream?
Is anyone actively doing this today? Any learnings to share?
There was a discussion about this a while ago, but it's probably time for a new thread.
http://forum.doom9.org/showthread.php?t=153689
Here's my thinking, comparing H.264 to other common mezzanine formats like MPEG-2, ProRes, and (more rarely) Cineform.
Pros
Supports >4:2:0, >8-bit, and RGB
Supports progressive and interlaced
Good aspect ratio flagging
Better efficiency than MPEG-2
Better maximum quality than MPEG-2, particularly with heavy film grain
Broadly supported in decode
Lots of container and audio codec options
Both intra-only and intraframe encoding options
Lossless encoding mode available
Cons
Slower to decode in software
Modes beyond 8-bit 4:2:0 not as widely supported
Modes beyond 8-bit 4:2:0 less often HW decoded
The Cons aren't really that bad, considering, and High Profile MPEG-2 isn't universally supported as well.
I imagine doing something like this, but feedback appreciated!
CALVC only. CABAC is less advantagous at higher bitrates, and a lot more expensive to decode.
Use the most restrictive profile matching the source. So, if coming from MPEG-2 4:2:2, use High 4:2:2 8-bit. But ProRes HQ would use 10-bit 4:2:2
Use Level 3.0 for SD, Level 3.2 for 720p, Level 4.1 for 1080 <50p.
Allow full buffer size and peak bitrate for the Profile@Level.
Encode with a low CRF. 10? Emperical testing would be done to find a CRF where a few generations of encoding could be applied without introducing artifacts that would impact the final encode.
Short Closed GOPs for fast random access. 1-2 seconds max?
Mux in the source audio without recompression.
--preset fast? This sort of thing is generally done on fast machines, and often the source decode is the bottleneck. Having a significantly smaller mezzanine can be worth a someone slower time to create. And, of course, a lower bitrate mezzanine would be faster to transcode from.
Questions:
Would using slices with CAVLC meaningfully help software decoding speed on multicore machines?
What --tune mode? Default? Grain?
What alpha/beta? -2, -2 low enough?
What B-frame pattern? Strict pyramid with 3 B (IbBbP)? All P-frames? Simple IbP?
MPEG-4 file or Transport Stream?
Is anyone actively doing this today? Any learnings to share?