[Libav-user] PTS issues muxing fragmented mp4

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Libav-user] PTS issues muxing fragmented mp4

Massimo Perrone
Hi everybody,

I am trying to create fragmented mp4 video files (h264 encoded) starting
from a RTSP source (an IP camera, or ffserver streaming a mp4 which in turn
comes from an IP camera).
I use a custom fragmentation mode, by calling av_write_frame() with a null
packet every 2 seconds, while the actual video frames are written using
Packets corresponding to SPS and PPS nal units (which usually precede an
IDR) are also muxed, but for them I let the pts and dts non specified (i.e.
The problem is that the presentation times which are assigned to AVPacket
instances before calling av_interleaved_write_frame() (with a 90 KHz
timebase) sometimes do not corresponds to those read from the same file via
av_read_frame() once the file has been closed, as if they were rearranged
Empirically, it seems that this doesn't occur if fragmentation is disabled.

Any suggestion/explanation?

Thanks in advance,

Massimo Perrone

Sent from: http://libav-users.943685.n4.nabble.com/
Libav-user mailing list
[hidden email]