Ver videos de YouTube a través de youtube-dl
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.
Installing youtube-dl
- Open Terminal
- Use the following command to download the youtube-dl program:
sudo aptitude install youtube-dl
- Update to a more recent version:
sudo youtube-dl -U
Do this step whenever youtube-dl stops working due to changes in the YouTube website.
- The first time you update youtube-dl using this method, you will need to run it as root:
sudo youtube-dl
Now, you can use the youtube-dl command to download YouTube videos. First, find out which formats are available by using the following command and replacing the shown URL with the URL of the video you wish to download.
youtube-dl -F https://www.youtube.com/watch?v=8p9IU4zp7mUThe output will look like this:
[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-dlUpgrading is as simple as
sudo pip install -U youtube-dl