Open Bug 2072655 Opened 2 months ago Updated 24 days ago

[HTML5 Video] Seeking backwards on Douyin pauses video but currentTime keeps increasing

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 156
defect

Tracking

()

ASSIGNED

People

(Reporter: lrisguan, Assigned: tle, NeedInfo)

Details

Attachments

(1 file, 1 obsolete file)

Attached video bug.mp4 —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:156.0) Gecko/20100101 Firefox/156.0

Steps to reproduce:

Play any video on Douyin's web version.

Perform a "rewind" (seek backward) operation once (e.g., press the left arrow key or drag the progress bar backward).

Observe the video and the progress timer.

Actual results:

The video frame jumps to the correct previous frame but then stops playing. However, the progress timer (currentTime) continues to increase as if the video is still playing.

Expected results:

The video should resume playback from the new position, or at least the progress timer should pause along with the video.

Additionally, on windows 10 (latest firefox) there's no problem.

(In reply to lrisguan from comment #1)

Additionally, on windows 10 (latest firefox) there's no problem.

Bugs appears on fedora44

I can reproduce this on Fedora 44 with Firefox 157 installed via Fedora's firefox package.

This issue has been bugging me for years. Some videos freeze on Fedora when seeking backwards, including restarting the video after playback finishes. I also see it with the youtube video mentioned in bug 1751322 comment 18. Bug 1751322 tracks packaging, so I'm using this bug to propose a code fix.

Fedora's libavcodec decodes H.264 through libopenh264, which is why it shows up here.

libavcodec's libopenh264 wrapper has no flush callback, so avcodec_flush_buffers in FFmpegDataDecoder::ProcessFlush does not reset it. The decoder stays in end-of-stream mode after a drain.

Reopening the codec context on flush for libopenh264 fixes it for me. I'll attach a patch.

libavcodec's libopenh264 wrapper has no flush callback, so frames held
for reordering survive avcodec_flush_buffers and the decoder stays in
end-of-stream mode after a drain.

Assignee: nobody → tle
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Related discussions from throughout the years. All reports are with stock Fedora codecs, the picture freezes with audio continuing, and fixed by installing a native H.264 decoder. (I've run into this with every new install for years)

https://discussion.fedoraproject.org/t/firefox-video-playback-issues-on-fedora-43-with-nvidia-rtx-4070-freezing-and-endless-buffering/181748
https://www.reddit.com/r/Fedora/comments/14992b8/firefox_video_playback_issues_frame_freezing_and/
https://support.mozilla.org/si/questions/1508246
https://bugzilla.redhat.com/show_bug.cgi?id=2325032

Also possibly related to bug 1975883

Related: bug 1978244

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

A recent update to ffmpeg fixes this. The Fedora project backported the fix to the ffmpeg package and it's in updated-testing I tested this package and it works. Should hit regular Fedora updates by 11/15. If you want it ealier:

sudo dnf upgrade --refresh --enablerepo=updates-testing --advisory=FEDORA-2026-ddf8b57870

Attachment #9654136 - Attachment is obsolete: true

(In reply to Tim Elliott from comment #10)

A recent update to ffmpeg fixes this. The Fedora project backported the fix to the ffmpeg package and it's in updated-testing I tested this package and it works. Should hit regular Fedora updates by 11/15. If you want it ealier:

sudo dnf upgrade --refresh --enablerepo=updates-testing --advisory=FEDORA-2026-ddf8b57870

Thanks for this!
Actually I executed the command below:

sudo dnf swap ffmpeg-free ffmpeg --allowerasing

And restart firefox, the problem was solved yet!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: