StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.56k stars 62 forks source link

Video+Audio Best leads to AAC Audio instead of OPUS #124

Open Tanatsuko opened 5 months ago

Tanatsuko commented 5 months ago

Using the Video+Audio best setting, I downloaded a video that has the YouTube codecs (248) and (251), so it should be 1080p (Google's V9 codec) and OPUS for audio. However, the file I end up with has the correct video codec but uses AAC for audio (see screenshot I took from VLC of the downloaded file).

Steps to reproduce the behavior:

  1. Type in "https://www.youtube.com/watch?v=UT3yC-4_YBU" and click the [+].
  2. Make sure that at the bottom "Video + audio" and "Best" are selected.
  3. Click the green "Download" button.
  4. Navigate to the file, open it in your media player of choice, and check the codec.
  5. See that the audio is AAC instead of OPUS.

Expected behavior:

In a video that uses the (248) video codec and the (251) audio codec, the audio should be in OPUS, not AAC.

If applicable, add screenshots to help explain your problem. VLC-Screen

Additional info (please complete the following information):

(Edit: I apologize that the VLC screenshot is in German, but I believe it's understandable, even without knowing German.)

StefanLobbenmeier commented 5 months ago

Can you try enabling the option to list audio formats in settings? Should be under advanced.

Apart from that could you elaborate on why you would expect OPUS as the default?

StefanLobbenmeier commented 5 months ago

From yt-dlp, this would mean setting this setting:

--prefer-free-formats           Prefer video formats with free containers
                                over non-free ones of same quality. Use with
                                "-S ext" to strictly prefer free containers
                                irrespective of quality
Tanatsuko commented 5 months ago

Thank you. I managed to download my video in .webm with OPUS audio now.

If you check out my test video on YouTube, set the settings to 1080p, and go to "Stats for Nerds," it will show that the video codec is 248 (VP9) and the audio codec is 251 (OPUS). In fact, if you go through all different video resolutions, the audio codec always stays 251 (OPUS), so I'm surpised to see AAC audio at all as I wouldn't know where "Open Video Downloader" gets the AAC audio track from. My best guess would be that the program converts OPUS to AAC for compatibility purposes?

I have never worked with the command line tools before, but before I had to reinstall my OS, I've used a different program (I can't remember the name, though) that automatically gave me the VP9/OPUS combo. I like this program's design a lot better, though. I'm just a little surprised why the video + audio combo ends up giving me AAC for audio.

Oh, a little addendum: Out of curiosity, I just used the same video I linked above and went with "audio only" and "best" without fumbling around with any other settings - this way, I'm getting OPUS audio, too.

MadDog443 commented 2 months ago

Can you try enabling the option to list audio formats in settings? Should be under advanced.

Apart from that could you elaborate on why you would expect OPUS as the default?

Besides Opus being open source it is also probably the leading competitor in terms of quality per byte, this is quite important for streaming services (if you plan to host a jellyfin server). Some data: https://opus-codec.org/comparison/

XPRAMT commented 4 weeks ago

left aac right opus 螢幕擷取畫面 2024-10-30 015006