[FFmpeg-devel] Purely synthetic PTS and DTS...
tjoppen at acc.umu.se
Tue Feb 13 13:02:59 EET 2018
sön 2018-02-11 klockan 17:44 -0500 skrev Tony Di Croce:
> I have video frames in a buffer in memory... and I know their frame
> (and other information like resolution, etc)... I am attempting to
> mux this
> video into an mp4... But I don't know how to set PTS/DTS
> appropriately. I
> have two questions:
> 1) What should I set AVStream->time_base to?
> 2) How do I compute PTS/DTS per frame (given only a framerate)?
> Thanks in advance!
I don't think MP4 allows raw video. You probably mean MOV.
If your framerate is constant then I believe setting time_base to it
and just having PTS increase monotonically from zero is enough (ptr =
0, pts = 1, pts = 2 ...). There may also be some API for this, or lavf
may come up with some PTSes for you if you say AV_NOPTS_VALUE
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the ffmpeg-devel