alchemy-fr / binarydriver Goto Github PK
View Code? Open in Web Editor NEWBinary driver utilities
License: Other
Binary driver utilities
License: Other
Hey @jens1o ! Would you mind to publish a new version with the latest changes?
Many thanks!
It's only used for the NullHandler, instead a the NullLogger from psr/log can be used.
call to a member function setArguments() on null {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function setArguments() on null at /xxx/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php:171)
local.ERROR: Call to a member function setArguments() on null {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function setArguments() on null at /home/app/www/cross_b/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php:171)
[stacktrace]
#0 /home/app/www/cross_b/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(136): Alchemy\BinaryDriver\ProcessBuilderFactory->create(Array)
#1 /home/app/www/cross_b/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(61): Alchemy\BinaryDriver\AbstractBinary->command(Array)
#2 /home/app/www/cross_b/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(43): FFMpeg\FFProbe\OptionsTester->retrieveHelpOutput()
#3 /home/app/www/cross_b/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(237): FFMpeg\FFProbe\OptionsTester->has('-show_streams')
#4 /home/app/www/cross_b/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(206): FFMpeg\FFProbe->probe('/data/www/cross...', '-show_streams', 'streams')
#5 /home/app/www/cross_b/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(95): FFMpeg\FFProbe->streams('/data/www/cross...')
#6 /home/app/www/cross_b/app/Lib/Tool/FFmpeg.php(75): FFMpeg\FFMpeg->open('/data/www/cross...')
#7 /home/app/www/cross_b/app/Jobs/VideoAddWatermark.php(41): App\Lib\Tool\FFmpeg->addWatermark('/data/www/cross...')
#8 [internal function]: App\Jobs\VideoAddWatermark->handle()
previously reported at PHP-FFMpeg/PHP-FFMpeg#721
Can u tell me please how to set my custom path to the bin file? for example if i used ffmpeg from /usr/home/ffmpeg/bin/
Hello,
I'm developing a laravel package to handle media files. This package depends on ffmpeg-php which depends on this package. Laravel 5.6 uses symfony/process 4.0 which make it incompatible with this package. Do you think you could update the dependency of this project to support 4.0? I can make a pull request if you want.
Thanks
Library is no longer maintained, and should be replaced by a maintained library (ie. Symfony's event dispatcher)
Update packagist to use v2.0.0
I had the error "Unable to load FFMpeg" while using the PHP-FFMPeg driver.
Looks like the auto-detection failed,
https://github.com/alchemy-fr/BinaryDriver/blob/master/src/Alchemy/BinaryDriver/AbstractBinary.php#L160-L162
Is the package working only under Windows ? Got any ideas ?
(As I've tried in both Linux/Mac environment)
I'm trying to update my laravel project from v8 to v9, which depends on symfony process, and it is requred to be v6, but this package does not support it. Please add it. Thanks!
<b>Deprecated</b>: Return type of Alchemy\BinaryDriver\Configuration: :offsetExists($offset) should either be compatible with ArrayAccess: :offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange
] attribute should be used to temporarily suppress the notice in <b>vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php</b> on line <b>79</b><br />
<br />
<b>Deprecated</b>: Return type of Alchemy\BinaryDriver\Configuration: :offsetGet($offset) should either be compatible with ArrayAccess: :offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange
] attribute should be used to temporarily suppress the notice in <b>vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php</b> on line <b>87</b><br />
<br />
<b>Deprecated</b>: Return type of Alchemy\BinaryDriver\Configuration: :offsetSet($offset, $value) should either be compatible with ArrayAccess: :offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange
] attribute should be used to temporarily suppress the notice in <b>vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php</b> on line <b>95</b><br />
<br />
<b>Deprecated</b>: Return type of Alchemy\BinaryDriver\Configuration: :offsetUnset($offset) should either be compatible with ArrayAccess: :offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange
] attribute should be used to temporarily suppress the notice in <b>vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php</b> on line <b>103</b><br />
<br />
<b>Deprecated</b>: Return type of Alchemy\BinaryDriver\Configuration: :getIterator() should either be compatible with IteratorAggregate: :getIterator(): Traversable, or the #[\ReturnTypeWillChange
] attribute should be used to temporarily suppress the notice in <b>vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php</b> on line <b>26</b><br />
A new bug appeared with the recent update of psr/log v3. The ProcessRunnerInterface from psr/log version 3 provides a setLogger function that returns a void
. PHP 8.0.12 now enforce that you declare the right return type when implementing interfaces.
As it currently return a ProcessRunner, I end up with this error when using it :
Declaration of Alchemy\BinaryDriver\ProcessRunner::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void
Either return a void to comply to the interface, either get back to psr/log version 1 that doesn't provide any return type
required for PHP-FFMpeg/PHP-FFMpeg#647
When I upgrade Laravel 6 to 7, I found out the following error.
Problem 1 - Root composer.json requires php-ffmpeg/binary-driver dev-master -> satisfiable by php-ffmpeg/binary-driver[dev-master]. - php-ffmpeg/binary-driver dev-master requires monolog/monolog ^1.3 -> found monolog/monolog[1.3.0, ..., 1.x-dev] but it conflicts with your root composer.json require (2.6.0).
At the moment, it may yield to null
, which is not really nice.
[28-Feb-2019 01:15:36 UTC] PHP Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffprobe failed to execute command '/usr/bin/ffprobe' 'videos/video.mp4' '-show_streams' '-print_format' 'json' in /home/thedena/public_html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100
Stack trace:
#0 /home/thedena/public_html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure(''/usr/bin/ffpro...')
#1 /home/thedena/public_html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(209): Alchemy\BinaryDriver\ProcessRunner->run(Object(Symfony\Component\Process\Process), Object(SplObjectStorage), false)
#2 /home/thedena/public_html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(137): Alchemy\BinaryDriver\AbstractBinary->run(Object(Symfony\Component\Process\Process), false, NULL)
#3 /home/thedena/public_html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(261): Alchemy\BinaryDriver\Abstract in /home/thedena/public_html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php on line 263
Hello.
When do you plan publish release with symfony/process 5.0 support?
Hi,
Could you add support for symfony/process 4.0 ?
Thanks a lot.
preparing for PHP-FFMpeg/PHP-FFMpeg#412
--
declare(strict_types=1);
in every file and fix any type-converting struggles.void
) in any classes.array(...)
to [...]
When installed with composer --prefer-lowest, the unit tests fail.
Examples:
Dependency to symfony/process should be at least raised to ^2.1.
You can't execute python scripts because of the format:
'python' 'argument1' 'blabla'
Add the possibility to not add the ':
python argument1 blabla
I am using Alchemy/Binarydriver through PHP-FFMPeg.
When no logger is set through the configuration, the typehint in Alchemy\BinaryDriver\AbstractBinary::__construct() fails.
Catchable fatal error: Argument 2 passed to Alchemy\BinaryDriver\AbstractBinary::__construct() must be an instance of Psr\Log\LoggerInterface, instance of Monolog\Logger given, called in /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php on line 171 and defined in /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php on line 39
in AbstractBinary::load, $logger is null.
This leads to: this line being called:
$logger = new Logger(__NAMESPACE__ . ' logger');
__NAMESPACE__
is:
string 'Alchemy\BinaryDriver' (length=20)
Logger is referenced as:
use Monolog\Logger;
in Line 19.
This leads to $logger being the following at the end of the call to AbstractBinary::load:
object(Monolog\Logger)[21]
protected 'name' => string 'Alchemy\BinaryDriver logger' (length=27)
protected 'handlers' =>
array (size=1)
0 =>
object(Monolog\Handler\NullHandler)[23]
protected 'level' => int 100
protected 'bubble' => boolean false
protected 'formatter' => null
protected 'processors' =>
array (size=0)
empty
protected 'processors' =>
array (size=0)
empty
Monolog/Logger Version is: "dev-master": "1.13.x-dev"
This is installed through composer requirements following from php-ffmpeg.
Monolog\Logger correctly implements Loggerinterface though.
class Logger implements LoggerInterface
Is this a PHP bug?
My PHP Version is 5.6.2 on OSX.
Is it possible to update the composer.json to allow also symfony 4?
php-ffmpeg/php-ffmpeg package is based on this one and I cannot use it under Laravel 5.6 (latest release) because it requires symfony from 4 onward.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.