ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Программирование > PHP, PERL, MySQL, JavaScript
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

Создание php видео конвертера под win
  #1  
Старый 20.01.2009, 21:04
Аватар для Vinsik
Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме:
203408

Репутация: 7
По умолчанию Создание php видео конвертера под win

Скачал я в ообщем http://sourceforge.net/project/downloading.php?group_id=122353&use_mirror=interna p&filename=ffmpeg_common_dll.rar&97908700 ниче там не понятно.
Как настроить конвертацию flv to avi на веб странице?
Вот код шары.
PHP код:
<?


    
include("include/common.php");
    
    if(
$loggedin){
        include(
"include/accmenu.php");
    }
    if( 
$_POST['submit'] && $_FILES['attached']['name'] ){
        
$ok_filetypes explode("|",$att_filetypes);
        if (!
$_FILES['attached']['error'] && $_FILES['attached']['size'] > $att_max_size*1024){
            
errform('<CENTER>Извините, слишком большой размер файла!</CENTER><BR><BR>'); // #err
            
$step 1;
        }
        
$filename = (!$_FILES['attached']['error'] ? substrbasename($_FILES['attached']['name']), -30 ) : '');
        
$x strtolowersubstr($_FILES['attached']['name'], -3));
        if(
$filename && !in_array($x$ok_filetypes) ){
            
errform('<CENTER>Не поддерживаемый тип файла!!!</CENTER><BR><BR>');
            
$step 1;
        }
        if(!
$posterr){
            if(!isset(
$_GET["ipaddress"]) || ($_GET["ipaddress"] == "")) {
                
$ipaddress $_SERVER['REMOTE_ADDR'];
                
$local 1;
            } else {
                
$ipaddress $_GET["ipaddress"];
                
$local 0;
            }
    

         
$ru=array("&","а","б","в"," ","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь","э","ю","я");
         
$tr=array("_","a","b","v","_","g","d","e","oh","zh","z","i","j","k","l","m","n","o","p","r","s","t","u","f","x","c","ch","sh","w","qh","y","q","eh","ju","ja");

            
$attach_name substr($_FILES['attached']['name'], 0strrpos($_FILES['attached']['name'], '.'));
         
$uniq strtolower(str_replace($ru,$tr,$attach_name));
         
$ext substr($_FILES['attached']['name'], strrpos($_FILES['attached']['name'], '.') + 1);

         if (
file_exists($att_path."/".$uniq.".".$ext)) $uniq $uniq '(copy)';

            
move_uploaded_file($_FILES['attached']['tmp_name'], $att_path."/".$uniq.".".$ext );
            
$strQuery  "INSERT INTO images25 SET ";
              
$strQuery .= "filename='($uniq.$ext)',"
                
$strQuery .= "ipaddress='{$ipaddress}',";
                
$strQuery .= "date='".time()."',";
            if(
$myuid){
                
$strQuery .= "user='{$myuid}',";
            }
            
$strQuery .= "status='1'";

            
$result mysql_query($strQuery) or die( mysql_error() );
            
$aid mysql_insert_id();
            if(
$aid){
                
$filen $siteurl."/".str_replace('./'''$att_path)."/".$uniq.".$ext";
                
$filen str_replace('http://','%%',$filen);
                
$filen str_replace('//','/',$filen);
                
$filen str_replace('%%','http://',$filen);

                
                
//ITS AN IMAGE
                
if($x=="jpg" or $x=="jpeg" or $x=="gif" or $x=="png" or $x=="jif" or $x=="jfif")
                {
                    
$filenx=$filen;
                }
                else
                {
                    include(
"include/const.inc.php");
                    
$filenx $siteurl."/icons/".$Icons[$ext];
                }


                
$step 2;
            }else{
                
$step 1;
            }
        }
    }else{
        
$step 1;
    }
    if(
$step == 1){


    
?>
 
Ответить с цитированием

  #2  
Старый 20.01.2009, 21:11
Аватар для Vinsik
Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме:
203408

Репутация: 7
По умолчанию

сори, avi to flv
 
Ответить с цитированием

  #3  
Старый 20.01.2009, 21:30
Аватар для nerezus
nerezus
Pagan Heart
Регистрация: 12.08.2004
Сообщений: 3,791
Провел на форуме:
6490435

Репутация: 2290


Отправить сообщение для nerezus с помощью ICQ
По умолчанию

PHP код:
function video_convert_to_flv($input$output="output.flv"$custom=false) {
    if (!
$custom) {
        
$custom = array(56300320240);
    }
    
$command sprintf('mencoder "%s" -o "%s" -of lavf -oac mp3lame -lameopts ' .
        
'abr:br=%d -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=%d:mbd=2:' .
        
'mv0:trell:v4mv:cbp:last_pred=3 scale=%d:%d',
        
$input$output$custom[0], $custom[1], $custom[2], $custom[3]);
    
run($command);
    
run("flvtool2 -UP \"$output\""); // update metadata

 
Ответить с цитированием

  #4  
Старый 20.01.2009, 21:52
Аватар для Vinsik
Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме:
203408

Репутация: 7
По умолчанию

Цитата:
Сообщение от nerezus  
PHP код:
function video_convert_to_flv($input$output="output.flv"$custom=false) {
    if (!
$custom) {
        
$custom = array(56300320240);
    }
    
$command sprintf('mencoder "%s" -o "%s" -of lavf -oac mp3lame -lameopts ' .
        
'abr:br=%d -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=%d:mbd=2:' .
        
'mv0:trell:v4mv:cbp:last_pred=3 scale=%d:%d',
        
$input$output$custom[0], $custom[1], $custom[2], $custom[3]);
    
run($command);
    
run("flvtool2 -UP \"$output\""); // update metadata

А по подробнее можно? Там куча файлов и хз че куда пихать....
 
Ответить с цитированием

  #5  
Старый 21.01.2009, 07:59
Аватар для Vinsik
Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме:
203408

Репутация: 7
По умолчанию

в интернете нет ни одного подробного мануала установки под (win)
 
Ответить с цитированием
Ответ



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Хостинги под всё! »Atom1c« ПО для Web разработчика 29 10.02.2009 17:56
Безопасность в Php, Часть Iii k00p3r Чужие Статьи 0 11.07.2005 19:02
Защищаем Php. Шаг за шагом. k00p3r Чужие Статьи 0 13.06.2005 11:31



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ