Files
youtube_personal/ETAPE17_3_FORCE_YTDL_SCHEME.md
T

1.3 KiB

Étape 17.3 - Forcer réellement le ytdl_hook Windows

Le log précédent a montré ceci :

[HD-WINDOWS] ouverture via ytdl_hook ...
[HD-WINDOWS][MPV] cplayer: Failed to recognize file format.

Le hook n'avait donc pas pris possession de l'URL avant que mpv tente d'interpréter la page HTML YouTube comme un fichier vidéo.

Correctif

L'URL ouverte par mpv devient maintenant :

ytdl://https://www.youtube.com/watch?v=...

Le préfixe ytdl:// force explicitement le hook intégré de mpv à traiter l'URL avec yt-dlp.

Le chemin absolu de notre yt-dlp.exe reste fourni via :

ytdl_hook-ytdl_path=...

Deno reste fourni à yt-dlp avec ytdl-raw-options.

Diagnostic ajouté

Après l'ouverture, l'application journalise également :

[HD-WINDOWS] ytdl_hook path=...

Si le hook est bien exécuté, ce chemin doit pointer vers le yt-dlp.exe empaqueté dans flutter_assets.

Installation

Aucun script de préparation à relancer.

Extraire le ZIP à la racine puis :

cd "D:\07-Logiciels\23-youtube_personal"
flutter clean
flutter pub get
flutter run -d windows

Tester d'abord 1080p.

Succès attendu :

[HD-WINDOWS] ouverture FORCÉE via ytdl:// ...
[HD-WINDOWS] ytdl_hook path=...yt-dlp.exe
[HD-WINDOWS] lecture confirmée: 1920x1080 ...

Puis tester 2160p.