Skip to content

fix: "Requested format is not available" error on URL input#17

Open
oleg-deezus wants to merge 1 commit into
alinuxpengui:mainfrom
oleg-deezus:fix/format-not-available-error
Open

fix: "Requested format is not available" error on URL input#17
oleg-deezus wants to merge 1 commit into
alinuxpengui:mainfrom
oleg-deezus:fix/format-not-available-error

Conversation

@oleg-deezus
Copy link
Copy Markdown

Fix for #13

Problem

When pasting a YouTube URL, Macabolic immediately throws:

ERROR: [youtube] <id>: Requested format is not available.
Use --list-formats for a list of available formats

The format/quality selection UI never appears and the download never starts.

Root Cause

fetchSingleVideoInfo() calls yt-dlp --dump-json without an explicit -f format flag.
Without it, yt-dlp uses its internal default format selector which can fail on certain
videos before any metadata is returned. This kills the flow before the user ever sees
the format picker.

Fix

Add -f bestvideo+bestaudio/best to the --dump-json call in fetchSingleVideoInfo().
This gives yt-dlp a permissive format to resolve during info fetching, ensuring metadata
is always returned so the user can proceed to format selection.

Testing

When fetching video info via --dump-json, yt-dlp uses its internal
default format selector which could fail with 'Requested format is
not available' on some videos. This prevented the format selection
UI from ever appearing.

Adding -f bestvideo+bestaudio/best gives yt-dlp a permissive format
to resolve during info fetching, ensuring metadata is always returned.

Fixes alinuxpengui#13
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

Successfully merging this pull request may close these issues.

1 participant