67 lines
1.3 KiB
Markdown
67 lines
1.3 KiB
Markdown
# Étape 17.3 - Forcer réellement le ytdl_hook Windows
|
|
|
|
Le log précédent a montré ceci :
|
|
|
|
```text
|
|
[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 :
|
|
|
|
```text
|
|
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 :
|
|
|
|
```text
|
|
ytdl_hook-ytdl_path=...
|
|
```
|
|
|
|
Deno reste fourni à yt-dlp avec `ytdl-raw-options`.
|
|
|
|
## Diagnostic ajouté
|
|
|
|
Après l'ouverture, l'application journalise également :
|
|
|
|
```text
|
|
[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 :
|
|
|
|
```powershell
|
|
cd "D:\07-Logiciels\23-youtube_personal"
|
|
flutter clean
|
|
flutter pub get
|
|
flutter run -d windows
|
|
```
|
|
|
|
Tester d'abord 1080p.
|
|
|
|
Succès attendu :
|
|
|
|
```text
|
|
[HD-WINDOWS] ouverture FORCÉE via ytdl:// ...
|
|
[HD-WINDOWS] ytdl_hook path=...yt-dlp.exe
|
|
[HD-WINDOWS] lecture confirmée: 1920x1080 ...
|
|
```
|
|
|
|
Puis tester 2160p.
|