Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Media files and containers
  3. Container structure
  4. Timing and navigation
  5. Time bases
Search Results for

    Show / Hide Table of Contents

    Time Bases

    A time base defines the duration of one timestamp tick so integer media timestamps can be converted to real time.

    A timestamp is a counter. Its time base tells you how much time one count represents:

    seconds = timestamp × time base

    For a time base of 1/90,000 second per tick, a counter value of 45,000 represents half a second. An audio clock counting at 48,000 ticks per second uses 24,000 for that same moment.

    Tick duration Counter Converted time
    1/90,000 s 45,000 0.5 s
    1/48,000 s 24,000 0.5 s
    1/1,000 s 500 0.5 s

    Frame rate chooses the gaps, not the counter's units

    At 25 frames per second, consecutive evenly spaced pictures are 0.04 seconds apart. On a 90,000-tick clock they can advance by 3,600 ticks each. The clock's time base remains 1/90,000; the picture rate is 25 fps.

    At 30,000/1,001 fps, the gap on that clock is 90,000 × 1,001 / 30,000 = 3,003 ticks. Keeping the rational values avoids treating the rounded display label 29.97 as the exact rate.

    Variable-frame-rate pictures can use different gaps on one unchanged clock. A counter that advances irregularly is therefore not itself evidence that the time base changed.

    Rescaling into another container

    Suppose an audio component advances by 1,024 samples on a 48 kHz clock. Its packet starts are:

    Source ticks Exact start in milliseconds Nearest millisecond counter
    0 0 0
    1,024 21.333… 21
    2,048 42.666… 43
    3,072 64 64

    Rescaling preserves the represented time as closely as the new integer units permit. The resulting millisecond gaps are 21, 22, and 21, not one fixed rounded gap. Multiplying a rounded 21 ms duration three times would give 63 ms instead of the correct 64 ms. This is why rescaling absolute positions or using careful rational accumulation matters.

    The rounding error is bounded by the destination's resolution; it should not accumulate as if every packet independently shortened the programme. A finer destination clock can represent more of the original positions exactly.

    ffprobe exposes both raw counters and converted fields such as pts_time. For an Emby timing investigation, the converted positions show how audio and video align. Keep any start offsets as part of that comparison: a counter's zero is a convention, while the relative schedules determine synchronization.

    See Also

    • Packet Timestamps
    • Media Stream Inspection with ffprobe

    References

    • FFmpeg: stream time-base definitions
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top