Skip to content

Commit

Permalink
Make this a composer package
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBelgium committed Jul 20, 2018
1 parent 11bff8c commit 1531f0d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "michaelbelgium/youtube-to-mp3",
"description": "Convert and search youtube video's via your own API",
"require": {
"norkunas/youtube-dl-php": "^1.0",
"google/apiclient": "^2.0"
},
"authors": [
{
"name": "Michael V.",
"email": "[email protected]"
}
]
}
4 changes: 2 additions & 2 deletions convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'audio-format' => 'mp3',
'audio-quality' => 0,
'output' => '%(id)s.%(ext)s',
'ffmpeg-location' => '/usr/local/bin/ffmpeg' //optional
//'ffmpeg-location' => '/usr/local/bin/ffmpeg'
];
}
$dl = new YoutubeDl($options);
Expand All @@ -48,7 +48,7 @@

echo json_encode(array("error" => false, "title" => $video->getTitle(), "duration" => $video->getDuration(), "file" => $file));
}
catch (Exception $e)
catch (Exception $e)
{
echo json_encode(array("error" => true, "message" => $e->getMessage()));
}
Expand Down
1 change: 1 addition & 0 deletions download/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In this folder the downloadable mp3's will be placed. Make sure that this folder is writable.

0 comments on commit 1531f0d

Please sign in to comment.