Kodları lütfen aşağıdaki butonları kullanarak renklendirin. Örnek: <php> echo "Selam Dünya"; </php>
Yardım
karakter kaldı

PHP İLE VİDEO FORMATINI DEĞİŞTİRME

Merhaba Arkadaşlar PHP'ile Video Formatını Nasıl Değiştirebilirim Yardım Edermisinz ?
+0
-0
Cevaba KatılıyorumKatılmıyorum
Cevap Yaz Yorum Yaz Arşivime Ekle Takip Et

Cevaplar

  • Supervisor adlı üyenin fotoğrafı
    12 yıl önce yazılmış
    107 cevap - 0 soru
    http://www.uzmansorusu.com/soru/2006

    bu sorudaki cevap ile.
    • sharq adlı üyenin fotoğrafı sharq
      orda dediğinden bişi anlamadım baktım ama hiç birşey anlamadım :S
      12 yıl önce yazılmış
    • Supervisor adlı üyenin fotoğrafı Supervisor
      http://ffmpeg.org/ffmpeg.html#SEC21

      dosyayi indiriyorsun .
      ornek olarak
      ffmpeg -i source_video.avi input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X final_video.mp4

      seklindeki bir komut ile avi dosyayi mp4 e cevirebilirsin .
      12 yıl önce yazılmış
    • sharq adlı üyenin fotoğrafı sharq
      dosya nerde daha açık yazarmısın birşey anlamadım
      12 yıl önce yazılmış
  • tapsin adlı üyenin fotoğrafı
    12 yıl önce yazılmış
    147 cevap - 0 soru
    Basit bir sınıf vereyim kullan..
    Bu flv çevirir videoları

    class Videoflv
    {
        const FFMPEG = '/usr/bin/ffmpeg';
        const FLVTOOL2 = '/usr/bin/flvtool2';
        /**
      * exportToFlv ($file, $destination, $export_thumb=false, $thumbnail_destination=null)
      */
      public static function exportToFlv ($file, $destination, $export_thumb=false, $thumbnail_destination=null)
      {
          // export flv
          exec(sprintf('%s -i %s -ar 11025 -ab 28k -aspect 4:3 -b 100k -r 6 -f flv -s 320x240 -y %s | %s -U stdin %s > /dev/null 2>&1', self::FFMPEG, $file, $destination, self::FLVTOOL2, $destination));
    
          // export thumb
          if($export_thumb)
          {
              sleep(1); // sleep for a little while | lol
              // calculate export time frame
              $video_file = new ffmpeg_movie($file);
            $video_length = self::get_time_frame(ceil($video_file->getDuration()));
            self::exportVideoThumb ($file, $thumbnail_destination, false, $video_length);
          }
      }
      
      /**
      * exportVideoThumb ($file, $destination, $calculate_size=true, $video_length='00:00:01')
      */
      public static function exportVideoThumb ($file, $destination, $calculate_size=true, $video_length='00:00:01')
      {
          if($calculate_size)
          {
            $video_file = new ffmpeg_movie($file);
              // calculate export time frame
              $video_length = self::get_time_frame(ceil($video_file->getDuration()));
          }
            // export thumbnail
          exec(sprintf('%s -i %s -an -ss 1 -t %s -vcodec mjpeg -vframes 1 -an -f rawvideo -y -s 320x240 %s > /dev/null 2>&1', self::FFMPEG, $file, $video_length, $destination));
      }
      
      /**
      * get_time_frame($t)
      * 
      * return video time frame 
      */
      public static function get_time_frame($t)
        {
          if((int) $t > 60) return '00:00:50'; // bigger than a minute
          else if((int) $t > 30) return '00:00:25'; // bigger than 30 seconds
          else if((int) $t > 15) return '00:00:10'; // bigger than 15 seconds
          else return '00:00:01'; // opps!
        }
    }
    
    • sharq adlı üyenin fotoğrafı sharq
      Bunu Nasıl Kullanacağız peki?
      11 yıl önce yazılmış