Saltar al contenido

cuaderno de campo

anotaciones

Menú
  • casa
    • dinou del carrer nou
  • cocina
    • pan
    • repostería
    • verdura
  • huerto
    • instrucciones sobre el huerto
    • plano del número 29
    • huerto del año 2025
  • humanidades
    • fonoteca
    • galería
  • juego
    • colección de roms
    • steamos en steam deck
    • lista de juego
    • dosbox
  • linux
    • bash
    • sistema operativo
    • ssh
  • web
    • apache
    • css
    • html5
    • javascript
    • mysql
    • php
Menú

yt-dlp

Publicada el 1 de mayo de 202410 de junio de 2025 por ernesto
  • instalación
  • actualización
  • cantata + yt-dlp
    • bash
  • extracción de audio
    • bash
  • problemario
    • unsupported version of python
      • alias permanente en bash
  • fuentes
Puesto al día el 10 de junio de 2025.

yt-dlp is a feature-rich command-line audio/video downloader with support for thousands of sites. The project is a fork of youtube-dl based on the now inactive youtube-dlc.

«README» en yt-dlp

instalación

vale con descargar la última versión del archivo binario dentro de la carpeta bin local y darle permiso de ejecución:

wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O ~/bin/yt-dlp

2024-05-01 19:24:38 (2,20 MB/s) - “/home/ernesto/bin/yt-dlp” guardado [2916945/2916945]

chmod 770 ~/bin/yt-dlp

actualización

yt-dlp -U

Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)

cantata + yt-dlp

con yt-dlp, se puede obtener una URL de flujo para cantata (u otros):

yt-dlp -g QuXwg1Ce_jg

esto devuelve (al menos) un par de enlaces. luego, sobre la lista de reproducción de cantata, se despliega el menú contextual (botón derecho del ratón) y se copia el enlace como URL de flujo:

cantata > lista de reproducción > botón derecho > Añadir URL de flujo

Cantata > Añadir flujo
Cantata > Añadir flujo

en lugar de copiar únicamente el identificador de video de youtube, también se le puede pasar la URL entera al comando:

yt-dlp -g https://www.youtube.com/watch?v=QuXwg1Ce_jg

bash

nano ~/bin/youtube

echo 'URL de YOUTUBE:'
read url
yt-dlp -g $url
paplay /usr/share/sounds/ubuntu/stereo/system-ready.ogg

chmod 770 ~/bin/youtube

extracción de audio

yt-dlp --help

-x, --extract-audio Convert video files to audio-only files (requires ffmpeg and ffprobe)
--audio-format FORMAT Format to convert the audio to when -x is used. (currently supported: best (default), aac, alac, flac, m4a, mp3, opus, vorbis, wav). You can specify multiple rules using similar syntax as --remux-video
--audio-quality QUALITY Specify ffmpeg audio quality to use when converting the audio with -x. Insert a value between 0 (best) and 10 (worst) for VBR or a specific bitrate like 128K (default 5)

«Post-Processing Options» en yt-dlp

yt-dlp QuXwg1Ce_jg -x --audio-format mp3 --audio-quality 192

[youtube] Extracting URL: QuXwg1Ce_jg
[...]
[download] Destination: Vía Lilo [QuXwg1Ce_jg].webm
[download] 100% of 790.36KiB in 00:00:00 at 1.14MiB/s
[ExtractAudio] Destination: Vía Lilo [QuXwg1Ce_jg].mp3
Deleting original file Vía Lilo [QuXwg1Ce_jg].webm (pass -k to keep)

bash

nano ~/bin/youtube

echo 'URL de YOUTUBE:'
read url
yt-dlp $url -x --audio-format mp3 --audio-quality 192
paplay /usr/share/sounds/ubuntu/stereo/system-ready.ogg

chmod 770 ~/bin/youtube

problemario

unsupported version of python

yt-dlp -U

ImportError: You are using an unsupported version of Python. Only Python versions 3.9 and above are supported by yt-dlp

sudo apt install python3.9

python3 --version

Python 3.8.10

python3.9 yt-dlp -U

yt-dlp is up to date (stable@2025.05.22 from yt-dlp/yt-dlp)

alias yt="python3.9 ~/bin/yt-dlp"

yt -U

yt-dlp is up to date (stable@2025.05.22 from yt-dlp/yt-dlp)

alias permanente en bash

Aliases in Bash allow you to create shortcuts for long or frequently used commands. This makes it easier to execute complex commands with a simple keyword.

«Bash alias» en W3Schools.

nano ~/.bashrc

alias yt="python3.9 ~/bin/yt-dlp"

source ~/.bashrc

yt -U

Updated yt-dlp to stable@2025.06.09 from yt-dlp/yt-dlp

fuentes

  • «yt-dlp» en yt-dlp.
Etiquetado como alias, cantata, mpd, python3.9, wget, youtube-dl, yt-dlp
  • bin: archivos ejecutables en home

    Puesto al día el 11 de junio de 2025. mkdir ~/bin nano ~/.bashrc ## HOME/bin…

  • mpd + youtube-dl

    Puesto al día el 6 de noviembre de 2019. instalación de youtube-dl vale con descargar…

RSS rutas fuera

  • CAMINANDO ENTRE MONSTRUOS 04 (Bestiario Sonoro): Drac de Na Coca 23 de octubre de 2025 Javier Resines
  • Karbach Brewery Rodeo Clown Double IPA (2025) 22 de octubre de 2025 Brett Stevens
  • Beats and yelling: Cultic 22 de octubre de 2025 Hate Meditations
  • Beats and yelling shorts, 20th October 25 20 de octubre de 2025 Hate Meditations
  • Karbach Brewery Hopadillo Imperial IPA (2025) 20 de octubre de 2025 Brett Stevens
  • Eureka Heights Final Boss Imperial IPA (2025) 20 de octubre de 2025 Brett Stevens
  • Tertulia con Juan Gomez, Pablo Vergel y Álvaro Martín: Spring-heeled Jack 19 de octubre de 2025 Javier Resines
  • Beats and yelling: Heruvim 17 de octubre de 2025 Hate Meditations
  • Please read the following scenario carefully 15 de octubre de 2025 Hate Meditations

Archivo

cuaderno de campo 2011-2025