[Libav-user] Encoding .png images with h264 to a file on disk

laddoe xyfix at hotmail.com
Sun Feb 21 14:44:27 EET 2021


Hi there,

Can somebody help me to find out why I end up with a file on disk that is only 24 kb and not readable by vlc or so, while I send valid YUV images to the codec. I have added the  .h and .cpp file. Up till "avcodec_receive_packet" everything seems to be OK. The function call "avcodec_send_frame" returns 0, so that must be OK but "avcodec_receive_packet" returns -11. If I flush the encoder (currently commented) then "avcodec_receive_packet"  returns 0 and I can see encoded data if I store it on disk. Also the input image to the encoder is also correct (currently commented) and checked. I'm aiming for an intra-frame encoding, so I should get the encoded frame data back, but I don't get anything back even if I send 24 images to it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20210221/07747ca0/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: moviecodec.h
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20210221/07747ca0/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: moviecodec.cpp
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20210221/07747ca0/attachment.ksh>


More information about the Libav-user mailing list