videocutting/cutvideo

21 lines
977 B
PHP
Executable file

#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use DanielSiepmann\Videcutting\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\SingleCommandApplication;
(new SingleCommandApplication())
->setName('Cutvideo')
->setHelp('Allows to cut a given video multiple times. Uses ffmpeg under the hood.')
->setVersion('0.1.0')
->addArgument('file', InputArgument::REQUIRED, 'The video file to cut.')
->addArgument('start', InputArgument::REQUIRED, 'The starting point of the video')
->addArgument('end', InputArgument::REQUIRED, 'The end point of the video')
->addOption('ad', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Start and end of ads, separate start and end via "/".', [])
->setCode(new Command())
->run();