Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Fatal error: Uncaught Exception: <url> malformed #299

Closed
jalako opened this issue Jan 2, 2018 · 5 comments
Closed

Fatal error: Uncaught Exception: <url> malformed #299

jalako opened this issue Jan 2, 2018 · 5 comments

Comments

@jalako
Copy link

jalako commented Jan 2, 2018

I get an error when I want to download an mp3

I downloaded the newest version of the YouTube-Downloader.
Gave read and write permission.
Created a config that enables the mp3-download.

The video is irrelevant. Doesn't work with any.

Expected behavior: I would be able to download the mp3

Actual behavior: An error occurs

Version

Youtube Downloader 0.7-dev

Additional Information

Error:

Fatal error: Uncaught Exception: malformed in /var/www/xxx/src/Http/CurlClient.php:153 Stack trace: #0 /var/www/xxx/src/Http/CurlClient.php(63): YoutubeDownloader\Http\CurlClient->getHttpResponseFromCurl(Resource id #6, Array) #1 /var/www/xxx/src/Application/ControllerAbstract.php(105): YoutubeDownloader\Http\CurlClient->send(Object(YoutubeDownloader\Http\Request), Array) #2 /var/www/xxx/src/Application/DownloadController.php(102): YoutubeDownloader\Application\ControllerAbstract->getSize(NULL, Object(YoutubeDownloader\Config), Object(YoutubeDownloader\Toolkit)) #3 /var/www/xxx/src/Application/App.php(83): YoutubeDownloader\Application\DownloadController->execute() #4 /var/www/xxx/download.php(23): YoutubeDownloader\Application\App->runWithRoute('download') #5 {main} Next RuntimeException: A curl error occurs while execute the curl handler. in /var/www/xxx/src/Http/CurlClient.php:156 Stack trace: #0 /var/www/xxx/src/Http/CurlClient.php(63): You in /var/www/xxx/src/Http/CurlClient.php on line 156

@Art4
Copy link
Collaborator

Art4 commented Jan 3, 2018

Sorry, I can't reproduce the error and need some more information about your system. I'm using PHP 7.0 on Windows 7 right now. I have downloaded ffmpeg.exe and my config/custom.php contains this:

<?php
// config/custom.php
return [
    'debug' => true,
    'enable_youtube_decipher_signature' => true,
    'MP3Enable' => true, // enable or disable media conversion and download to mp3
    'MP3ConvertVideo' => true, // 'false' download adaptive audio only to save bandwidth.
    'MP3Quality' => '128k', // 'number(k)' (64k, 80k, 96k, 112k, 128k, 160k, 192k) or 'high': bitrate quality of converted mp3
    'MP3TempDir' => realpath(__DIR__ . '/../cache/'), // temporary download location for media
    'ffmpegPath' => 'C:\Program Files (x86)\ffmpeg\ffmpeg.exe', // ffmpeg location path
];

Also a video url would be helpful so we can ensure that it is definitely not a problem with the video or a specific url.

@jalako
Copy link
Author

jalako commented Jan 3, 2018

I am running

PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )

on Debian 9.3

So in my case I am not using ffmpeg.exe

One Link that doesn't work :

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

'enable_youtube_decipher_signature' => true, 'MP3Enable' => true, 'MP3ConvertVideo' => true, 'MP3Quality' => '128k', 'MP3TempDir' => realpath(__DIR__ . '/../cache/'), 'ffmpegPath' => 'C:\Program Files (x86)\ffmpeg\ffmpeg.exe', 'aria2Path' => 'C:\cygwin\bin\aria2c.exe',

@ewwink
Copy link
Contributor

ewwink commented Jan 19, 2018

@jalako you need fffmpeg installed to convert and download to mp3 and change ffmpegPath maybe to /usr/bin/ffmpeg

@jalako
Copy link
Author

jalako commented Jan 19, 2018

@ewwink thank you for your answer. It now works correctly. I didn't realize, that I had to change it because first of all the default path was an exe because of which I immediately thought it was not relevant to me. You should maybe consider putting in the readme that in order to get the mp3 download to work, you need ffmpeg and change the path to it in the config. Or atleast write a hint in the default config stating this.

@jalako jalako closed this as completed Jan 19, 2018
@Art4 Art4 mentioned this issue Jan 25, 2018
@Art4
Copy link
Collaborator

Art4 commented Jan 25, 2018

Thanks @ewwink for pointing this out.
@jalako I've set it on our todo list for the docs.

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

No branches or pull requests

3 participants