Code Monkey home page Code Monkey logo

binarydriver's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binarydriver's Issues

Running a job asynchronously does not work

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

symfony/process 4.0?

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

Add support for symfony process v6

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!

PHP 8.1 deprecated

<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 />

Fatal error after calling setLogger

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

How can I upgrade php-ffmpeg/binary-driver to alchemy-fr/BinaryDriver?

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).

Im having issues with this library

[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

Symfony 4.0

Hi,
Could you add support for symfony/process 4.0 ?
Thanks a lot.

Move from phpunit 5.7 to 7.3 and php 5.5 to 7.1

preparing for PHP-FFMpeg/PHP-FFMpeg#412

--

  • Set declare(strict_types=1); in every file and fix any type-converting struggles.
  • Use scalar type hints, null type hints and return type values(even void) in any classes.
  • Check whether we have any workarounds for older php versions
    • Remove them if they aren't necessary anymore.
  • Convert any array(...) to [...]

Dependencies broken

When installed with composer --prefer-lowest, the unit tests fail.

Examples:

  • Class 'Symfony\Component\Process\ProcessBuilder' not found
  • Class 'Symfony\Component\Process\ExecutableFinder' not found

Dependency to symfony/process should be at least raised to ^2.1.

Python Binary Driver execution fail

You can't execute python scripts because of the format:
'python' 'argument1' 'blabla'

Add the possibility to not add the ':
python argument1 blabla

Typehint fail in Logger creation in AbstractBinary

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.

Update to use symfony 4

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.