User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Chromium youtube videos bad performance on rpi3B+

Sat Apr 06, 2019 1:25 pm

Chromium youtube videos bad performance on rpi3B+

This kernel works fine to me...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.25-v7+ #1205 SMP Mon Feb 25 18:19:20 GMT 2019 armv7l GNU/Linux OK

but after dist-upgrade to...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.27-v7+ #1206 SMP Wed Mar 6 14:40:18 GMT 2019 armv7l GNU/Linux

Bad Chromium 1080p audio/video.

After above dist-upgrade youtube 1080p performance is very bad compared to before upgrade.

I tested youtube 1080p performance with this video at fullscreen...The problem is more noticeable at fullscreen.

https://youtu.be/HiZXABMNCUY

Please wait 30 seconds to cache video stabilized at fullscreen and you can hear audio is fluctuating radomly each 5,10,12,20 seconds for example and the dropped frames is very high compared to before dist-upgrade.This not happens before dist-upgrade.

I am using official PSU and good A1-SD cards, good temperatures no more than 65C , is not hardware related problem.

I have the old raspbian image Linux raspberrypi 4.19.25-v7+ #1205 SMP Mon Feb 25 18:19:20 GMT 2019 armv7l GNU/Linux on other SD card and works fine to me, the performance is much better, near perfect smooth audio/video after 30 seconds video stabilized at fullscreen and very few dropped frames.The only change on raspbian is the dist-upgrade.

Audio is HDMI.

Any idea?

The problem is present on clean raspbian latest image full upgraded but not rpi-update used.

[email protected]:~ $ uname -a
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

After a rpi-update to...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.32-v7+ #1210 SMP Tue Apr 2 14:07:04 BST 2019 armv7l GNU/Linux

The problem is still present.

fruitoftheloom
Posts: 20201
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Chromium youtube videos bad performance on rpi3B+

Sat Apr 06, 2019 1:33 pm

RPIgoodSBC wrote:
Sat Apr 06, 2019 1:25 pm
Chromium youtube videos bad performance on rpi3B+

This kernel works fine to me...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.25-v7+ #1205 SMP Mon Feb 25 18:19:20 GMT 2019 armv7l GNU/Linux OK

but after dist-upgrade to...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.27-v7+ #1206 SMP Wed Mar 6 14:40:18 GMT 2019 armv7l GNU/Linux

Bad Chromium 1080p audio/video.

After above dist-upgrade youtube 1080p performance is very bad compared to before upgrade.

I tested youtube 1080p performance with this video at fullscreen...The problem is more noticeable at fullscreen.

https://youtu.be/HiZXABMNCUY

Please wait 30 seconds to cache video stabilized at fullscreen and you can hear audio is fluctuating radomly each 5,10,12,20 seconds for example and the dropped frames is very high compared to before dist-upgrade.This not happens before dist-upgrade.

I am using official PSU and good A1-SD cards, good temperatures no more than 65C , is not hardware related problem.

I have the old raspbian image Linux raspberrypi 4.19.25-v7+ #1205 SMP Mon Feb 25 18:19:20 GMT 2019 armv7l GNU/Linux on other SD card and works fine to me, the performance is much better, near perfect smooth audio/video after 30 seconds video stabilized at fullscreen and very few dropped frames.The only change on raspbian is the dist-upgrade.

Audio is HDMI.

Any idea?

The problem is present on clean raspbian latest image full upgraded but not rpi-update used.

[email protected]:~ $ uname -a
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

After a rpi-update to...

[email protected]:~ $ uname -a
Linux raspberrypi 4.19.32-v7+ #1210 SMP Tue Apr 2 14:07:04 BST 2019 armv7l GNU/Linux

The problem is still present.

rpi-update installs testing kernel / firmware.


Raspbian Stretch update I use:

Code: Select all

sudo apt update
sudo apt full-upgrade
Personally have found no difference on a vanilla install of Raspbian Stretch Nov '18 and a fully updated to April '19....
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Sat Apr 06, 2019 1:38 pm

> fruitoftheloom

Thanks for reply.

Can you test the below video at fullscreen 1080p on chromium and tell if it is working fine fluid or with dropped audio video?

https://youtu.be/HiZXABMNCUY

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Tue Apr 09, 2019 8:35 pm

Today I have tested my raspbian image with kernel 4.19.25-v7+ that have Chromium browser version 65.0.3325.181 on Raspbian 9.8 and I have hold the chromium version with this commands...

Code: Select all

sudo apt-mark hold chromium-browser

Code: Select all

sudo apt-mark hold rpi-chromium-mods
...and after dist-upgrade the fullscreen 1080p on youtube video https://youtu.be/HiZXABMNCUY is near perfect after 30 seconds to the end of video.
Then I have done an rpi-update to Linux raspberrypi 4.19.34-v7+ #1211 SMP Mon Apr 8 22:56:37 BST 2019 armv7l GNU/Linux and reboot and after testing the 1080p on youtube fullscreen is near perfect too.
Then the magic is on chromium version and/or chromium mods.
If a developer reads this post please take note on this.

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 10:22 am

The latest Raspbian Stretch with desktop Image April 2019 Release date:2019-04-08 Kernel version:4.14, have a very bad performance on youtube.

Chromium version is 72 versus Chromium 65 in my old raspbian image that is working very good.

Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux not OK youtube performance.

I have tested on fresh install and the youtube performance is the worst I have tested.

In fact if in chrome://flags is enabled Override software rendering list the performance is worst than not activated and is the first time I see this.
In chrome://gpu chromium 72 is not hardware accelerated and when activate hardware accelerated the performance is very bad.

Hardware accelerated is not working in chromium 72.

Any ideas?

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 11:50 am

Now I have done

Code: Select all

sudo apt full-upgrade
from kernel 4.19.25-v7+ with chromium 65 retained to kernel 4.14.98-v7+ (latest official kernel April 2019 raspbian) and youtube 1080p fullscreen is working fine, not perfect but very good performance.

The good youtube fullscreen 1080p performance is on chromium 65.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5790
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 12:16 pm

Are you using the legacy, fkms or kms drivers?

If you're not sure, can you post your config.txt?

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 12:18 pm

Now I have done an rpi-update to latest kernel testing 4.19.34-v7+ with chromium 65 retained and the performance youtube 1080p fullscreen is near perfect.A little better than official kernel 4.14.98-v7+ raspbian april 2019.

How test it?

I am using this video https://youtu.be/HiZXABMNCUY to see any little variation in performance youtube 1080p fullscreen.

In adress bar type chrome://flags and enable Override software rendering list , relaunch chromium.
In adress bar type chrome://gpu and you see hardware acceleration enabled.
Now...

1) Uncheck autoplay and anotations on youtube , right click on video.
2) Fullscreen and wait 30 seconds to video cache becomes stable.
3) to the end of video right click and choose statistics to nerds to see the dropped frames.

In this test case the dropped frames are about 200.Audio and video are smooth without noticeable dropped audio/video.

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 12:21 pm

ShiftPlusOne wrote:
Thu Apr 11, 2019 12:16 pm
Are you using the legacy, fkms or kms drivers?

If you're not sure, can you post your config.txt?
Legacy drivers.
Default drivers on Raspbian.

Here my /boot/config.txt...

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# tweak performance

gpu_mem=192
arm_freq=1400
sdram_freq=550
gpu_freq=450
temp_soft_limit=75

# licenses
decode_MPG2=XXX
decode_WVC1=XXX
start_x=1

###

Without tweak performance section on /boot/config.txt and without licenses code the performance on youtube 1080p fullscreen is the same.

Edited:
I have wrong on above comment.
Yes, the tweaks performance an at least 192 mb ram gpu have a little impact on youtube 1080p performance.The youtube video is encoded AVC1 but the real performance problem is on chromium version 72 (not ok 1080p fullscreen) vs chromium 65 ok 1080p fullscreen youtube.
Last edited by RPIgoodSBC on Thu Apr 11, 2019 3:48 pm, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5790
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium youtube videos bad performance on rpi3B+

Thu Apr 11, 2019 12:39 pm

Thanks for the detailed report. I've passed it on.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5790
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium youtube videos bad performance on rpi3B+

Fri Apr 12, 2019 10:08 am

It's looking more and more like change in upstream chromium rather than anything related to the mmal patches. We'll keep looking into it, but it's not looking promising.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5790
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium youtube videos bad performance on rpi3B+

Fri Apr 12, 2019 10:51 am

Another update: The old version may have used memcpys whereas the new version uses DMA. Although DMA copies reduced the CPU usage, they seem to be a little slower. Going back to memcpy seems to improve video playback and the expense of higher CPU usage, which may not be a good trade-off on armv6 pis. We may add a flag to choose between the two and leave it up to the user.

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Fri Apr 12, 2019 12:26 pm

ShiftPlusOne wrote:
Fri Apr 12, 2019 10:08 am
It's looking more and more like change in upstream chromium rather than anything related to the mmal patches. We'll keep looking into it, but it's not looking promising.
Perhaps it would be possible to give the possibility of installing from the Raspbian repository the version of chromium 65 for those who prefer the performance bonus in full-screen 1080p YouTube instead of the latest version of chromium with lower performance in full-screen 1080p YouTube.

User avatar
RPIgoodSBC
Posts: 113
Joined: Tue Mar 20, 2018 11:37 am

Re: Chromium youtube videos bad performance on rpi3B+

Fri Apr 12, 2019 12:26 pm

ShiftPlusOne wrote:
Fri Apr 12, 2019 10:51 am
Another update: The old version may have used memcpys whereas the new version uses DMA. Although DMA copies reduced the CPU usage, they seem to be a little slower. Going back to memcpy seems to improve video playback and the expense of higher CPU usage, which may not be a good trade-off on armv6 pis. We may add a flag to choose between the two and leave it up to the user.
The flag option is a good idea.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5790
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium youtube videos bad performance on rpi3B+

Fri Apr 12, 2019 12:39 pm

I had to get rid of 65 in the repo archive because the server was out of space, it's back there now, but a bit of a pain to install:
http://archive.raspberrypi.org/debian/p ... m-browser/

thanhth
Posts: 1
Joined: Mon Apr 29, 2019 12:38 pm

Re: Chromium youtube videos bad performance on rpi3B+

Mon Apr 29, 2019 1:04 pm

Recently I've run 'apt-get dist-upgrade' and got same problem as RPIgoodSBC.
I did some research and bump to this topic. Turn out it is Chromium problem, not the OS. I've found a mirrored repository which still hold Chromium 65 http://dev.kano.me/mirrors/raspberrypi-stretch/. So I've purged the Chromium 72 and install the 65 by apt-get, along with the ffmpeg codec package. I can confirm that Chromium 65 can play 1080p Youtube video fullscreen smoothly, while the 72 cannot. I guess I will stick with Chromium 65 for a while.

Sez
Posts: 1
Joined: Wed Aug 07, 2019 1:46 am

Re: Chromium youtube videos bad performance on rpi3B+

Wed Aug 07, 2019 2:07 am

Everything the TO and my former Poster have written about the newer chromium/ffmpeg-extra and video stream stuttering can also be confirmed by my experience.
I am also sticking to the previous 65.x version. As this seems to be a quick solution to getting rid of annoying freezes/dropouts while watching video streams.

palimmo
Posts: 16
Joined: Wed Jul 24, 2019 10:38 am

Re: Chromium youtube videos bad performance on rpi3B+

Wed Aug 07, 2019 2:26 pm

Hello,

have you ever tried 1080p video streaming with Firefox?
How it is?

Return to “General discussion”