If i remove the redefinition of encodedPacket.pts before av_interleaved_write_frame the encoded file would not even play in VLC. VLC does not recognize its duration.
Francois Le 13 juil. 2013 à 12:33, Luca Barbato <[email protected]> a écrit : > On 07/13/2013 11:37 AM, Francois PEDEBOSCQ Yahoo wrote: >> Dear all, I am facing an issue when trying to encode an H264 video to >> MPEG4. The output file is playing great in VLC player but with >> Quicktime I only see black frame. Here below my code: >> > >> encodedPacket.pts = av_rescale_q(curFrameNum, outStream->codec->time_base, >> outStream->time_base); >> encodedPacket.dts = av_rescale_q(curFrameNum, outStream->codec->time_base, >> outStream->time_base); > > pts and dts are wrongly set. Leave them alone decode2 should output the > right values for you. > > lu > _______________________________________________ > libav-api mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-api _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
