1080p video playback in Chromium freezes

768 views
Skip to first unread message

Zoltan Komaromi

unread,
May 21, 2024, 1:28:35 PM5/21/24
to media-dev

Dear All,

We are facing with an issue regarding 1080p video playback in Chromium.
We are using Yocto Mickledore (earlier Kirkstone) on i.MX 8M Mini Processor with fsl-image-gui-chromium image.
We have a 1200x1920 MIPI display in portrait orientation, which is successfully installed on our custom board.
We can play videos in Gstreamer without any issue, but in Chromium the video playback is lagging and after a while it freezes. Audio track playback during the video also doesn't play smoothly.
Video decoder is HW accelerated based on the chromium flags, so it should be not the root cause.
After checking the media-internals section in the Chromium, I can see error messages, such as DECODER_UNDERFLOW.
Processor load during the playback is about 50-60%, and I cannot see any RAM bottleneck.
Bad quality of internet connection should be also not a problem, I checked it for many times.

Is this issue known for you?
Have you any suggestion, how could it be fixed?

Thanks!

BR, Zoltan

Dale Curtis

unread,
May 21, 2024, 1:30:21 PM5/21/24
to Zoltan Komaromi, media-dev
I'd guess hardware decode isn't actually enabled. You should see something like VaapiVideoDecoder or V4L2VideoDecoder selected in media-internals if it was working properly. Why it's not working is beyond me though since we only provide limited support for hardware decoding on Linux in official Chrome.

- dale

--
You received this message because you are subscribed to the Google Groups "media-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to media-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/media-dev/910a0162-97cf-49d9-9b4c-5a5106337a16n%40chromium.org.

Dale Curtis

unread,
May 21, 2024, 3:01:18 PM5/21/24
to Zoltan Komaromi, media-dev
(from the right address this time)

That should mean it's working actually then. You might try collecting a trace from chrome://tracing to see if it shows hot spots in the media, gpu, cc, audio, video categories.

- dale

On Tue, May 21, 2024 at 10:35 AM Zoltan Komaromi <zoltan.k...@gmail.com> wrote:
Thanks for the fast feedback!
I see “VDAVideoDecoder” for video decoding.
Should it meen, that it is not properly installed?

Thanks,
Zoltan

Dale Curtis

unread,
May 23, 2024, 6:08:19 PM5/23/24
to Zoltan Komaromi, media-dev, Ted (Chromium) Meyer, andr...@chromium.org
Trace shows V4L2 decode thread taking over 30ms per decode sometimes. That's here:

GPU main thread is also saturated doing something in Wayland:

Sorry, I don't know much about these areas, so I can't recommend any improvements. cc:andrescj, tmathmeyer in case they see anything.

- dale

On Tue, May 21, 2024 at 11:55 PM Zoltan Komaromi <zoltan.k...@gmail.com> wrote:
Hi Dale,

I've recorded a trace file as you suggested.
Many thanks for your help!

BR, Zoltan

Zoltan Komaromi

unread,
May 24, 2024, 1:15:47 PM5/24/24
to Dale Curtis, media-dev
Hi Dale,

I've recorded a trace file as you suggested.
Many thanks for your help!

BR, Zoltan

On Tue, May 21, 2024 at 9:01 PM Dale Curtis <dalec...@chromium.org> wrote:
trace_1080p-video-freezes.json.gz

Zoltan Komaromi

unread,
May 24, 2024, 1:15:52 PM5/24/24
to Dale Curtis, media-dev
Thanks for the fast feedback!
I see “VDAVideoDecoder” for video decoding.
Should it meen, that it is not properly installed?

Thanks,
Zoltan
On Tue, 21 May 2024 at 19:30, Dale Curtis <dalec...@chromium.org> wrote:

Zoltan Komaromi

unread,
May 24, 2024, 1:15:59 PM5/24/24
to media-dev, dalec...@chromium.org, media-dev, tmath...@chromium.org, andr...@chromium.org, Zoltan Komaromi
Hello Together,

I made some new investigations about the behaviour of the video playback.
I think, it will be a buffering problem, not a video decoder issue.

I'm testing with a 2-3 Min long 1920x1200@60fps .mp4 video, repeatedly.
The lagging and freezing can be seen ONLY after the first start, and it freezes always approx. at the same point in the video.
Before it freezes and stops, the playback is lagging, does not run smoothly.

When it stops, I push the Pause button, wait for 10-20 sec, and then push the Play.
After that, the playback runs without any issue, independent from how many times the video starts from the beginning.
(Very rarely, the freezing happens again, but randomly. At the first start, it is always reproduceable.)
I tried it also, what happens, if I pause the video immediately after the first start.
After 10-20 sec (a few seconds are not enough), I can continue the playback, and it will not freeze, and it runs smoothly, as expected.

Is there a possibility to increase the relevant buffer size?
Is it possible, to set somehow, that the playback should only start, if the buffer fill level is above a limit?
Is it possible to set, that the video playback continues automatically, after it freezes, and the buffer level is optimal again?

Many thanks for the support!

BR, Zoltan

Andres Calderon Jaramillo

unread,
May 24, 2024, 1:16:07 PM5/24/24
to media-dev, Dale Curtis, media-dev, Ted (Chromium) Meyer, Andres Calderon Jaramillo, zoltan.k...@gmail.com
Hi there! I didn't find a link to the chrome://tracing trace.

To unsubscribe from this group and stop receiving emails from it, send an email to media-dev+unsubscribe@chromium.org.

Zoltan Komaromi

unread,
May 24, 2024, 1:16:11 PM5/24/24
to media-dev, andr...@chromium.org, dalec...@chromium.org, tmath...@chromium.org
Hi All,

After all, I’ve found the solution.
That was a buffering problem, and the command line switch —double-buffer-compositing solved the issue.
Thank you very much for your support!

BR, Zoltan
Reply all
Reply to author
Forward
0 new messages