ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites

Home Page:http://ytdl-org.github.io/youtube-dl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Unable to extract uploader id

deenbee opened this issue · comments

ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Failed to recognize file format.

Process returned 0 (0x0) execution time : 1.885 s
Press any key to continue.

#include <stdio.h>
#include <stdlib.h>

int main() {
// URL del video de YouTube
char *url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";

// Comando para reproducir el video con mpv
char command[256];
sprintf(command, "youtube-dl -q -o - \"%s\" | mpv --no-video -", url);

// Abrir una tubería y ejecutar el comando
FILE *pipe = popen(command, "r");
if (pipe == NULL) {
    perror("Error abriendo la tubería");
    return 1;
}

// Leer datos de la tubería (esto mantendrá el proceso en ejecución)
char buffer[4096];
while (fgets(buffer, sizeof(buffer), pipe) != NULL) {
    // No se necesita hacer nada con los datos, ya que mpv los procesa
}

// Cerrar la tubería
pclose(pipe);

return 0;

}