From 57a1674f4b323e9083b0efe801243e8825c197d9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Apr 2016 21:13:43 +0200 Subject: [PATCH 1/2] Use local rtmpdump --- classes/Config.php | 1 + composer.json | 6 +++++- composer.lock | 34 ++++++++++++++++++++++++++++++--- config.example.yml | 1 + controllers/FrontController.php | 2 +- 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index 2b31571..cd8dea1 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -34,6 +34,7 @@ class Config public $params = array('--no-playlist', '--no-warnings', '-f best[protocol^=http]', '--playlist-end', 1); public $convert = false; public $avconv = 'vendor/bin/ffmpeg'; + public $rtmpdump = 'vendor/bin/rtmpdump'; public $curl_params = array(); /** diff --git a/composer.json b/composer.json index 0a481b9..7cf18b3 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "symfony/process": "~3.0.0", "ptachoire/process-builder-chain": "~1.2.0", "ffmpeg/ffmpeg": "dev-release", - "rudloff/smarty-plugin-noscheme": "~0.1.0" + "rudloff/smarty-plugin-noscheme": "~0.1.0", + "rudloff/rtmpdump-bin": "dev-develop" }, "require-dev": { "symfony/var-dumper": "~3.0.0" @@ -49,6 +50,9 @@ "ffmpeg" ] } + }, { + "type": "git", + "url": "https://github.com/Rudloff/rtmpdump-bin.git" }], "authors": [{ "name": "Pierre Rudloff", diff --git a/composer.lock b/composer.lock index 2172052..861771c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "d8b87df7911542ff8a9c7323fcc22949", - "content-hash": "52dc356edd823568af9aca1e95032cfd", + "hash": "1556bc08c5018e6085a715a783097d9d", + "content-hash": "91451f1d1fc10a7b09efb3511e4b7324", "packages": [ { "name": "container-interop/container-interop", @@ -408,6 +408,33 @@ }, "type": "library" }, + { + "name": "rudloff/rtmpdump-bin", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/Rudloff/rtmpdump-bin.git", + "reference": "c701e4f7cfae2ffbe6ab898768d27301d537d4c3" + }, + "require-dev": { + "rtmpdump/rtmpdump": "2.3" + }, + "bin": [ + "rtmpdump" + ], + "type": "library", + "scripts": { + "build": [ + "cd vendor/rtmpdump/rtmpdump/ && make", + "cp vendor/rtmpdump/rtmpdump/rtmpdump ." + ] + }, + "license": [ + "GPL-2.0" + ], + "description": "rtmpdump binary for Linux 64 bit", + "time": "2016-04-12 18:52:03" + }, { "name": "rudloff/smarty-plugin-noscheme", "version": "0.1.1", @@ -797,7 +824,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "ffmpeg/ffmpeg": 20 + "ffmpeg/ffmpeg": 20, + "rudloff/rtmpdump-bin": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/config.example.yml b/config.example.yml index deff29b..9f66ab7 100644 --- a/config.example.yml +++ b/config.example.yml @@ -9,3 +9,4 @@ params: curl_params: convert: false avconv: vendor/bin/ffmpeg +rtmpdump: vendor/bin/rtmpdump diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 365c9c9..03f2f01 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -139,7 +139,7 @@ class FrontController if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') { $builder = new ProcessBuilder( array( - '/usr/bin/rtmpdump', + $this->config->rtmpdump, '-q', '-r', $video->url, From 3e8cbe6cc8655abed841e7893b755ac08508810c Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Apr 2016 21:21:18 +0200 Subject: [PATCH 2/2] Get rudloff/rtmpdump-bin from packagist --- composer.json | 5 +---- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 7cf18b3..0b578a3 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "ptachoire/process-builder-chain": "~1.2.0", "ffmpeg/ffmpeg": "dev-release", "rudloff/smarty-plugin-noscheme": "~0.1.0", - "rudloff/rtmpdump-bin": "dev-develop" + "rudloff/rtmpdump-bin": "~2.3" }, "require-dev": { "symfony/var-dumper": "~3.0.0" @@ -50,9 +50,6 @@ "ffmpeg" ] } - }, { - "type": "git", - "url": "https://github.com/Rudloff/rtmpdump-bin.git" }], "authors": [{ "name": "Pierre Rudloff", diff --git a/composer.lock b/composer.lock index 861771c..5022148 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "1556bc08c5018e6085a715a783097d9d", - "content-hash": "91451f1d1fc10a7b09efb3511e4b7324", + "hash": "a0c23015c2a2bbb700ae566a04ca8679", + "content-hash": "42d3272dbfe226c0ef3da4e135e2dae3", "packages": [ { "name": "container-interop/container-interop", @@ -410,11 +410,17 @@ }, { "name": "rudloff/rtmpdump-bin", - "version": "dev-develop", + "version": "2.3", "source": { "type": "git", "url": "https://github.com/Rudloff/rtmpdump-bin.git", - "reference": "c701e4f7cfae2ffbe6ab898768d27301d537d4c3" + "reference": "133cdd80e3bab66593e88a5276158596383afd97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Rudloff/rtmpdump-bin/zipball/133cdd80e3bab66593e88a5276158596383afd97", + "reference": "133cdd80e3bab66593e88a5276158596383afd97", + "shasum": "" }, "require-dev": { "rtmpdump/rtmpdump": "2.3" @@ -423,17 +429,12 @@ "rtmpdump" ], "type": "library", - "scripts": { - "build": [ - "cd vendor/rtmpdump/rtmpdump/ && make", - "cp vendor/rtmpdump/rtmpdump/rtmpdump ." - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0" ], "description": "rtmpdump binary for Linux 64 bit", - "time": "2016-04-12 18:52:03" + "time": "2016-04-12 19:17:32" }, { "name": "rudloff/smarty-plugin-noscheme", @@ -824,8 +825,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "ffmpeg/ffmpeg": 20, - "rudloff/rtmpdump-bin": 20 + "ffmpeg/ffmpeg": 20 }, "prefer-stable": false, "prefer-lowest": false,