Where to set MPEG4 compliance level for mencoder/libavcodec?
Encoding with mencoder built from CVS after than Jan 17 fails, see below. It seems that the strict_std_compliance level is set to a value larger than zero (where isi it set??), resulting in a failure to encode the .avi file to mpeg. Obviously the input file does not strictly follow the MPEG4 specification. /usr/bin/mencoder ./test.avi -of mpeg -nosound -o ./temporary-avstream.mpeg -ovc lavc -lavcopts vcodec=mpeg2video:aspect=4/3 OK with mplayer_1.0cvs-20040117_i386: ===================================== ... VIDEO: [XVID] 624x336 24bpp 23.976 fps 1388.2 kbps (169.5 kbyte/s) [V] filefmt:3 fourcc:0x44495658 size:624x336 fps:23.98 ftime:=0.0417 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4) SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2 videocodec: libavcodec (480x480 fourcc=3267706d [mpg2]) Pos: 17.2s 412f ( 0%) 51fps Trem: 42min 591mb A-V:0.000 [908:0] Writing AVI index... Fixing AVI header... Video stream: 908.115 kbit/s (113514 bps) size: 1950623 bytes 17.184 secs 412 frames NOT OK with mplayer_1.0cvs-20040117_i386: ========================================= SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2 videocodec: libavcodec (480x480 fourcc=3267706d [mpg2]) [mpeg2video @ 0x85578f0]MPEG1/2 doesnt support 239759/10000 fps Could not open codec. FATAL: Cannot initialize video driver. Pos: 0.0s 2f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] 1 duplicate frame(s)! Unknown block type, possibly non-MPEG stream! The following code triggers the problem libavcodec/mpeg12.c: ... static int encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; if(MPV_encode_init(avctx) < 0) return -1; if(find_frame_rate_index(s) < 0){ if(s->strict_std_compliance >=0){ av_log(avctx, AV_LOG_ERROR, "MPEG1/2 doesnt support %d/%d fps\n", avctx->frame_rate, avctx->frame_rate_base); return -1; }else{ av_log(avctx, AV_LOG_INFO, "MPEG1/2 doesnt support %d/%d fps, there may be AV sync issues\n", avctx->frame_rate, avctx->frame_rate_base); } } return 0; } ...
participants (1)
-
Svante Signell