Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (14)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (4767)

  • what is the good function php to deal with ffmpeg and progress bar [duplicate]

    17 mai 2014, par Abed Soliman

    This question already has an answer here :

    I ask about ffmpeg and progressbar

    I used exec function with ffmpeg and output the result to txt file

    and using some of code I found here to

    <center>



       &lt;?php

       define('RAPIDLEECH', 'yes');
       define('CONFIG_DIR', 'configs/');
       require_once('configs/config.php');
       define ( 'TEMPLATE_DIR', 'templates/'.$options['template_used'].'/' );
       // Include other useful functions
       require_once('classes/other.php');
       error_reporting(0);

       login_check();

       include(TEMPLATE_DIR.'header.php');

       echo ('<br /><br /><br /><b>AudioXtractor</b>, un complemento <br /> que te permite extraer el audio de tus videos.<br /><br /><br />');

       putenv('GDFONTPATH=' . realpath('.')); ?>

       <br />

       <form method="post"><center>
       <table>
         <td>Movie:
       <select>

       &lt;?php
       $exts=array(".ac3", ".avi", ".f4v", ".flv", ".mkv", ".mov", ".mp4", ".mpg", ".mpeg", ".rmvb", ".srt", ".swf", ".wav", ".wmv");
       $ext="";
       function vidlist($dir)
       {
       $results = array();
       $handler = opendir($dir);
       while ($file = readdir($handler))
       {
       if (strrchr($file,'.')!="")
       {
       $ext=strtolower(strrchr($file,'.'));
       }
       if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; in_array($ext,$GLOBALS["exts"]))
       {
       $results[] = $file;
       }
       }
       closedir($handler);
       sort($results);
       return $results;
       }
       function Output($command) {
       $output = array($command);
       exec($command.' 2>&amp;1', $output);
       return ($output);
       }
       $files = vidlist("./files/");
       foreach($files as $file)
       {
           echo '<option value="'.$file.'">'.$file.'</option>';
       }

       ?>


       </select></td></table>

       <br /> >
       New MP3's name:
       <input type="text" value="nuevoaudio" />
       <br /> >
       <br />
       <br />

       <center><input type="submit" style="font-size:16px; font-weight:bold; cursor:pointer;" value="Extract" />
       

       </center></center></form>


       &lt;?php
       if ($_POST['video']!="")

           $video = 'files/';
           $video=array();    
           $video[0] = $_POST['video'];

       if ($_POST['nvdo']!="")

           $nvdo = 'files/';
           $nvdo=array();      
           $nvdo[0] = $_POST['nvdo'];



       foreach ($video as $vdo)
       foreach ($nvdo as $nvd)

       if (isset($_POST["analize"])) {

           exec("ffmpeg -i files/$vdo -ab 192k files/$nvd.mp3 -y 2> files/$nvd.txt");

           $ext=strtolower(strrchr($vdo,'.'));

       /////////////////////////////////////////////////////my code //////////////////////////////////////////

       $content = @file_get_contents("files/$nvd.txt");


           //get duration of source
           preg_match("/Duration: (.*?), start:/", $content, $matches);

           $rawDuration = $matches[1];

           //rawDuration is in 00:00:00.00 format. This converts it to seconds.
           $ar = array_reverse(explode(":", $rawDuration));
           $duration = floatval($ar[0]);
           if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
           if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

           //get the time in the file that is already encoded
           preg_match_all("/time=(.*?) bitrate/", $content, $matches);

           $rawTime = array_pop($matches);

           //this is needed if there is more than one match
           if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

           //rawTime is in 00:00:00.00 format. This converts it to seconds.
           $ar = array_reverse(explode(":", $rawTime));
           $time = floatval($ar[0]);
           if (!empty($ar[1])) $time += intval($ar[1]) * 60;
           if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

           //calculate the progress
           $progress = round(($time/$duration) * 100);




           echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';

           echo ' <a href="http://stackoverflow.com/feeds/tag/files/'.$nvd.'.mp3">'.$nvd.'.mp3</a><br />' . "<br />";
           echo "Duration: " . $duration . "<br />";
           echo "Current Time: " . $time . "<br />";
           echo "Progress: " . $progress . "%" . "<br />";

       //////////////////////////////////////my coed //////////////////////////////////////////////
       }

       ?>
       <br /><br /><a href="http://stackoverflow.com/feeds/tag/index.php">Volver al RapidLeech</a>

       <br /><br /><br />Formatos Aceptados: <br /><b>.ac3, .avi, .f4v, .flv, .mkv, .mov, .mp3,<br /> .mp4, .mpg, .mpeg, .rmvb, .srt, .swf, .wav, .wmv</b>
       <br /><br />
       </center>

       &lt;?php



       ?>

    so i ask some one he told me the exec stop php script and never give me

    You can't get the progress directly if you are using exec, because the php script is stopped until ffmpeg closes. (Because exec returns the whole execution output)

    You should use popen, for being able to get the output from the process in real time (without reading any file) for parse and show the progressbar

    Here is a example for get the output:

    When you get the progress info from ffmpeg, you can use your code for parse it and show your progressbar

    this is my popen script

    &lt;?php

    $handle = popen ("ffmpeg.exe -i files/fz.mp4 -ab 192k files/vdf.mp3 2>&amp;1 ", 'r');
    $handles = (string)$handle;
    $line = "";

    while (false !== ($char = fgetc($handle)))
    {
     if ($char == "\r")
     {
       // You could now parse the $line for status information.
       echo "$line\n";
       $line = "";
     } else {
       $line .= $char;
     }
     ob_flush();
     flush();
    }
    pclose ($handle);


       //get duration of source
       preg_match("/Duration: (.*?), start:/", $handles, $matches);

       $rawDuration = $matches[1];

       //rawDuration is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

       //get the time in the file that is already encoded
       preg_match_all("/time=(.*?) bitrate/", $handles, $matches);

       $rawTime = array_pop($matches);

       //this is needed if there is more than one match
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

       //rawTime is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

       //calculate the progress
       $progress = round(($time/$duration) * 100);




       echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';


       echo "Duration: " . $duration . "<br />";
       echo "Current Time: " . $time . "<br />";
       echo "Progress: " . $progress . "%" . "<br />";

    //////////////////////////////////////my coed //////////////////////////////////////////////

    ?>

    so i dont under stand what is good for ffmpeg progressbAR

    is exec or popen

    so please give me hints for ffmpeg real time progressbar

    what is good for progressbar

    is html5 progress bar

    or javascript progress bar

  • HEVC with alpha [closed]

    3 mai 2024, par foxhable

    I trying create HEVC with alpha video from png images through ffmpeg.

    &#xA;

    When i try, it outputs a video that works, has a transparent background and opens in QuickTime, but does not open in Safari. Then i try creating in prores 4444 codec and convert from macOS Context Menu -> Encode Selected Video Files with HEVC 1080p and Preserve Transparency. It has work - video with transparent background, open in QuickTime and in Safari.

    &#xA;

    So i tried understand what a difference in meta data and only what i find its working video has HVEC encoder, but not working has Lavc61.5.103 hevc_videotoolbox. Can i somehow programmatically or from utilities like ffmpeg create video with HEVC With alpha, which working like from macOS context menu ? macOS context menu doesnt fit because i cant compress or create many videos

    &#xA;

    Detail info

    &#xA;

    I have example of working video. Info from ffprobe

    &#xA;

    ffprobe movie-hevc.mov&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;.\movie-hevc.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt&#xA;    minor_version   : 0&#xA;    compatible_brands: qt&#xA;    creation_time   : 2021-01-02T10:33:38.000000Z&#xA;  Duration: 00:00:09.02, start: 0.000000, bitrate: 4053 kb/s&#xA;  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 4046 kb/s, 60 fps, 60 tbr, 600 tbn (default)&#xA;      Metadata:&#xA;        creation_time   : 2021-01-02T10:33:38.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : HEVC&#xA;

    &#xA;

    Info about video which i create in prores by ffmpeg command, then convert through macOS context menu

    &#xA;

    command :

    &#xA;

    ffmpeg -i a%d.png -r 30 -c:v prores_ks -profile:v 4  -allow_sw 1 -alpha_quality 1 -vtag hvc1 prores.mov&#xA;

    &#xA;

    info after converting

    &#xA;

    ffprobe .\native-hevc.mov&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;.\native-hevc.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt&#xA;    minor_version   : 0&#xA;    compatible_brands: qt&#xA;    creation_time   : 2024-05-03T07:04:26.000000Z&#xA;  Duration: 00:00:12.77, start: 0.000000, bitrate: 8796 kb/s&#xA;  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1920, 8792 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;      Metadata:&#xA;        creation_time   : 2024-05-03T07:04:27.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : HEVC&#xA;

    &#xA;

    Info about video which i`m create direct in hevc by ffmpeg command

    &#xA;

    ffmpeg -i a%d.png -r 30 -c:v hevc_videotoolbox -allow_sw 1 -alpha_quality 1 -vtag hvc1 ffmpeg-hevc.mov&#xA;

    &#xA;

    Info :

    &#xA;

    ffprobe .\ffmpeg-hevc.mov&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;.\ffmpeg-hevc.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt&#xA;    minor_version   : 512&#xA;    compatible_brands: qt&#xA;    encoder         : Lavf61.3.103&#xA;  Duration: 00:00:12.77, start: 0.000000, bitrate: 3437 kb/s&#xA;  Stream #0:0[0x1]: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bottom coded first (swapped)), 1920x1920, 3435 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : FFMP&#xA;        encoder         : Lavc61.5.103 hevc_videotoolbox&#xA;

    &#xA;

    also i tried :

    &#xA;

      &#xA;
    • props -allow_sw 0 - get error
    • &#xA;

    • -alpha-quality 0.75, -pix_fmt bgra - safari not open, QT yes, transparent bg
    • &#xA;

    • without -vtag hvc1 - QuickTime cannot open
    • &#xA;

    • Tried convert from webm to hevc_videotoolbox - safari not open, QT yes, transparent bg
    • &#xA;

    • tried convert webm into pngs and in hevc_videotoolbox - safari not open, QT yes, transparent bg
    • &#xA;

    &#xA;

    Tried answers :

    &#xA;

    &#xA;

    mac info :

    &#xA;

      &#xA;
    • macOS Monterey 12.7.2
    • &#xA;

    • Mac mini (Late 2012)
    • &#xA;

    • Core i5 3210M
    • &#xA;

    • Graphics Intel HD 4000
    • &#xA;

    &#xA;

  • Unable to 'make' android ndk project - build fails : [build-openh264-x86] Error 2

    18 décembre 2015, par NoobNinja

    I’ve attempted these two fixes I’ve found while researching the issue :

    android update project  --23 --/Users/ajswann/Downloads/android-sdk-macosx

    make OS=android NDKROOT=/Users/ajswann/Downloads/android-sdk-macosx TARGET=android-19 ARCH=x86 clean

    ...however neither seems to resolve the issue.

    Any input/suggestions are appreciated.

    P.S.

    I’m running OSX - could this be an issue with attempting to run an x86 architecture on a 64 bit machine ?

    Error Message :

    chris-mini-mac:linphone-android ajswann$ sudo make
    ls: /opt/local/etc/openssl/certs: No such file or directory
    /Users/ajswann/Downloads/android-sdk-macosx/tools/android update project --path . --target android-23
    Updated project.properties
    Updated local.properties
    build.xml: Found version-tag: custom. File will not be updated.
    Updated file ./proguard-project.txt
    It seems that there are sub-projects. If you want to update them
    please use the --subprojects parameter.
    /Users/ajswann/Downloads/android-sdk-macosx/tools/android update test-project --path tests -m .
    Resolved location of main project to: /groupchat/linphone-android/tests
    Updated project.properties
    Updated local.properties
    Updated file tests/proguard-project.txt
    Updated ant.properties
    /Users/ajswann/Downloads/android-sdk-macosx/tools/android update project --path liblinphone_tester --target android-23
    Updated project.properties
    Updated local.properties
    Updated file liblinphone_tester/proguard-project.txt
    ant -e -S clean
    Buildfile: /groupchat/linphone-android/build.xml
    No sub-builds to iterate on
    mkdir -p /groupchat/linphone-android/submodules/externals/openh264/include/wels
    rsync -rvLpgoc --exclude ".git"  /groupchat/linphone-android/submodules/externals/openh264/codec/api/svc/* /groupchat/linphone-android/submodules/externals/openh264/include/wels/.
    building file list ... done

    sent 156 bytes  received 20 bytes  352.00 bytes/sec
    total size is 56216  speedup is 319.41
    mkdir -p /groupchat/linphone-android/submodules/externals/build/openh264
    mkdir -p /groupchat/linphone-android/submodules/externals/build/openh264/arm
    cd /groupchat/linphone-android/submodules/externals/build/openh264/arm \
       &amp;&amp; rsync -rvLpgoc --exclude ".git"  /groupchat/linphone-android/submodules/externals/openh264/* .
    building file list ... done

    sent 18841 bytes  received 20 bytes  37722.00 bytes/sec
    total size is 48272799  speedup is 2559.40
    cd /groupchat/linphone-android/submodules/externals/build/openh264/arm &amp;&amp; \
       make libraries -j4 OS=android ARCH=arm NDKROOT=/Users/ajswann/Downloads/android-ndk-r10e TARGET=android-19
    cd ./ &amp;&amp; sh ./codec/common/generate_version.sh
    Keeping existing codec/common/inc/version_gen.h
    mkdir -p /groupchat/linphone-android/submodules/externals/build/openh264
    mkdir -p /groupchat/linphone-android/submodules/externals/build/openh264/x86
    cd /groupchat/linphone-android/submodules/externals/build/openh264/x86 \
       &amp;&amp; rsync -rvLpgoc --exclude ".git"  /groupchat/linphone-android/submodules/externals/openh264/* .
    building file list ... done

    sent 18841 bytes  received 20 bytes  12574.00 bytes/sec
    total size is 48272799  speedup is 2559.40
    cd /groupchat/linphone-android/submodules/externals/build/openh264/x86 &amp;&amp; \
       make libraries -j4 OS=android ARCH=x86 NDKROOT=/Users/ajswann/Downloads/android-ndk-r10e TARGET=android-19
    cd ./ &amp;&amp; sh ./codec/common/generate_version.sh
    nasm -DX86_32 -f elf -I./codec/common/x86/   -o codec/decoder/core/x86/dct.o codec/decoder/core/x86/dct.asm
    codec/decoder/core/x86/dct.asm:1: error: label or instruction expected at start of line
    codec/decoder/core/x86/dct.asm:144: error: label or instruction expected at start of line
    codec/decoder/core/x86/dct.asm:234: error: symbol `IdctResAddPred_mmx' redefined
    codec/decoder/core/x86/dct.asm:262: error: symbol `WelsBlockZero16x16_sse2' redefined
    codec/decoder/core/x86/dct.asm:276: error: symbol `WelsBlockZero8x8_sse2' redefined
    codec/decoder/core/x86/dct.asm:287: error: label or instruction expected at start of line
    make[1]: *** [codec/decoder/core/x86/dct.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    Keeping existing codec/common/inc/version_gen.h
    make[1]: *** wait: No child processes.  Stop.
    make: *** [build-openh264-x86] Error 2

    Source Repository (I simply clone it, add the platform-tools and tools folder from my android-sdk and run ’make’ and I get this error) :

    https://github.com/TheBaobabTeam/linphone-android