Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/04/2009, 12:01
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: problema upload php

En ubuntu me funciona este codigo:

Código php:
Ver original
  1. $file_new = 'video.flv';
  2. $file_pre = 'video.jpg';
  3. $thumb_position = 5; // Segundos, es calculado en base a la duracion del video
  4.  
  5. $ffmpeg_cmd2 = "ffmpeg  -itsoffset -4  -i $file_new -vcodec mjpeg -vframes 1 -an -f rawvideo -s 100x68 $file_pre";
  6. exec($ffmpeg_cmd2);
  7.  
  8. // Verificamos si se creo la imagen, si no... ejecutamos otro proceso
  9. if (!file_exists($file_pre)) {
  10.     $ffmpeg_cmd2 = "ffmpeg -i $file_new -ss $thumb_position -t 00:00:01 -s 100x68 -r 1 -f image2 $file_pre";
  11.     exec("$ffmpeg_cmd2");
  12. }
__________________
- León, Guanajuato
- GV-Foto

Última edición por Triby; 24/04/2009 a las 12:07 Razón: Comillas extraviadas