Log in

View Full Version : Encoding with --frame-packing 3 and slices?


benwaggoner
15th May 2013, 19:16
I've got some interesting 3D content lying around and thought I'd take a whack and encoding and playing it. I had encoded a bunch of stereo 3D with Expression Encoder for the Silverlight stereo 3D player several years ago, but I've never done it with x264.

First question: does --frame-packing 3 only set a metadata flag, or does it have some impact on the encoding process itself?

It occurs to me that it may be preference to encode each eye's image as an individual slice, to reduce the risk of prediction crossing the frame border and causing some weirdness around the edge. Also, a decoder could then decode left/right in parallel.

To that end, is there any way in x264 to specify the shape of the slices? I presume setting --slices 2 would give me a top/bottom split as long as the frame height is mod32. But how about a left/right split? I see lots of options to control slice size etcetera, but none that seem to apply to location.

Dark Shikari
15th May 2013, 20:35
Slices consist of consecutive macroblocks; they cannot be "split left-right" because that's not how H.264 works.*


*FMO would allow this, but it's only in Baseline and nothing, literally nothing, supports it.

benwaggoner
15th May 2013, 20:43
Slices consist of consecutive macroblocks; they cannot be "split left-right" because that's not how H.264 works.*

*FMO would allow this, but it's only in Baseline and nothing, literally nothing, supports it.
I must have been recollecting FMO.

I suppose this would be a slight pro for top/bottom encoding over left/right. However, consumer 3D display technologies tend to reduce horizontal detail a lot more than vertical detail, so it probably wouldn't be worth it.

Anyway, are there any actual encoding changes caused by encoding with --frame-packing, or does it just set a metadata flag?

Dark Shikari
15th May 2013, 21:08
Except for --frame-packing 5, it's just metadata.

benwaggoner
15th May 2013, 21:23
Except for --frame-packing 5, it's just metadata.
Okay, thanks. That's what I figured. As long as I stick to mod32 width (so that the eye boundary is also between macroblocks) I imagine it'll encode fine. That worked for VC-1 stereo 3D.

Anyone know offhand of devices that will honor that bitstream flag and "do the right thing" when attached to a 3D display?

tal.aloni
9th July 2014, 07:34
The Sony Bravia W8 series and the PlayStation 3 can play --frame-packing 5 from USB storage in 3D (see here (http://forum.doom9.org/showthread.php?t=170863)),
I haven't tested frame-packing 3.