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

Gonzalo Garramuño ggarra13 at gmail.com
Mon Feb 22 18:55:25 EET 2021


El 22/2/21 a las 05:25, laddoe escribió:
> can anybody please help me with my post of 2 days ago, I'm really 
> stuck but not able to understand what is wrong. I have also tried 
> several different code examples but it all ends up the same as 
> mentioned in the post. Am I not understanding this ? Are my 
> expectations of the results incorrect? I'm new to this so please bear 
> with me.
>

One thing that is wrong in your code is that you never call 
av_write_trailer(), which should be called before avio_close().

Also, there's no need for m_file in your code.  avformat handles the 
file for you.

Other things are hard to say, as you don't provide the code to the Image 
or cv::Mat classes.  You should provide a self-compilable example for us 
to help you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20210222/094f71b2/attachment.html>


More information about the Libav-user mailing list