This is killing me. Videos that are gigabytes in size instead of a couple hundred mb. I don’t have the storage space for this. I don’t have the bandwidth for this. More and more content creators are using 4k video instead of 1080p. Is there an easy way to make it only download videos in 1080p? I’ve found a few commands around the internet that don’t work, presumably they work on some videos sometimes but that’s just not good enough.

I download videos from a custom made web interface connected to yt-dlp so if it’s no longer going to be possible to automate the process of video and playlist downloading then everything is going to become a huge pain in the ass.

alphacyberranger
link
fedilink
English
54M

Recently youtube changed a few things and everything was breaking for me NewPipe, Freetube, yt-dlp. NewPipe and Freetube immediately released updates. Yt-dlp also got updated but this time there is a change. Earlier you can simply download 1080p videos in one go. Now I have to download 1080 video and corresponding audio separately and use a FFMEG command to merge them. Though it’s a pain, I’m still thankful that yt-dlp works.

Davel23
link
fedilink
34M

Do you have the FFMPEG executable in the same directory as yt-dlp? They should merge automatically if so.

alphacyberranger
link
fedilink
English
24M

Yes. But me being an idiot, didn’t know it was possible to add up formats like 136+140 in yt-dlp until I saw few of the comments in this thread. I was downloading everything separately for the past 3 weeks.

@xavier666@lemm.ee
link
fedilink
English
-24M

I didn’t want to do this but RTFM!

Pax
link
fedilink
English
114M

This has been working for me for ages:

-f "bestvideo[height<=1080][dynamic_range=SDR]

@solrize@lemmy.world
link
fedilink
English
154M

Use yt-dlp -F to list the available formats, and pick the one you want. See the “Video Format Options” section of the man page.

@PenisDuckCuck9001@lemmynsfw.com
creator
link
fedilink
English
4
edit-2
4M

Guess I’ll have to find a way to get my script to automate that somehow. My goal is to get it back to where the only thing I have to do to download a video is paste the url in a lan webpage on my local server.

Check the most upvoted answer and then look into tubearchivist which can take your yt-dpl parameters and URLs to download the videos plus process them to have a better index of them.

You can specify multiple formats and it will download the first one that’s available.

@solrize@lemmy.world
link
fedilink
English
34M

I don’t remember the format codes but they are generally pretty stable across a given host like youtube. The trouble is that not every video has all of the formats. You might have to just find the nearest one and convert with ffmpeg.

aedelred
link
fedilink
English
94M

To elaborate a little on this, if the format you want doesn’t have audio you may have to combine two formats. -F lists the formats, -f to choose them. As an example you can choose to combine an audio and video format like this: yt-dlp -f 136+140 [URL]

moshe
link
fedilink
-234M

Use a web site or a smart phone app to download.
If a video is prohibited to download, another possibility is via Chrome and a specific plug-in 🤪😎

Dr. Wesker
link
fedilink
English
154M

Most of those sites and apps are ad and malware ridden cancer.

downpunxx
link
fedilink
-44M

I don’t know about that but I sure do love your Israeli flag, man. Am YIsrael Chai!

KingJalopy
link
fedilink
English
-24M

Newpipe

@Azzu@lemm.ee
link
fedilink
English
42
edit-2
4M

-f "[height=1080]"

rand_alpha19
link
fedilink
23
edit-2
4M

Could also do yt-dlp -S "res:1080" - it works with vertical videos too (will scale using the smallest dimension).

@hedgehog@ttrpg.network
link
fedilink
English
64M

I use --format-sort +res:1080, which, if my understanding of the documentation is correct, will make it prefer 1080p, the smallest video larger than 1080p if 1080p isn’t available, or the largest video if nothing 1080p or larger is available.

res is the smallest dimension of the video (so for a 1080x1920 portrait video, it would be 1080).

Default sort is descending order. The + makes it sort in ascending order instead.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 246 users / day
  • 642 users / week
  • 1.41K users / month
  • 3.93K users / 6 months
  • 1 subscriber
  • 3.78K Posts
  • 76.7K Comments
  • Modlog