variable frame rate PTS/time_base usage

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

variable frame rate PTS/time_base usage

Riley Berton
I am attempting to use ffmpeg to create a variable frame rate (VFR)  
WMV video with no audio.

Can someone point me to an example of the correct usage of  
AVPacket.pts/dts and the codec.time_base
to make a WMV that uses timestamps on each frame to determine when  
they are displayed?

The docs I have read only give info on a fixed frame rate.

Thanks,

riley
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: variable frame rate PTS/time_base usage

Riley Berton
Would a possible approach be to set the framerate to 1/1000 (1000  
representing millisecs in the timestamp) and set the pts of each frame
to the millisecs it occurred in the second?

IOW, if I have frames like:

Frame 1 - 0:25ms
Frame 2 - 0:125ms
Frame 3 - 0:250ms
...
Frame 11 - 1:25ms

And set the pts to (second * 1000 + ms) then I should get the proper  
spread of frames and a variable framerate, no?

The question there is, will ffmpeg display the frames for the correct  
duration based on when the next frame is to be displayed?

riley

On Dec 15, 2007, at 5:59 PM, Riley Berton wrote:

> I am attempting to use ffmpeg to create a variable frame rate (VFR)
> WMV video with no audio.
>
> Can someone point me to an example of the correct usage of
> AVPacket.pts/dts and the codec.time_base
> to make a WMV that uses timestamps on each frame to determine when
> they are displayed?
>
> The docs I have read only give info on a fixed frame rate.
>
> Thanks,
>
> riley
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user