Thanks, you all are helping me a lot ;) I changed to use calloc(1, size) but it still not working, I noticed that the duration of the video stream is totally wrong (1:22:33 vs 10s) I probably made mistake with timing. (audio is working perfect, I just copied it)
VLC log shows: [0000000100869ab8] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 0, bound 9000000) [0000000100869ab8] core decoder error: Could not convert timestamp 947727489464 On Sun, Dec 10, 2017 at 10:15 AM Leandro Moreira < [email protected]> wrote: > I called encode_frame at each decode too > https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L213 > > > I just used malloc for my own structures > https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L32 > but I'll change it > > I pushed some changes on my machine, it shouldn't break though. Now, the > only warning message I'm having are: > > [libx264 @ 0x7f8044000c00] MB rate (489600000) > level limit (2073600) > [mp4 @ 0x7f8043829000] track 1: codec frame size is not set > [libx264 @ 0x7f8044000c00] forced frame type (5) at 4 was changed to frame > type (3) > > And sure, my final file doesn't play on VLC although I can listen to the > audio. > > Thanks > > On Sun, Dec 10, 2017 at 9:59 AM Carl Eugen Hoyos <[email protected]> > wrote: > >> 2017-12-10 12:51 GMT+01:00 JULIAN GARDNER <[email protected]>: >> > There are a few problems with the code. >> > >> > 1. Use calloc not malloc initialising your structures >> >> I would have expected that the API requires you to >> use av_*alloc* - does it not? >> >> Please avoid top-posting here, Carl Eugen >> _______________________________________________ >> Libav-user mailing list >> [email protected] >> http://ffmpeg.org/mailman/listinfo/libav-user >> >
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
