Hi! I'm getting closer to create an animated GIF using a (Qt) QImage array as input.
This is the latest GIF file I could create -> http://maefloresta.com/tmp/test.gif Using this method as part of the process, I insert every frame into the GIF file: writeVideoFrame(AVFormatContext *oc, AVStream *video_st, const QImage &image) { QImage img = image.convertToFormat(Format_RGB888); AVPacket pkt; av_init_packet(&pkt); pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = video_st->index; pkt.data = (uint8_t *) img.bits(); pkt.size = sizeof(AVFrame); av_write_frame(oc, &pkt); frameCount++; } As you can see it, the GIF file is not animated. Just the first frame is displayed, but the picture encoding is accurate. I was sneaking around inside the container using an hex editor and the 15 frames I created for that example are there. I am missing some kind of flag or instruction to activate the animated format. Any suggestion? PS: I tried to use the function *avcodec_encode_video2()* to add the frames into the file, but it was unsuccessful. Creating my own packets (AVPacket) was the best approach for now. 2017-02-14 18:58 GMT-05:00 Carl Eugen Hoyos <[email protected]>: > 2017-02-14 21:09 GMT+01:00 Malik Jahanzeb <[email protected]>: > > > I needed a different muxer for my program but I couldn't find an example > to > > follow. > > Did you look into doc/examples? > > Carl Eugen > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > -- ============================ Gustav Gonzalez [email protected] ============================
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
