Which timestamp a video shows at playback time 0. More...
Detailed Description
Which timestamp a video shows at playback time 0.
Every renderer and the thumbnailer go through this, so that they agree on which frame a time shows.
Time 0 is the container's start, the earliest timestamp of any stream, as mpv and ffplay rebase it: an MPEG-TS can start hours into its broadcast clock. Using the container's start rather than the video stream's keeps the offset between streams (a video starting after its audio).
Never before 0: a negative start is codec delay or edit-list priming (MP4, MOV), whose frames are dropped.
Go to the source code of this file.
Functions | |
| int64_t | Video::playbackStartPts (const AVFormatContext &fmt, const AVStream &st) noexcept |
The timestamp, in st's time base, shown at playback time 0. | |
| int64_t | Video::flicksToPts (int64_t flicks, AVRational tb, int64_t start) noexcept |
| int64_t | Video::ptsToFlicks (int64_t pts, AVRational tb, int64_t start) noexcept |
| The playback time of a timestamp. | |
Variables | |
| constexpr AVRational | Video::flicks_time_base {1, int(ossia::flicks_per_second<int64_t>)} |
Function Documentation
◆ flicksToPts()
|
inlinenoexcept |
The timestamp a playback time falls on. Rounded down – in a container whose tick is a whole frame (AVI) rounding to the nearest would switch frames halfway through them – after a microsecond of slack: a time computed from a frame's start in floating point can land just short of it.