Revisión de Ver videos de YouTube a través de youtube-dl de Jue, 05/01/2025 - 18:19

La revisión le permite rastrear las diferencias que hay entre distintas versiones de una entrada.

Trisquel incluye Gnash predefinidamente, así que los videos de YouTube deberían poderse ver la mayoría de las veces. Sin embargo, ver videos en YouTube de esta manera requiere utilizar JavaScripts privativos y ActionScript. Esto también consume más recursos del sistema que descargar los videos y verlos con un reproductor de video, tales como VLC, Totem o SMPlayer.

Los videos de YouTube se pueden descargar a través de Trisquel usando youtube-dl. youtube-dl es free software y permite descargar videos no solo de YouTube sino de otros sitios de videos.

NOTA: youtube-dl puede ejecutar código de JavaScripts privativods. Una versión modificada de youtube-dl, AVideo, fue escrita para evitar esto.

Instalando youtube-dl

  • Terminal abierta
  • Utilice el siguiente comando para descargar el programa youtube-dl:

sudo aptitude install youtube-dl
  • Actualización a una versión más reciente:

sudo youtube-dl -U
Realice este paso cada vez que youtube-dl deje de funcionar debido a cambios en el sitio web de YouTube.

  • La primera vez que actualices youtube-dl usando este método, tendrás que ejecutarlo como root:

sudo youtube-dl
Ahora, puedes usar el comando youtube-dl para descargar videos de YouTube.

Primero, averigüe qué formatos están disponibles utilizando el siguiente comando y reemplazando la URL mostrada por la URL del video que desea descargar.

youtube-dl -F https://www.youtube.com/watch?v=8p9IU4zp7mU
El resultado se verá así:
[youtube] Confirming age
[youtube] 8p9IU4zp7mU: Downloading webpage
[youtube] 8p9IU4zp7mU: Downloading video info webpage
[youtube] 8p9IU4zp7mU: Extracting video information
[youtube] 8p9IU4zp7mU: Downloading DASH manifest
[info] Available formats for 8p9IU4zp7mU:
format code extension resolution  note 
139         m4a       audio only  DASH audio   48k , audio@ 48k (22050Hz), 788.95KiB (worst)
140         m4a       audio only  DASH audio  127k , audio@128k (44100Hz), 2.06MiB
141         m4a       audio only  DASH audio  255k , audio@256k (44100Hz), 4.13MiB
160         mp4       192x144     DASH video  112k , video only, 1.79MiB
133         mp4       320x240     DASH video  245k , video only, 3.94MiB
134         mp4       480x360     DASH video  309k , video only, 4.57MiB
135         mp4       640x480     DASH video  545k , video only, 8.59MiB
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     (best)
Unfortunately, the video may come in a patent-encumbered format, like MP4. To receive videos in a free format like WebM, you may use the following command:
 youtube-dl -f webm https://www.youtube.com/watch?v=8p9IU4zp7mU -o '%(title)s.%(ext)s'
The " -o '%(title)s.%(ext)s' " part tells youtube-dl to save the video using the video's original title. More saving options can be found by running "youtube-dl -h"):

youtube-dl will then start downloading the video. The output will look something like this:

[youtube] 8p9IU4zp7mU: Downloading webpage
[youtube] 8p9IU4zp7mU: Extracting video information
[youtube] 8p9IU4zp7mU: Downloading DASH manifest
[download] Destination: Richard Stallman - DRM.webm
[download] 100% of 3.88MiB in 00:16

Alternative way for installing/upgrading youtube-dl

There is another way to have youtube-dl installed, using the pip Python package manager/installer:
sudo aptitude install python-pip
sudo pip install youtube-dl
Upgrading is as simple as
sudo pip install -U youtube-dl

Revisiones

04/18/2018 - 03:35
alejandro_blue
05/01/2025 - 18:18
Carlos segura