Skip to content

Wrong timestamp from getCurrentPosition() when using HLS #11090

Open

Description

@gabrielgarciagava

Bug

I am using ExoPlayer to show an HLS video. If I pause the video, and request the timestamp with getCurrentPosition, it gives me a value that around ~100ms before what is actually being shown in the video player (around 2 frames of the video I am using). I am comparing this to the frames extracted using ffmpeg, and comparing the timestamp reported for each frame by ffmpeg.

For the sake of comparison, I am running the exact same expereriment using AVPlayer on iOS. There, the timestamp that it gives matches the frame I extract with ffmpeg.

An alternative way to execute the experiment and get to the same result. Pick any frame using ffmpeg, look the timestamp of the frame. Open the video with ExoPlayer and call seekTo to that position. The same thing will happen, the frame that will be shown is around ~2 frames (I say around 2 since I've seen 1,2 and 3 frames of difference during my tests) after the one seen with ffmpeg.

Activity

  1. gabrielgarciagava commented on Mar 30, 2023

    @gabrielgarciagava
    Author

    Follow up of: #10153 (comment)

  2. self-assigned this
    on Mar 30, 2023
  3. tianyif commented on May 3, 2023

    @tianyif
    Contributor

    Hi @gabrielgarciagava, is it possible for us to have a sample playlist? We are currently investigating a similar issue, in which we saw there might be some problem with the playlist. Having another playlist with the same playback behaviour to compare will be really helpful. Thanks in advance!

  4. tianyif commented on May 12, 2023

    @tianyif
    Contributor

    Hi @gabrielgarciagava,

    Yesterday we figured out a similar issue androidx/media#356, could you please try if the workaround mentioned in that issue works for you? If the issue still persist after applying the workaround, could you please provide the media so that we can see if there is some other causes?

    Thanks!

  5. gabrielgarciagava commented on May 17, 2023

    @gabrielgarciagava
    Author

    Hello @tianyif. Thanks for the feedback.
    I will try to find some time this week to get back to it and try the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions