Following is the code i have written to use ffmpeg to open MP4 encoder. When I call avcodec_open it returns -22.
Is there missing configuration? What does this error mean? Is there any documentation for the error numbers? Also what is the units for the bit_rate field? avcodec_init(); avcodec_register_all(); AVCodec *pCodec = avcodec_find_encoder(CODEC_ID_MPEG4); AVCodecContext *pContext = avcodec_alloc_context(); AVFrame *picture = avcodec_alloc_frame(); pContext->codec_id = CODEC_ID_MPEG4; pContext->codec_type = AVMEDIA_TYPE_VIDEO; pContext->codec = pCodec; pContext->bit_rate = 400000; pContext->width = 720; pContext->height = 576; pContext->time_base.num = 25; pContext->time_base.den = 1; pContext->pix_fmt = PIX_FMT_YUYV422; pContext->profile = FF_PROFILE_MPEG4_SIMPLE; int i = avcodec_open(pContext, pCodec); regards - Jasleen _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
