Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Default MP3 Audio Arguments Persists Despite Global/Custom Arguments #1077

Open
theoisadoor opened this issue Jan 15, 2024 · 0 comments

Comments

@theoisadoor
Copy link

Default --audio-format mp3 persists despite --audio-format flac argument made in "Settings > Downloader > Global custom args" (screenshot1). This can be seen on main screen under "Advanced", after selecting "Only Audio".

Pre-selecting "Only Audio" (screenshot2):
Simulated command: yt-dlp -o video/%(title)s.mp4 --write-info-json --write-thumbnail --audio-format flac --no-clean-info-json -j --no-simulate
Post-selecting "Only Audio" (screenshot3):
Simulated command: yt-dlp -o audio/%(title)s.%(ext)s --write-info-json --audio-quality 0 -x --audio-format mp3 --write-thumbnail --audio-format flac --no-clean-info-json -j --no-simulate

Oddly, the former will persist with "Only Audio" selected if you navigate away from the main screen and come back again (ie. go to Settings, then back to main screen), resulting in only --audio-format flac being present (screenshot4), until you post a URL into the top (ultimately refreshing it, screenshot5).

This behaviour causes two different outcomes depending on whether you are downloading a single video or subscription:
Single video
Entering a video into the main screen, selecting "Only Audio" with Global custom args set to --audio-format flac results in the following:

Error while retrieving info on video with URL https://www.youtube.com/watch?v=OqmvHWZ2dhc with the following message: Error: Command failed with exit code 2: node_modules/youtube-dl/bin/youtube-dl -o audio/%(title)s.%(ext)s --write-info-json --audio-quality 0 -x --audio-format mp3 --write-thumbnail --audio-format flac --no-clean-info-json -j --dump-json http://www.youtube.com/watch?v=OqmvHWZ2dhc


Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: no such option: --audio-format flac

Subscription
Adding a playlist subscription and selecting "Audio-only mode" results in the following error in logs:

2024-01-15T14:47:25.232Z ERROR:
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: no such option: --audio-format flac

To Reproduce

Steps to reproduce the behavior (single video):

  1. Go to "Settings > Downloader > Global custom args" and --audio-format flac
  2. Navigate to "Home"
  3. Enter URL
  4. Select "Only Audio"
  5. Click "Download"
  6. Pop-up of "Download failed!" will appear, error message presented when clicking on warning/error symbol (screenshot6 & screenshot7):
Error while retrieving info on video with URL https://www.youtube.com/watch?v=13ZBjvLH9NE&list=PLaxauk3chSWh-iQ7feZXgVvjDgDm7uSPa&index=4&pp=iAQB8AUB with the following message: Error: Command failed with exit code 2: node_modules/youtube-dl/bin/youtube-dl -o audio/%(title)s.%(ext)s --write-info-json --audio-quality 0 -x --audio-format mp3 --write-thumbnail --audio-format flac --no-clean-info-json -j --dump-json http://www.youtube.com/watch?v=13ZBjvLH9NE


Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: no such option: --audio-format flac

Subscription/playlist produces the same result, albeit in logs as explained earlier.

Expected behavior

Expected behaviour is to download the files as FLAC and be presented in the GUI either under the main screen, or in the playlist view.

Screenshots

screenshot1
screenshot1
screenshot2
screenshot2
screenshot3
screenshot3
screenshot4
screenshot4
screenshot5
screenshot5
screenshot6
screenshot6
screenshot7
screenshot7

Environment

  • YoutubeDL-Material v4.3.2
  • Docker tag: tzahi12345/youtubedl-material:latest

Installation details:
Installed version: v4.3.2 - You are up to date.
Installation type: docker
Docker tag: latest
Commit hash: 13a03a7
Build date: 2023-05-27

Additional context

Channel playlist tested: https://www.youtube.com/playlist?list=PLaxauk3chSWh-iQ7feZXgVvjDgDm7uSPa
Youtube video tested: https://www.youtube.com/watch?v=OqmvHWZ2dhc

Other tests

As an attempt to get this working otherwise, I put --audio-format,,flac into "Global custom args", however this causes any downloads to fail to load into the GUI. FLAC download completes successfully in the background (present in filesystem and are fully working files), but it causes youtubedl-material to never determines that is has finished downloading (expecting MP3?). This is not a sustainable argument.

Conclusion

I think therefore that there needs to be an option to define the default output format for audio, or argument matching when defining any within the "Global custom args" field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant