[Libav-user] PTS timing issues
williamkeeling at hotmail.com
Fri Apr 24 03:36:24 EEST 2020
Found that issue I had set DTS to AV_NOPTS_VALUE. Once DTS and PTS are set to frame count I get the correct timing. Now just have to solve the frozen frame issue. 🙂
From: Libav-user <libav-user-bounces at ffmpeg.org> on behalf of william keeling <WilliamKeeling at hotmail.com>
Sent: Wednesday, April 22, 2020 4:01 PM
To: libav-user at ffmpeg.org <libav-user at ffmpeg.org>
Subject: [Libav-user] PTS timing issues
I am trying to create a program that encodes a PCM audio source to AAC and muxing that with a hardware encoded H.264 stream. I have it all working other than the video stream PTS issues. The audio stream timebase is 1/44100 and video stream timebase is 1/30 (30 FPS fixed). As I create the packets and pass them to av_write_frame() I get the messages " [flv @ 0x1666f80] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [flv @ 0x1666f80] Encoder did not produce proper pts, making some up." if the initail PTS is set to 0 or "[flv @ 0x6bbf80] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [flv @ 0x6bbf80] Packets are not in the proper order with respect to DTS" if PTS is non zero. The container format is FLV (flash video). The video stream is encode by Raspberry Pi GPU using MMAL with the callback format FFMPEG packet and writing with av_write_frame.
How can I trace the code of av_write_frame? I get to mux.c line 747 "ret = s->oformat<https://www.ffmpeg.org/doxygen/4.0/structAVFormatContext.html#a20d80ac07e38ff5c268d15aaf2798b98>->write_packet<https://www.ffmpeg.org/doxygen/4.0/structAVOutputFormat.html#a45acfafceda2496ff21c13368c438f35>(s, pkt);" and then I do not know how to find the source for the function stored in format context for a H.264 stream.
No matter how I set the timebase and/or the PTS I get 1 frame a second -- any Ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user