CVS: main/libmpcodecs ve_lavc.c, 1.132, 1.133 ae_lavc.c, 1.8, 1.9
CVS change done by Michael Niedermayer CVS Update of /cvsroot/mplayer/main/libmpcodecs In directory mail:/var2/tmp/cvs-serv21442 Modified Files: ve_lavc.c ae_lavc.c Log Message: -lavcopts aglobal Index: ve_lavc.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -r1.132 -r1.133 --- ve_lavc.c 21 Feb 2006 09:39:21 -0000 1.132 +++ ve_lavc.c 13 Mar 2006 02:40:09 -0000 1.133 @@ -163,6 +163,7 @@ char *lavc_param_acodec = "mp2"; int lavc_param_atag = 0; int lavc_param_abitrate = 224; +int lavc_param_audio_global_header= 0; #include "m_option.h" @@ -316,6 +317,7 @@ {"bidir_refine", &lavc_param_bidir_refine, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL}, {"sc_factor", &lavc_param_sc_factor, CONF_TYPE_INT, CONF_RANGE, 1, INT_MAX, NULL}, {"vglobal", &lavc_param_video_global_header, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL}, + {"aglobal", &lavc_param_audio_global_header, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; #endif Index: ae_lavc.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/ae_lavc.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ae_lavc.c 9 Jan 2006 19:35:44 -0000 1.8 +++ ae_lavc.c 13 Mar 2006 02:40:09 -0000 1.9 @@ -24,6 +24,7 @@ extern char *lavc_param_acodec; extern int lavc_param_abitrate; extern int lavc_param_atag; +extern int lavc_param_audio_global_header; extern int avcodec_inited; static int compressed_frame_size = 0; #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) @@ -206,6 +207,13 @@ int framesize = (blkalign - 4 * lavc_actx->channels) * 8 / (4 * lavc_actx->channels) + 1; lavc_actx->bit_rate = lavc_actx->sample_rate*8*blkalign/framesize; } + if((lavc_param_audio_global_header&1) + /*|| (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))*/){ + lavc_actx->flags |= CODEC_FLAG_GLOBAL_HEADER; + } + if(lavc_param_audio_global_header&2){ + lavc_actx->flags2 |= CODEC_FLAG2_LOCAL_HEADER; + } if(avcodec_open(lavc_actx, lavc_acodec) < 0) {
On Mon, Mar 13, 2006 at 03:40:12AM +0100, Michael Niedermayer CVS wrote:
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpcodecs In directory mail:/var2/tmp/cvs-serv21442
Modified Files: ve_lavc.c ae_lavc.c Log Message: -lavcopts aglobal
And again with the missing documentation. :) Could you explain so documenters can ... document? (I'm guessing same as vglobal but for audio...) - ods15
Hi On Mon, Mar 13, 2006 at 08:19:05AM +0200, Oded Shimon wrote:
On Mon, Mar 13, 2006 at 03:40:12AM +0100, Michael Niedermayer CVS wrote:
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpcodecs In directory mail:/var2/tmp/cvs-serv21442
Modified Files: ve_lavc.c ae_lavc.c Log Message: -lavcopts aglobal
And again with the missing documentation. :)
Could you explain so documenters can ... document? (I'm guessing same as vglobal but for audio...)
yes, though it doesnt really work yet ... lavc-faac -> lavf-mp4 fails [...] -- Michael
On Mon, Mar 13, 2006 at 11:56:14AM +0100, Michael Niedermayer wrote:
On Mon, Mar 13, 2006 at 08:19:05AM +0200, Oded Shimon wrote:
On Mon, Mar 13, 2006 at 03:40:12AM +0100, Michael Niedermayer CVS wrote:
Modified Files: ve_lavc.c ae_lavc.c Log Message: -lavcopts aglobal
Could you explain so documenters can ... document? (I'm guessing same as vglobal but for audio...)
yes, though it doesnt really work yet ... lavc-faac -> lavf-mp4 fails
Umm, that doesn't help, vglobal is undocumented as well: .B vglobal FIXME: Document this. Diego
Hi On Wed, Mar 15, 2006 at 12:14:23AM +0100, Diego Biurrun wrote:
On Mon, Mar 13, 2006 at 11:56:14AM +0100, Michael Niedermayer wrote:
On Mon, Mar 13, 2006 at 08:19:05AM +0200, Oded Shimon wrote:
On Mon, Mar 13, 2006 at 03:40:12AM +0100, Michael Niedermayer CVS wrote:
Modified Files: ve_lavc.c ae_lavc.c Log Message: -lavcopts aglobal
Could you explain so documenters can ... document? (I'm guessing same as vglobal but for audio...)
yes, though it doesnt really work yet ... lavc-faac -> lavf-mp4 fails
Umm, that doesn't help, vglobal is undocumented as well:
.B vglobal FIXME: Document this.
Xglobal= 0-3 0 default 1 write global headers only in extradata (needed for .mp4/mov/nut/...) 2 write global headers only infront of keyframes 3 = 1+2 1 should be set automatically if mp4/mov/... is used, this works in ffmpeg.c but not in mencoder yet and this stuff might change in the not too distant future so maybe this switch will move to the muxer or otherwise change in an incompatible way [...] -- Michael
On Fri, Mar 24, 2006 at 03:15:22AM +0100, Michael Niedermayer wrote:
Xglobal= 0-3 0 default 1 write global headers only in extradata (needed for .mp4/mov/nut/...) 2 write global headers only infront of keyframes 3 = 1+2
1 should be set automatically if mp4/mov/... is used, this works in ffmpeg.c but not in mencoder yet
So something like the following will be correct in the man page? .TP .B vglobal=<0\-3> Control writing global video headers. .PD 0 .RSs .IPs 0 Do not write global headers (default). .IPs 1 Write global headers only in extradata (needed for .mp4/MOV/NUT). .IPs 2 Write global headers only in front of keyframes. .IPs 3 Combine 1 and 2. . .TP .B aglobal=<0\-3> Same as vglobal for audio headers. Diego
On Thu, Apr 27, 2006 at 03:34:15PM +0200, Diego Biurrun wrote:
On Fri, Mar 24, 2006 at 03:15:22AM +0100, Michael Niedermayer wrote:
Xglobal= 0-3 0 default 1 write global headers only in extradata (needed for .mp4/mov/nut/...) 2 write global headers only infront of keyframes 3 = 1+2
1 should be set automatically if mp4/mov/... is used, this works in ffmpeg.c but not in mencoder yet
So something like the following will be correct in the man page?
.TP .B vglobal=<0\-3> Control writing global video headers. .PD 0 .RSs .IPs 0 Do not write global headers (default). .IPs 1 Write global headers only in extradata (needed for .mp4/MOV/NUT). .IPs 2 Write global headers only in front of keyframes. .IPs 3 Combine 1 and 2. . .TP .B aglobal=<0\-3> Same as vglobal for audio headers.
Committed, I hope it's correct... Diego
On Fri, 28 Apr 2006, Diego Biurrun wrote:
On Thu, Apr 27, 2006 at 03:34:15PM +0200, Diego Biurrun wrote:
On Fri, Mar 24, 2006 at 03:15:22AM +0100, Michael Niedermayer wrote:
Xglobal= 0-3 0 default 1 write global headers only in extradata (needed for .mp4/mov/nut/...) 2 write global headers only infront of keyframes 3 = 1+2
1 should be set automatically if mp4/mov/... is used, this works in ffmpeg.c but not in mencoder yet
So something like the following will be correct in the man page?
.TP .B vglobal=<0\-3> Control writing global video headers. .PD 0 .RSs .IPs 0 Do not write global headers (default). .IPs 1 Write global headers only in extradata (needed for .mp4/MOV/NUT). .IPs 2 Write global headers only in front of keyframes. .IPs 3 Combine 1 and 2. . .TP .B aglobal=<0\-3> Same as vglobal for audio headers.
Committed, I hope it's correct...
default (0) is whatever the codec feels like doing. I don't know if there's any concensus between codecs now. The headers are always written somewhere, they're needed for decoding. --Loren Merritt
On Fri, Apr 28, 2006 at 03:45:46PM -0700, Loren Merritt wrote:
On Fri, 28 Apr 2006, Diego Biurrun wrote:
On Thu, Apr 27, 2006 at 03:34:15PM +0200, Diego Biurrun wrote:
So something like the following will be correct in the man page?
.TP .B vglobal=<0\-3> Control writing global video headers. .PD 0 .RSs .IPs 0 Do not write global headers (default). .IPs 1 Write global headers only in extradata (needed for .mp4/MOV/NUT). .IPs 2 Write global headers only in front of keyframes. .IPs 3 Combine 1 and 2. . .TP .B aglobal=<0\-3> Same as vglobal for audio headers.
Committed, I hope it's correct...
default (0) is whatever the codec feels like doing. I don't know if there's any concensus between codecs now. The headers are always written somewhere, they're needed for decoding.
Should be fixed. Diego
participants (5)
-
Diego Biurrun -
Loren Merritt -
Michael Niedermayer -
Oded Shimon -
syncmail@mplayerhq.hu