this post was submitted on 22 Feb 2026
198 points (98.5% liked)

Linux

63197 readers
645 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

made it so i just click file and paste YouTube url

Linux is amazing

#! /usr/bin/bash
echo "Enter a url"
read a

yt-dlp -x $a
you are viewing a single comment's thread
view the rest of the comments
[–] cupcakezealot@piefed.blahaj.zone 3 points 19 hours ago (1 children)

this isn't perfect but i made one when i wanted to fetch a video for a specific resolution (because i prefer 480)

ytgrab() {  
  local id="$1"  
  local res="${2:-480}" # default to 480  
  local url="https://www.youtube.com/watch?v=%24id"  

  # fetch formats  
  local fmt  
  fmt=$(yt-dlp -F --cookies-from-browser vivaldi "$url")  

  # printing the format output  
  echo "$fmt"  

  # pick video format matching the requested resolution  
  local vfmt  
  vfmt=$(echo "$fmt" | awk -v r="${res}p" '$0 ~ r && /video/ {print $1}' | head -n1)  

  # pick best m4a audio  
  local afmt  
  afmt=$(echo "$fmt" | awk '/m4a/ && /audio/ {print $1}' | head -n1)  

  # safety check  
  if [ -z "$vfmt" ] || [ -z "$afmt" ]; then  
    echo "Could not find matching formats (video ${res}p or m4a audio)."  
    return 1  
  fi  

  echo fetching: yt-dlp -f ${vfmt}+${afmt} --cookies-from-browser vivaldi --write-subs --no-write-auto-subs --sub-lang "en.*" $url  
  yt-dlp -f "${vfmt}+${afmt}" --write-subs --cookies-from-browser vivaldi --no-write-auto-subs --sub-lang "en.*" "$url"  
}  
[–] ExperimentalGuy@programming.dev 1 points 15 hours ago (1 children)
[–] cupcakezealot@piefed.blahaj.zone 1 points 11 hours ago

usually i just like older videos but in this case i was saving a bunch of wcw vault videos to my jellyfin library and i prefer 480 since it was as close to tv as can be (also i've never been a fan of hd and tv after 2000 because i felt that's when it went downhill)