2017-03-05 8:43 GMT-05:00 Carl Eugen Hoyos <[email protected]>: > 2017-03-05 2:52 GMT+01:00 Gustav González <[email protected]>: > > > QImage img = image.convertToFormat(Format_RGB888); > > Not necessarily related: Why are you not using libswscale or > the scale filter? >
In fact, I tried it using different parameters for a week. That was my first approach to the problem, but always I got an error message from the encoder, telling me that the AVFrame format was wrong. Looking for a solution, I found this alternative that only requires two lines to get an accurate AVFrame. All I can say about it, is that it's working. > > > avpicture_fill((AVPicture *)frame, img.bits(), AV_PIX_FMT_RGB24, w, h); > > FFmpeg's git encoder does not support RGB24, so whatever you are > doing is unfortunately not supported here. > Someone told me the same. So I started to use the format AV_FIX_FMT_RGB8. The funny thing was that while I was running my program, I got a (red) warning message from the libav API, asking me to use RGB24. I already checked the gif.c code, and effectively there is NOT support for RGB24. I can't explain it. Counting on I have been researching about this topic for around a month, testing all the logic suggestions and the crazy ones, I decided to change the format to RGB24, following the libav warning advice. Crazy or not, the warning message disappeared and the code works, I mean, I got an animated GIF from a sequence of QImage objects. About the pending issue, I thought it was related to the FPS variable of the files but I was wrong, the problem is the size of them, they are giants! (MBs for every second) So large, that the browser only can play them slowly. I ran other tests using mplayer and the speed of the animations is right. So, my next challenge is to low the size of the frames to finish my implementation. Any hint? -- ============================ Gustav Gonzalez [email protected] ============================
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
