prueba command conversion 3

parent fc6c9b6c
......@@ -32,7 +32,10 @@ class BackendPrepararVideoCommand extends Command {
->setDescription('Comando de ejemplo que sirve para generar los archivos de un video')
;
}
//Se debe considerar agregar la definicion de .m3u8 y .ts en apache o nginx, para que el content type de estos sea el correcto.
// m3u8 ---> mime type : application/x-mpegURL
// ts ---> mime type : video/MP2T
protected function execute(InputInterface $input, OutputInterface $output) {
$log = Utiles::setLog('App\Command::BackendPrepararVideoCommand', 'command/prepararVideo');
$io = new SymfonyStyle($input, $output);
......@@ -45,22 +48,17 @@ class BackendPrepararVideoCommand extends Command {
$rutaPublica = Utiles::getPublicRoot() . "/videos";
$inicio = time();
$fin = $inicio + ($executionTime * 60) - ($executionClientTimeout * 60);
//$io->warning('El comando inicio en la fecha y hora: ' . date('d/m/Y H:i:s', $inicio));
//$io->warning('El comando debe terminar antes de la fecha y hora: ' . date('d/m/Y H:i:s', $fin));
//$log->debug('El comando inicio en la fecha y hora: ' . date('d/m/Y H:i:s', $inicio));
//$log->debug('El comando debe terminar antes de la fecha y hora: ' . date('d/m/Y H:i:s', $fin));
// while ($inicio < $fin) {
//ruta de prueba con archivo mp4
$servidor = "/opt/sdp/hitsahora/www/web/uploads/contenidos/6/video/2016/42/video_92040.mp4";
$io->success("Procesando Video....");
$rutaArchivoVideoOriginal = "$servidor";
//ruta donde quedara el archivo m3u8, debe ser accesible.
$rutaArchivoVideoM3u8 = "$rutaPublica/0/video.m3u8";
if (!file_exists("$rutaPublica/0")) {
mkdir("$rutaPublica/0", 0777, true);
}
//argumentos del comando a ejecutar para convertir de mp4 a m3u8 hls
$argumentMp4ToM3u8 = "-y -i $rutaArchivoVideoOriginal -profile:v baseline -level 3.0 -s 1920x1080 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls $rutaArchivoVideoM3u8";
//ejecucion programa con ruta del padre
......@@ -75,7 +73,6 @@ class BackendPrepararVideoCommand extends Command {
}
$inicio = time();
//}
$log->debug("Finalizando ejecucion de command BackendPrepararVideoCommand ... ");
$io->success('COMANDO PREPARACION VIDEOS EJECUTADO');
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment