Skip to content

[video_player] wrong duration #99592

@abdelaziz-mahdy

Description

@abdelaziz-mahdy

when playing a ts file i get duration of 0:00:00.001000
while the correct duration is 0:22:46.309000

so i tried to workaround that problem with using java MediaMetadataRetriever which gave me the correct duration

my problem right now that whenever i call seek function i cant seek due to video player controller having wrong duration

and i did try to overRide it this way _videoPlayerController!.value=_videoPlayerController!.value.copyWith(duration: _duration.value);
but i didnt work too

when i seek this is the log

D/CCodecBuffers(13776): [c2.android.aac.decoder#941:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 0
D/CCodecBuffers(13776): [c2.android.aac.decoder#941:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 1
I/CCodecConfig(13776): query failed after returning 19 values (BAD_INDEX)
D/CCodecConfig(13776): c2 config diff is   c2::i32 coding.drc.compression-mode.value = 3
W/Codec2Client(13776): query -- param skipped: index = 1342179345.
W/Codec2Client(13776): query -- param skipped: index = 2415921170.
W/Codec2Client(13776): query -- param skipped: index = 1610614798.
D/CCodecBuffers(13776): [c2.android.aac.decoder#941:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers(13776):   int32_t aac-drc-album-mode = 0
D/CCodecBuffers(13776):   int32_t aac-drc-boost-level = 127
D/CCodecBuffers(13776):   int32_t aac-drc-cut-level = 127
D/CCodecBuffers(13776):   int32_t aac-drc-effect-type = 3
D/CCodecBuffers(13776):   int32_t aac-drc-heavy-compression = 3
D/CCodecBuffers(13776):   int32_t aac-drc-output-loudness = -1
D/CCodecBuffers(13776):   int32_t aac-encoded-target-level = -1
D/CCodecBuffers(13776):   int32_t aac-max-output-channel_count = 8
D/CCodecBuffers(13776):   int32_t aac-target-ref-level = 64
D/CCodecBuffers(13776):   int32_t channel-count = 2
D/CCodecBuffers(13776):   string mime = "audio/raw"
D/CCodecBuffers(13776):   int32_t sample-rate = 44100
D/CCodecBuffers(13776): }
D/CCodecConfig(13776): c2 config diff is   c2::i32 coding.drc.compression-mode.value = 1
D/CCodecBuffers(13776): [c2.android.aac.decoder#941:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers(13776):   int32_t aac-drc-album-mode = 0
D/CCodecBuffers(13776):   int32_t aac-drc-boost-level = 127
D/CCodecBuffers(13776):   int32_t aac-drc-cut-level = 127
D/CCodecBuffers(13776):   int32_t aac-drc-effect-type = 3
D/CCodecBuffers(13776):   int32_t aac-drc-heavy-compression = 1
D/CCodecBuffers(13776):   int32_t aac-drc-output-loudness = -1
D/CCodecBuffers(13776):   int32_t aac-encoded-target-level = -1
D/CCodecBuffers(13776):   int32_t aac-max-output-channel_count = 8
D/CCodecBuffers(13776):   int32_t aac-target-ref-level = 64
D/CCodecBuffers(13776):   int32_t channel-count = 2
D/CCodecBuffers(13776):   string mime = "audio/raw"
D/CCodecBuffers(13776):   int32_t sample-rate = 44100
D/CCodecBuffers(13776): }
D/AudioTrack(13776): getTimestamp_l(226): device stall time corrected using current time 144288633947000

my idea of the soultions

1- video player can use same methods in MediaMetadataRetriever to get correct duration

2-being able to overrride the duration in videoplayercontroller to make the rest functions work

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: solvedIssue is closed as solved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions