diff --git a/content/.gitignore b/content/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Command/TranscodeCommand.php b/src/Command/TranscodeCommand.php new file mode 100644 index 0000000..836aacc --- /dev/null +++ b/src/Command/TranscodeCommand.php @@ -0,0 +1,51 @@ +videoService = $videoService; + + } + + protected function configure() + { + $this->setDescription("starts transcode process"); + } + + private function handleVideo(Video $video) + { + //$this->videoService->setVideoState($video, Video::PROCESSING_THUMBNAIL); + + + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + while (true) { + sleep(1); + + $videos = $this->videoService->getVideosForTranscode(); + foreach ($videos as $video) { + $output->writeln("New video: " . $video->getName() . ", " . $video->getUploader()->getName()); + + $this->handleVideo($video); + + $output->writeln("Done"); + } + } + } +} \ No newline at end of file