Why youtube-dl does not work or download video?

I don’t think you need this for this question, but I’ll added here. The Title says it all. Youtube-dl does not work. Any reason why. IDK how to tackle this problem. Thank you for your answer.

System:
  Kernel: 5.15.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=fb3b8569-3b15-4c53-ab66-d3dd1f3cb627 rw rootflags=subvol=@
    quiet splash apparmor=1 security=apparmor
    resume=UUID=f2e22fa6-fc97-4195-b99c-425615b3ea4b udev.log_priority=3
  Desktop: GNOME 41.3 tk: GTK 3.24.31 wm: gnome-shell dm: GDM 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20U9005MUS v: ThinkPad X1 Carbon Gen 8
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20U9005MUS v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: N2WET30W (1.20 )
    date: 08/26/2021
Battery:
  ID-1: BAT0 charge: 50.1 Wh (100.0%) condition: 50.1/51.0 Wh (98.2%)
    volts: 17.2 min: 15.4 model: SMP 5B10W13931 type: Li-poly serial: <filter>
    status: Full cycles: 18
  Device-1: hidpp_battery_1 model: Logitech Wireless Mouse serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: Discharging
CPU:
  Info: model: Intel Core i7-10510U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xEA
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 740 high: 800 min/max: 400/4900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 755 2: 791 3: 701 4: 734
    5: 700 6: 700 7: 742 8: 800 bogomips: 36812
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds mitigation: TSX disabled
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-8:5 chip-ID: 13d3:56bb class-ID: 0e02
  Display: wayland server: X.org 1.21.1.3 compositor: gnome-shell driver:
    loaded: modesetting alternate: fbdev,vesa display-ID: 0
    resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo
    driver: sof-audio-pci-intel-cnl
    alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.16-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.20 running: no
  Sound Server-4: PulseAudio v: 15.0 running: no
  Sound Server-5: PipeWire v: 0.3.43 running: yes
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:0d4f class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A
    mac: <filter>
  IF-ID-2: proton0 state: unknown speed: 10 Mbps duplex: full mac: N/A
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-10:8 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 953.87 GiB used: 204.34 GiB (21.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: PC SN730 SDBQNTY-1T00-1001 size: 953.87 GiB block-size:
    physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 11170101 temp: 47.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 204.31 GiB (21.8%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 24.8 MiB (4.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 204.31 GiB (21.8%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-4: /var/log raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 204.31 GiB (21.8%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.41 GiB used: 1.2 MiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 60.0 C pch: 62.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 4235
Info:
  Processes: 372 Uptime: 1d 23h 18m wakeups: 114 Memory: 15.29 GiB
  used: 7.45 GiB (48.7%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: 1631 pacman: 1591 lib: 444 flatpak: 31
  snap: 9 Shell: Zsh v: 5.8 running-in: gnome-terminal inxi: 3.3.12

Hi.

You may try yt-dlp, a fork of youtube-dl which, I think, works better.

1 Like

Working for me. Give the output:

youtube-dl --version
youtube-dl -o ~/Downloads/my_video.mp4 "https://www.youtube.com/watch?v=pJTGAtLH7Hw"

Thank you, this is really nice. Sadly, after the download I still have the same problem. :sob:

                                                                                                                            ✔ 
    ~  yt-dlp --list-formats https://www.youtube.com/watch?v=k91gP7u3fhs                                                                      ✔  3m 32s  
zsh: no matches found: https://www.youtube.com/watch?v=k91gP7u3fhs
    ~  yt-dlp --list-formats https://www.youtube.com/watch?v=Ih4fo6BTMrQ                                                                               1 ✘ 
zsh: no matches found: https://www.youtube.com/watch?v=Ih4fo6BTMrQ
    ~  yt-dlp --list-formats https://www.youtube.com/watch?v=8xaLJkhY11M~                                                                              1 ✘ 
zsh: no matches found: https://www.youtube.com/watch?v=8xaLJkhY11M~

Maybe put the URL between single quotes:
yt-dlp --list-formats 'https://www.youtube.com/watch?v=k91gP7u3fhs'

I suspect that the shell tries to interpret the question mark sign ? as it is a special character.

1 Like

Command for 1st video works with just the video code number, but video is not is not available

$ youtube-dl --list-formats k91gP7u3fhs
[youtube] k91gP7u3fhs: Downloading webpage
ERROR: Video unavailable
The uploader has not made this video available in your country

Command for 2nd video works
youtube-dl --list-formats Ih4fo6BTMrQ

Command for 3rd video works if the tilde ~ after the video code is deleted
youtube-dl --list-formats 8xaLJkhY11M

I did a ddg search and found the link below. The person had success when putting the URL in quotes as mentioned by @cjean.

[SOLVED] Can’t use youtube-dl while on zsh.

I always wonder what I missed in the OP when folks reply with info given. Is not working secret code :slight_smile: I went though the thread and finally it was revealed that the environment was zsh (that was in the OP) and the error message was no matches found.

There are special characters in the shell that need to be quoted if they are part of a filename or not being used as intended. These can be metacharacters and globbing characters. In general, quoting filenames is a very good habit to get into.

youtube-dl is in affect defunct now, all users are urged to move onto yt-dlp which is developed actively which much more function set.

5 Likes

Does anyone ever consider that Google is behind yt?

And they actively work to counter measure code like yt-dl?

give clipgrab a try - works very well

Is there a version for Linux?

*yes, in AUR. But is outdated

in the official repositories
clipgrab

1 Like

Thanks! I didn’t seen it.

official site is here https://clipgrab.org/

Nice find @koshikas. It’s a good reminder to always go to the source. :slight_smile:

I was wondering how easy it is to find out where an application stands in respect to python (could be perl, ruby, rust, javascript… I suppose). Doing a pacman -Qi youtube-dl just says “Depends on python”. The -h or --version don’t add anything, but the man page does say

It requires the Python interpreter, version 2.6, 2.7, or 3.2+,

I’d be concerned with any software that depends on python 2 with no plan, but then again, they have been trying to move past perl 5 for ages.

Going to github and looking at “.github/workflows)/ci.yml” shows

python-version: [2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy-2.7, pypy-3.6, pypy-3.7]

A pacman -Ss yt-dlp shows that it is in the community repo.

It’ll be interesting to see where this goes.

Any reason to come to the conclusion that this was the OP issue… Hhhhhmmmm…

i think OP issue is zsh sensitivity,

just wanted everyone to move to yt-dlp anyway. besides the non maintenance, youtube-dl also suffers from throttling from YouTube. yt-dlp uses android plugin as a workaround for the time being.

Yep, this did it for me. Thank you you all.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.