question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Memory usage is very large for some videos

See original GitHub issue

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2022.04.08 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Description

Memory usage spikes when downloading certain videos. For example:

yt-dlp 'https://www.youtube.com/watch?v=mivcDoTjpQE' --output -  >/dev/null

See the video here: https://www.youtube.com/watch?v=mivcDoTjpQE

Memory usage spikes up to 570MB. This can cause out of memory errors on embedded computers like raspberry pi.

% grep ^VmPeak /proc/1945/status
VmPeak:	  584292 kB

Possible related to https://github.com/yt-dlp/yt-dlp/issues/2512

Verbose log

% yt-dlp 'https://www.youtube.com/watch?v=mivcDoTjpQE' --output -  -vU >/dev/null
[debug] Command-line config: ['https://www.youtube.com/watch?v=mivcDoTjpQE', '--output', '-', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Python version 3.9.2 (CPython 32bit) - Linux-5.15.32-v7+-armv7l-with-glibc2.31
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.3.3-0, ffprobe 4.3.3-0
[debug] Optional libraries: brotli, certifi, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.04.08, Current version: 2022.04.08
yt-dlp is up to date (2022.04.08)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=mivcDoTjpQE
[youtube] mivcDoTjpQE: Downloading webpage
[youtube] mivcDoTjpQE: Downloading android player API JSON
[youtube] mivcDoTjpQE: Downloading MPD manifest
[youtube] mivcDoTjpQE: Downloading MPD manifest
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] mivcDoTjpQE: Downloading 1 format(s): 18
[debug] Invoking downloader on "https://rr4---sn-j5caxoxu-pn2d.googlevideo.com/videoplayback?expire=1649675156&ei=NLdTYq3ELoKFgwO7wayYAw&ip=69.112.107.63&id=o-AHc1dUd-gwVFXzXkEJuUTSlHD0wAIHJlVifZcBWrSaNs&itag=18&source=youtube&requiressl=yes&mh=QP&mm=31%2C26&mn=sn-j5caxoxu-pn2d%2Csn-p5qddn7d&ms=au%2Conr&mv=m&mvi=4&pl=21&initcwndbps=1657500&vprv=1&mime=video%2Fmp4&gir=yes&clen=10130610015&ratebypass=yes&dur=720000.383&lmt=1596607579855703&mt=1649653251&fvip=5&fexp=24001373%2C24007246&c=ANDROID&txp=6216222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJbYUNcDmLFvkl_PCci-A_Z53F9100gJ3RVtfmm2u5taAiB1IYet8SM9FXiMRSMrEYEYdyvaIxEwoUOsbxklRpUYMQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgTOoOzUVl1xiRl0i2I-Je5t0rm7rz1hMlKRKLeeKGadoCIQDpdoqdzXVUWT2IIgmg1EQhzpW78pb5QirOb8KXlxUw0g%3D%3D"
[debug] File locking is not supported on this platform. Proceeding without locking
[download] Destination: -
[download]   3.4% of 9.43GiB at 12.32MiB/s ETA 12:37

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Jun 27, 2022

As far as I can tell, #1949, #1399, and this are all completely separate issues (#1399 being most problematic of them)

I will delete my comment if it didn’t really related, sorry if i bother you

No worries. I don’t mean to admonish you for the comment. Was just asking why you thought they are related

0reactions
HobbyistDevcommented, Jun 27, 2022

I think that related as memory leak cause memory usage bigger. I will delete my comment if it didn’t really related, sorry if i bother you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix High RAM Memory Usage Issue on Windows 11/10 [10 ...
High Memory Usage is a state where Windows computers' RAM, ROM, or Cache usage grows to an extremely high level. Windows 10 high...
Read more >
Windows 10 High Memory Usage [Causes and Solutions]
These methods can solve most common Windows 10 high memory usage problems. ... Some programs run automatically when the computer starts up.
Read more >
RAM usage is too high when watching videos : r/vivaldibrowser
The problem is that it stays that high even when I stop the video (and close the tab). Is it normal? Like some...
Read more >
Troubleshooting High RAM Usage in Qlik Sense
Video embedded here. Use Insert Video button in the menu bar] Transcript Thanks for joining today's enablement session and today's topic is ...
Read more >
Strategies for Efficient Use of Memory - MATLAB & Simulink
This topic explains several techniques to use memory efficiently in MATLAB ®. ... If your program generates very large amounts of data, consider...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found