Brave Browser sudden increase of memory usage when viewing last second of video from

Description of the issue:
Brave will give unusually high ram usage when visiting
How can this issue be reproduced?

1.Open Brave
2.Go to
3.Wait until the gas popped up in video

Expected result:
normal ram usage without spike and the video stops cleanly

Actual result
Brave browser uses almost 4GB of ram when viewing it for grouped brave browser process in task manager not including 5 background instances of brave browser and makes the usage of ram jumps from 34% to 89% in 8 GB of ram hardware
Brave Version( check About Brave):
Version 1.23.71 Chromium: 90.0.4430.72 (Official Build) (64-bit)
Every time
Additional Information:
Windows 10 64-bit 19041.867
Also reproducible every time in Google Chrome Version 89.0.4389.128 (Official Build) (64-bit), in google chrome version Version 90.0.4430.72 (Official Build) (64-bit), and in Chromium: 90.0.4430.72 (Official Build) (64-bit)

Hmm yeah I can see more cpu usage on my laptop, I could also replicate it Chrome (release), can you confirm? @sanjaya

I can confirm it. For additional information it also affect the linux version not only the windows one. My linux specification is Linux Mint 20.1 64 bit Desktop: Cinnamon Base: Ubuntu. If the video are downloaded and played in VMC it doesn’t affect the memory and cpu usage and if it opened in films and video app from windows it just won’t load at all. From other browser that i observe is that it can’t be loaded in both firefox and safari due to file is corrupt. Should i also report this problem to google chrome since it also affect chrome. @fanboynz

I’ll need to debug it more, I’ll update this thread.

Firefox is reporting this mp4 as corrupt, and won’t even play it.

How about this video, does it perfom okay? @sanjaya

I’m suspecting the cpu usage and corrupt file is the issue

That video is fine. And i have some additional information i tested again in 4 GB virtual machine windows 64 bit instead of giving high ram it just gives error code out of memory at the same times of memory usage for 8 GB ram machine jumps to very high levels. @fanboynz
I found this problem when trying to open that link in brave since that same links makes my discord app crashes and gives sudden memory spike to see what would happen when i opened it not in discord but in browser then i found out that mp4 is also making google chrome, brave, and chromium use very high memory usage but not in firefox since it just won’t load the files anyway.
From another test that i do when opening it in already high memory usage it gives error code:9 in brave used in linux

I will report it to gfycat that mp4 is breaking their TOS tomorrow so it’s possible that the link will no longer be available after the staff review my report. but i already saved the files / mp4 so if needed i can upload the file in here

1 Like

Thanks for confirming the corrupt file. Have closed the report.

After further discussion with other people and analyzing the video with people that has more knowledge in video displaying it says that it caused by change of bitrate and ability for the video player to transcode it instead of a corrupt file which what i and you think. @fanboynz

Hard to say since the file was removed. Running the file through ffmpeg would’ve been my next test

ffmpeg -v error -i TartAdolescentBird-mobile.mp4 -f null - 2>error.log
ffmpeg.exe -v error -i TartAdolescentBird-mobile.mp4 -f null - >error.log 2>&1

I Still had a copy of the file, Errors ffmpeg.exe -v error -i TartAdolescentBird-mobile.mp4 -f null - >error.log 2>&1

[null @ 000002c59cad4bc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 105 >= 103
    Last message repeated 10 times

And more verbose with -v info:

Output #0, null, to 'pipe:':
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.78.100
  Stream #0:0(und): Video: wrapped_avframe, yuv444p(progressive), 420x420, q=2-31, 200 kb/s, 35.43 fps, 35.43 tbn (default)
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.136.101 wrapped_avframe
frame=    1 fps=0.0 q=-0.0 size=N/A time=00:00:00.02 bitrate=N/A speed=5.14x    
frame=   97 fps=0.0 q=-0.0 size=N/A time=00:00:02.73 bitrate=N/A speed=5.13x    
frame=  102 fps= 97 q=-0.0 size=N/A time=00:00:02.87 bitrate=N/A speed=2.75x    
[null @ 000001a799e34bc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 105 >= 103
    Last message repeated 8 times
frame=  115 fps= 74 q=-0.0 size=N/A time=00:00:02.99 bitrate=N/A speed=1.93x    
[null @ 000001a799e34bc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 105 >= 103
    Last message repeated 1 times
frame=  117 fps= 69 q=-0.0 Lsize=N/A time=00:00:02.99 bitrate=N/A speed=1.76x    
video:61kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

The bitrate change for the entire file from min 222kbps to 9727kbps
From other people that i contacted they says that the sudden change of bitrate makes video player ability to transcode is hampered. I also noticed that duration on metadata is 02:99 but the total time is 3:302 @fanboynz

error2.txt (5.2 KB) My ffmeg result

Given its a read edge case and an error on the sites/media. We can probably leave this for now. If it occurred on every media upload on the gfycat site, then we could investigate it further (whether it’s a Chrome and/or Brave issue)

Firefox was probably right, it was a corrupt media, just Chromium-based browsers chose to attempt to play it instead of displaying the same FF error. I guess the threshold to attempt to playback media regardless how error prune it is a Chromium feature.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.