On date Tuesday 2008-12-09 01:43:54 +0000, Ash encoded: > Hello,I am trying to use libavcodec (specifically > avcodec_encode_video() ) to take in as input RGB frames > (PIX_FMT_RGB24) and output a video file in mpeg-4 encoding > (CODEC_ID_MPEG4).
You can't do that, mpeg4_encoder only supports YUV420P in input (check pix_fmts in the encoder definition, also I think it should issue a warning when opening it). You need to convert the frame before to pass it to the encoder (check libswscale for that). > However, I used the apiexample.c as a reference > but somehow I am not created my AVCodecContext correctly and > avcodec_open() fails. Does anyone have any advice or sample code on > how to do this? Thanks! Regards. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
