I was hoping that there is some way to call the VFW encoder through the libmpcodecs video filters because mencoder appears to be able to encode using the iccvid.dll on the command-line per the documentation: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-video-for-windows.html
________________________________ From: Tomas Härdin <[email protected]> To: [email protected] Sent: Fri, September 3, 2010 3:02:25 AM Subject: Re: [libav-user] How do I encode with VFW DLL through the libavcodec API? Ivans Chou skrev 2010-09-01 20:00: > I have an application that uses the libavcodec API to write video files. It > allows me to use all the various encoders that libavcodec supports using a > single code base and all I have to do is change the codec and the codec's > parameters. I also need to write out AVI's encoded with cinepak using the > iccvid.dll codec. > > > > My code currently uses... > > pCodec = avcodec_find_encoder( selected_codec ); > avcodec_encode_video( pCodecCtx, buffer, numBytes, pFrame ); > av_write_frame( pFormatCtx,&pkt ); > > To select an encoder, encode, and write frames, which works great. Can I use > this same code to encode using iccvid.dll or must I use completely reimplement > this to encode with that codec? If so, would someone happen to have some >sample > code that shows how to accomplish this? > > Thanks, Since VFW and libavcodec are two completely different API:s, you most certainly can't use the same code. You can write a small wrapper codec for the cinepak encoder and register it at runtime though. Look at how some of the simpler encoders are implemented (libavcodec/*enc.c). Then use avcodec_register() to register your wrapper. That way you don't have to recompile libavcodec. Oh, and a side note: I wrote a cinepak encoder for libavcodec a few months ago. Works with both 4:2:0 and grayscale. I might post it on the list some day. I haven't compared it to the one that Windows comes with though, so I'm not sure how they compare. /Tomas _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
