Yes, you can. You might have to convert the frame to a different pixel format,
depending on the requirements of the encoder.
On 7/22/2010 2:27 PM, Umakant Goyal wrote:
HI,
Can i pass the output (AVFrame) of *avcodec_decode_video* function as an
input in *avcodec_encode_video* function to encode the data again?
e.f
AVFrame *pFrame = avcodec_alloc_frame();
avcodec_decode_video (DecoderContext, pFrame,&size, EncData, DataLen);
avcodec_encode_video (EncoderContext, encData, bufSize, pFrame);
If not can someone explain how can i use the output of decoder function in
encoder function?
On Thu, Jul 22, 2010 at 10:04 PM, Umakant Goyal<[email protected]>wrote:
On 7/22/10, Tomas Härdin<[email protected]> wrote:
On Thu, 2010-07-22 at 14:57 +0530, Umakant Goyal wrote:
Can someone tell me the significance of parameter *got_picture_ptr* of
*
avcodec_decode_video* function?
It'll be set to one if the decoder actually decoded a frame. Due to
reordering there might be a delay before you start getting frames. This
also means you have to flush the decoder when you're at EOF.
Do i need to set value for this parameter?
how can i utilize the ouput of this variable?
secondly, can i get information regarding number of bytes of decode
buffer
(AVFrame)?
The decode function takes care of that for you. Just pass it a pointer
to an AVFrame initialized by avcodec_get_frame_defaults(). To be
precise, you have to allocate the AVFrame struct (as a stack var would
be easiest) but lavc takes care of allocating the buffers it points to.
/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