I am new to ffmpeg and am trying to encode to MPEG2 D10 I am using revision 19203. I found the following on the web, and if I run it it creates the output file no problem.
ffmpeg -i t:\temp\pal-YUY2.mov -vcodec mpeg2video -r 25 -pix_fmt yuv422p -minrate 50000k -maxrate 50000k -b 50000k -intra -flags +ildct+low_delay -dc 10 -flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize 2000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25 -loglevel 48 -an t:\temp\output.m2v Trouble is when I do what I think is the same thing from my code it crashes when I call avcodec_encode_video My AVCodecContext parameters are below: pContext->bit_rate = 50000000; pContext->time_base.num = 1; pContext->time_base.den = 25; pContext->width = 720; pContext->height = 576; pContext->gop_size = 0; pContext->pix_fmt = PIX_FMT_YUV422P; pContext->flags = CODEC_FLAG_LOW_DELAY | CODEC_FLAG_INTERLACED_DCT; pContext->flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT; pContext->qmax = 3; pContext->qmin = 1; pContext->rtp_payload_size = 1; pContext->rc_max_rate = pContext->bit_rate; pContext->rc_min_rate = pContext->bit_rate; pContext->intra_dc_precision = 10; pContext->rc_buffer_size = 2000000; pContext->rc_initial_buffer_occupancy = pContext->rc_buffer_size; I have set the log level to AV_LOG_DEBUG and see no errors in my calls to the previous av functions Any idea what I am doing wrong? Thanks Matt _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
