From 683a19b0fb0c4013db9ff5416e73aca27a967bd0 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 22 Jun 2020 23:26:47 +0200 Subject: [PATCH] Remove references to avconv Most distributions now use ffmpeg instead --- README.md | 10 +++++----- classes/Config.php | 12 ++++++------ config/config.example.yml | 8 ++++---- config/config_test.yml | 2 +- resources/FAQ.md | 6 +++--- tests/ConfigTest.php | 2 +- tests/VideoTest.php | 14 +++++++------- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9b60df9..3ac824c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This will download all the required dependencies. (Note that it will download the ffmpeg binary for 64-bits Linux. If you are on another platform, -you might want to specify the path to avconv/ffmpeg in your config file.) +you might want to specify the path to ffmpeg in your config file.) You should also ensure that the *templates_c* folder has the right permissions: @@ -133,18 +133,18 @@ server { ## Other dependencies -You need [avconv](https://libav.org/avconv.html) +You need [ffmpeg](https://ffmpeg.org/) in order to enable conversions. If you don't want to enable conversions, you can disable it in `config.yml`. On Debian-based systems: ```bash -sudo apt-get install libav-tools +sudo apt-get install ffmpeg ``` -You also probably need to edit the `avconv` variable in `config.yml` -so that it points to your ffmpeg/avconv binary (`/usr/bin/avconv` on Debian/Ubuntu). +You also probably need to edit the `ffmpeg` variable in `config.yml` +so that it points to your ffmpeg binary (`/usr/bin/ffmpeg` on Debian/Ubuntu). ## Use as library diff --git a/classes/Config.php b/classes/Config.php index 8b90f8a..0460765 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -70,11 +70,11 @@ class Config public $convertAdvancedFormats = ['mp3', 'avi', 'flv', 'wav']; /** - * avconv or ffmpeg binary path. + * ffmpeg binary path. * * @var string */ - public $avconv = '/usr/bin/ffmpeg'; + public $ffmpeg = '/usr/bin/ffmpeg'; /** * Path to the directory that contains the phantomjs binary. @@ -112,12 +112,12 @@ class Config public $audioBitrate = 128; /** - * avconv/ffmpeg logging level. + * ffmpeg logging level. * Must be one of these: quiet, panic, fatal, error, warning, info, verbose, debug. * * @var string */ - public $avconvVerbosity = 'error'; + public $ffmpegVerbosity = 'error'; /** * App name. @@ -329,9 +329,9 @@ class Config $this->youtubedl, $this->params, $this->python, - $this->avconv, + $this->ffmpeg, $this->phantomjsDir, - $this->avconvVerbosity + $this->ffmpegVerbosity ); } diff --git a/config/config.example.yml b/config/config.example.yml index c6b1f0b..8aeb99a 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -22,11 +22,11 @@ convertAdvanced: false # List of formats available in advanced conversion mode convertAdvancedFormats: [mp3, avi, flv, wav] -# Path to your avconv or ffmpeg binary -avconv: /usr/bin/ffmpeg +# Path to your ffmpeg binary +ffmpeg: /usr/bin/ffmpeg -# avconv/ffmpeg logging level. -avconvVerbosity: error +# ffmpeg logging level. +ffmpegVerbosity: error # Path to the directory that contains the phantomjs binary. phantomjsDir: /usr/bin/ diff --git a/config/config_test.yml b/config/config_test.yml index 99b704b..893344a 100644 --- a/config/config_test.yml +++ b/config/config_test.yml @@ -1,3 +1,3 @@ --- convert: false -avconvVerbosity: fatal +ffmpegVerbosity: fatal diff --git a/resources/FAQ.md b/resources/FAQ.md index c2d3b65..4b80889 100644 --- a/resources/FAQ.md +++ b/resources/FAQ.md @@ -33,13 +33,13 @@ In order to enable audio conversion, you need to add this to your `config.yml` f ```yaml convert: true -avconv: path/to/avconv +ffmpeg: path/to/ffmpeg ``` -You will also need to install `avconv` on your server: +You will also need to install `ffmpeg` on your server: ```bash -sudo apt-get install libav-tools +sudo apt-get install ffmpeg ``` ## Deploy AllTube on Heroku diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index cbaf21d..e0fe7d8 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -70,7 +70,7 @@ class ConfigTest extends BaseTest $this->assertIsArray($config->params); $this->assertIsString($config->youtubedl); $this->assertIsString($config->python); - $this->assertIsString($config->avconv); + $this->assertIsString($config->ffmpeg); $this->assertIsBool($config->convert); $this->assertIsBool($config->uglyUrls); $this->assertIsBool($config->stream); diff --git a/tests/VideoTest.php b/tests/VideoTest.php index 1b85038..7f58516 100644 --- a/tests/VideoTest.php +++ b/tests/VideoTest.php @@ -339,7 +339,7 @@ class VideoTest extends BaseTest } /** - * Test getAudioStream function without avconv. + * Test getAudioStream function without ffmpeg. * * @param string $url URL * @param string $format Format @@ -348,10 +348,10 @@ class VideoTest extends BaseTest * @throws AlltubeLibraryException|ConfigException * @dataProvider urlProvider */ - public function testGetAudioStreamAvconvError($url, $format) + public function testGetAudioStreamFfmpegError($url, $format) { $this->expectException(AvconvException::class); - Config::setOptions(['avconv' => 'foobar']); + Config::setOptions(['ffmpeg' => 'foobar']); $config = Config::getInstance(); $downloader = $config->getDownloader(); @@ -488,7 +488,7 @@ class VideoTest extends BaseTest } /** - * Test getM3uStream function without avconv. + * Test getM3uStream function without ffmpeg. * * @param string $url URL * @param string $format Format @@ -497,10 +497,10 @@ class VideoTest extends BaseTest * @throws AlltubeLibraryException|ConfigException * @dataProvider m3uUrlProvider */ - public function testGetM3uStreamAvconvError($url, $format) + public function testGetM3uStreamFfmpegError($url, $format) { $this->expectException(AvconvException::class); - Config::setOptions(['avconv' => 'foobar']); + Config::setOptions(['ffmpeg' => 'foobar']); $config = Config::getInstance(); $downloader = $config->getDownloader(); @@ -509,7 +509,7 @@ class VideoTest extends BaseTest } /** - * Test getConvertedStream function without avconv. + * Test getConvertedStream function without ffmpeg. * * @param string $url URL * @param string $format Format