[FFmpeg-user] Encoding .png images with h264 to a file on disk
laddoe
xyfix at hotmail.com
Thu Feb 18 02:27:01 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 embedded and charset-unspecified text was scrubbed...
Name: moviecodec.cpp
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210218/4b8da064/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: moviecodec.h
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210218/4b8da064/attachment.h>
More information about the ffmpeg-user
mailing list