[MEncoder-users] Setting 'low delay' flag in MPEG2 video
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Aug 8 12:21:25 CEST 2007
Hello,
On Wed, Aug 08, 2007 at 11:01:30AM +0100, Mark Himsley wrote:
> I want to create some MPEG video which will be played using a hardware
> video player (actually a broadcast video server).
>
> The MPEG needs to conform to Sony IMX 30 standard, which the brief
> description is 30Mbs I frame only MPEG2. Apparently it is vital that the
> 'low delay' flag (bit 7 of byte 9 of extension header 0x000001b5 type 0x01
> - if my Google foo has worked) is set, or the replay port goes into an
> indeterminate state.
I will never understand why the movie and broadcast people like
overpriced and crappy hardware so much...
> Is there a way I can ensure that bit is set when I create my mencoder
> command? I haven't seen it mentioned in the man page, but I could have
> missed something.
Try attached patch.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1 (revision 24031)
+++ DOCS/man/en/mplayer.1 (working copy)
@@ -8803,6 +8803,10 @@
quality at fixed bitrate) at a lesser cost than with VHQ (default: on).
.
.TP
+.B (no)lowdelay
+Sets the low delay flag for MPEG1/2 (disables B-frames, default: off).
+.
+.TP
.B (no)cartoon
Activate this if your encoded sequence is an anime/\:cartoon.
It modifies some Xvid internal thresholds so Xvid takes better decisions on
Index: libmpcodecs/ve_lavc.c
===================================================================
--- libmpcodecs/ve_lavc.c (revision 24031)
+++ libmpcodecs/ve_lavc.c (working copy)
@@ -111,6 +111,7 @@
static int lavc_param_dia_size= 0;
static int lavc_param_qpel= 0;
static int lavc_param_trell= 0;
+static int lavc_param_lowdelay= 0;
static int lavc_param_bit_exact = 0;
static int lavc_param_aic= 0;
static int lavc_param_aiv= 0;
@@ -242,6 +243,7 @@
{"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
{"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
{"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT, NULL},
+ {"lowdelay", &lavc_param_lowdelay, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_LOW_DELAY, NULL},
{"last_pred", &lavc_param_last_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"preme", &lavc_param_pre_me, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"subq", &lavc_param_me_subpel_quality, CONF_TYPE_INT, CONF_RANGE, 0, 8, NULL},
@@ -540,6 +542,7 @@
lavc_venc_context->dia_size= lavc_param_dia_size;
lavc_venc_context->flags|= lavc_param_qpel;
lavc_venc_context->flags|= lavc_param_trell;
+ lavc_venc_context->flags|= lavc_param_lowdelay;
lavc_venc_context->flags|= lavc_param_bit_exact;
lavc_venc_context->flags|= lavc_param_aic;
lavc_venc_context->flags|= lavc_param_aiv;
More information about the MEncoder-users
mailing list