it's not an option to even download an image, I have to screenshot, now what screen record videos?

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 weeks ago (8 children)

I use yt-dlp a lot, and at least on windows I have my own custom script that I use that just runs the raw exe with parameters that I set. Anytime it breaks I download the new exe and it works fine again. I used it this week actually. Maybe this sort of option will work for you.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 2 points 2 weeks ago (7 children)

    I'm on Linux Mint, and the installation manager called Apt has me on a version of yt-dlp from March. Maybe there are arguments that will force it to install more recent experimental builds or something? I just don't know what to look for. I'm more of a Windows refugee than someone who wants to make Linux my hobby, you know?

  • source
  • parent
  • hideshow 7 child comments
  • [–] 2 points 2 weeks ago

    For sure. Definitely the reason I haven't switched to Linux yet. I'm sure there's some way to force it to pick up the latest version, some Linux comrade will come in here at some point and tell us what that command is lol

  • source
  • parent
  • [–] 1 point 2 weeks ago (5 children)

    I use the python module instead for this reason, but I think this is what you have to do to update yt-dlp when it's installed from apt:

    sudo yt-dlp -U

  • source
  • parent
  • hideshow 5 child comments
  • [–] 2 points 2 weeks ago (4 children)

    I think that only applies if you've compiled it from source? System insists that since it is installed with apt, it must be updated with an apt command. But apt can't seem to understand that there are stable versions later than March, and I don't know how to teach it.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 2 weeks ago (3 children)

    I'm not sure what the best solution will be for you. I think you can enable a 3rd-party repository that contains the most up-to-date version of yt-dlp.

    It's been discussed in the Mint forums, but they block my VPN from accessing the site :)

    https://forums.linuxmint.com/viewtopic.php?t=450307

    https://forums.linuxmint.com/viewtopic.php?t=440928

    If you are curious, this is how I use yt-dlp. Effort-post incoming, beware, and bare with me. It might seem complicated but I tried my best to simplify.


    When I run echo $PATH on my system, I see this:

    username@somepc:~$ echo $PATH
    /var/home/username/.local/bin:/var/home/username/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin
    

    Your PATH might look more like /home/username/.local/bin.

    * If it does not include a /.local/bin, maybe send me your $PATH and I can recommend a substitution instead.

    What this means, is that any EXECUTABLE inside these directories will be executed if typed from the command line.


    So in order, you do this (yes, literally, $HOME, the terminal will convert that to your home directory):

    • python3 -m venv "$HOME/.local/yt-dlp-venv" (create a virtual space for python3 outside of apt)
    • source $HOME/.local/yt-dlp-venv/bin/activate (toggle the virtual space for python3 for the duration of the current terminal window)
    • python3 -m pip install yt-dlp (install yt-dlp module inside the virtual space)

     

    nano $HOME/.local/bin/yt-dlp, paste this inside:

    #!/usr/bin/env bash
    
    source $HOME/.local/yt-dlp-venv/bin/activate
    pip install --upgrade yt-dlp
    yt-dlp "$@"
    

    You can use CTRL+O and CTRL+X to save and then quit.

    • chmod +x $HOME/.local/bin/yt-dlp (give yourself permission to eXecute the command)

     

    Now any time you run yt-dlp from the terminal, it will search all of those directories inside $PATH until it finds yt-dlp. It will find your custom script, and correctly run the python venv's version of yt-dlp with any of the arguments you supplied.


    If you noticed and are curious, yt-dlp inside of $HOME/.local/bin/yt-dlp doesn't cause an infinite loop of it calling itself over and over again. Why? Because when you do source $HOME/.local/yt-dlp-venv/bin/activate, it changes your $PATH!

    (yt-dlp-venv) username@somepc:~$ echo $PATH
    /var/home/username/.local/yt-dlp-venv/bin:/var/home/username/.local/bin:/var/home/username/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin
    

    Because the real yt-dlp exists inside $HOME/.local/yt-dlp-venv/bin, it finds the executable first instead of the one inside $HOME/.local/bin

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 2 weeks ago (2 children)

    Thank you, I found this way before I saw your reply, although I have to sudo to run this installation of yt-dlp, which seems not ideal from a security perspective:

    wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O ~/Downloads/yt-dlp
    chmod a+rx ~/Downloads/yt-dlp
    sudo mv -v ~/Downloads/yt-dlp /usr/local/bin sudo yt-dlp --update
    yt-dlp --version

    Since you went to the effort and I do want to understand my system better, I will study your explanation closely even though my video downloading woes are solved.

  • source
  • parent
  • hideshow 2 child comments