[Libav-user] Encoding H263+ video

2013-01-10 Thread David Longest
Hello! I am attempting to encode raw video from a camera to H263+ using the "decoding_encoding.c" file as an example. My code requires one more step since the camera provides an image in the NV21 format. While the conversion seems to work fine, I seem to get a crash (sigsegv) when encoding the

Re: [Libav-user] Encoding H263+ video

2013-01-13 Thread Alex Cohn
On Thu, Jan 10, 2013 at 11:49 PM, David Longest wrote: > Hello! > > I am attempting to encode raw video from a camera to H263+ using the > “decoding_encoding.c” file as an example. My code requires one more step > since the camera provides an image in the NV21 format. > > While the conversion seem

Re: [Libav-user] Encoding H263+ video

2013-01-14 Thread David Longest
> Alex Wrote: > > Note that in terms of allocations and encoder logic, you can use nv21 input > instead of yuv420p. The resulting video will be crap, but the encoder should > not > crash/fail, and you can expect to receive a movie file as output. You > can even extract nv21 frames from this movi

Re: [Libav-user] Encoding H263+ video

2013-01-14 Thread Alex Cohn
On Mon, Jan 14, 2013 at 6:06 PM, David Longest wrote: > > I just tried creating an AVFrame and setting the pixel format to > PIX_FMT_YUV420P while still providing NV21 data. When passing this frame to > avcodec_encode_video2, I will still get the crash unless I allocate the > input packet's data f

Re: [Libav-user] Encoding H263+ video

2013-01-15 Thread David Longest
> Please post your source code, if possible - the minimal crashing example. > Make sure you use the latest version of fffmpeg libraries. What is your > platform and compiler? > > BR, > Alex I have found what my problem was. As the following code sample would show, I was using av_malloc to allo

Re: [Libav-user] Encoding H263+ video

2013-01-15 Thread Alex Cohn
On Tue, Jan 15, 2013 at 4:27 PM, David Longest wrote: > > I have found what my problem was. As the following code sample would show, I > was using av_malloc to allocate an AVPacket on the heap. While I called > av_init_packet to initialize the fields of the AVPacket struct, that function > does