ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
129.83k stars 9.79k forks source link

webm audio only must have the opus extension #28041

Open 532910 opened 3 years ago

532910 commented 3 years ago

webm audio only must have the opus extension. webm extension is for video.

Steps to reproduce: youtube-dl -f 251 'https://www.youtube.com/watch?v=iyB7zYiBPVo'

Expected result: .opus file

Current result: .webm file

ptrcnull commented 3 years ago

WebM is a container for video (VP8/VP9/etc.), audio (Opus/Vorbis/etc.) or both. Also, changing the extension from .webm to .opus would still give you a webm file, just with a different extension.

selfisekai commented 3 years ago

if you want an opus file, add the -x flag like this:

 laura@iino  ~/haruhi-dl   master  youtube-dl -f 251 'https://www.youtube.com/watch?v=iyB7zYiBPVo' -x
[youtube] iyB7zYiBPVo: Downloading webpage
[download] Destination: Romano - Kadachka (Live) _ Batov Records-iyB7zYiBPVo.webm
[download] 100% of 3.25MiB in 00:00
[ffmpeg] Destination: Romano - Kadachka (Live) _ Batov Records-iyB7zYiBPVo.opus
Deleting original file Romano - Kadachka (Live) _ Batov Records-iyB7zYiBPVo.webm (pass -k to keep)
532910 commented 3 years ago

I still believe the current behaviour is wrong.

1.

% grep webm /etc/mime.types                  
video/webm                                      webm

2. -f 140 produces m4a audio only file without -x

selfisekai commented 3 years ago
  1. I don't know what files do you keep on your PC, I personally don't have a one like that.
  2. That's the de facto standard, as you can read on Wikipedia: image