this post was submitted on 31 Jul 2024
39 points (89.8% liked)

Selfhosted

40415 readers
316 users here now

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!

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] solrize 15 points 4 months ago (2 children)

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.

[–] aedelred 9 points 4 months ago

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]

[–] [email protected] 4 points 4 months ago* (last edited 4 months ago) (3 children)

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.

[–] [email protected] 5 points 4 months ago

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

[–] solrize 3 points 4 months ago

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.

[–] [email protected] 3 points 4 months ago

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.