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
> rate
> (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

/Tomas

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to