Cevaplar
-
http://www.uzmansorusu.com/soru/2006
bu sorudaki cevap ile.-
sharq
orda dediğinden bişi anlamadım baktım ama hiç birşey anlamadım :S12 yıl önce yazılmış -
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
dosya nerde daha açık yazarmısın birşey anlamadım12 yıl önce yazılmış
-
-
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
Bunu Nasıl Kullanacağız peki?11 yıl önce yazılmış
-