Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (71)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6034)

  • ffmpeg converter php script not working as expected

    8 juillet 2012, par mintuz

    I have been looking into a php video converter method and have followed a tutorial on how to get one set up. It can read the source video file fine, my script shows an md5, fps rate, bit rate etc but it does not create the destination file. Any suggestions on why my code is not working.

    I have tried both system() ; and exec() ; commands, both do not work and safe_mode is off. I have also tried a more basic command

    "/usr/bin/ffmpeg -i /home/mintuz/video.avi /var/www/video.flv"

    This command however works through the terminal.

    <?php
    define('FFMPEG_LIBRARY', '/usr/bin/ffmpeg');

    //ALTER STUFF HERE
    $srcFile = "/home/mintuz/video.avi"; //source file
    $destFile = "/var/www/video.flv"; //destination file


    if (strpos($srcFile, '.avi'))
    {
       $type = "avi";
       echo $type;
    }

    if (strpos($srcFile, '.mp4'))
    {
       $type = "mp4";
       echo $type;
    }

    if (strpos($srcFile, '.mov'))
    {
       $type = "mov";
       echo $type;
    }

    //-------------------------------------------------------------------------------------------------------------------
    // Create our FFMPEG-PHP class
    $ffmpegObj = new ffmpeg_movie($srcFile);

    // Save our needed variables
    $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
    echo "<br />".$srcWidth."<br />";

    $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
    echo $srcHeight."<br />";

    $srcFPS = $ffmpegObj->getFrameRate();
    echo $srcFPS."<br />";

    $srcAB = intval($ffmpegObj->getAudioBitRate()/1000);  
    $srcAR = $ffmpegObj->getAudioSampleRate();  

    // Call our convert using exec()
    $cmd = FFMPEG_LIBRARY." -i ".$srcFile." -ar ".$srcAR." -ab ".$srcAB." -f flv -s ".$srcWidth."x".$srcHeight." ".$destFile;
    system($cmd);

    echo "Source File MD5 : ".md5_file($srcFile)."<br />";
    echo "Destination File MD5 : ".md5_file($destFile);

    // Make multiples function
    function makeMultipleTwo ($value)
    {
       $sType = gettype($value/2);
       if($sType == "integer")
       {
           return $value;
       } else {
           return ($value-1);
       }
    }
    ?>
  • Writing numpy arrays using cv2 VideoWriter

    8 juillet 2015, par JustInTime

    I have a problem with writing a toy example video using opencv2.3.1 VideoWriter, here is how I do it :

    writer = cv2.VideoWriter('test1.avi',cv.CV_FOURCC('P','I','M','1'),25,(640,480))
    for i in range(1000):
       x = np.random.randint(10,size=(480,640)).astype('uint8')
       writer.write(x)
    #del writer (with or without tested)

    I tried every possible combination resulting with a 0 bytes file if the extension was mpg, and 5.5kb if it was avi. I should say that some pointed out that I should build the ffmpeg library from source and not apt-get it. Well I did that on a fresh machine based on the help of this site http://vinayhacks.blogspot.com/2011/11/installing-opencv-231-with-ffmpeg-on-64.html. which also presented an error while compiling opencv(the error was related to ffmpeg). Now I am really out of ideas, How to generate a video using OPENCV ?

    Thanks in advance

  • Writing numpy arrays using cv2 VideoWriter

    8 juillet 2015, par JustInTime

    I have a problem with writing a toy example video using opencv2.3.1 VideoWriter, here is how I do it :

    writer = cv2.VideoWriter('test1.avi',cv.CV_FOURCC('P','I','M','1'),25,(640,480))
    for i in range(1000):
       x = np.random.randint(10,size=(480,640)).astype('uint8')
       writer.write(x)
    #del writer (with or without tested)

    I tried every possible combination resulting with a 0 bytes file if the extension was mpg, and 5.5kb if it was avi. I should say that some pointed out that I should build the ffmpeg library from source and not apt-get it. Well I did that on a fresh machine based on the help of this site http://vinayhacks.blogspot.com/2011/11/installing-opencv-231-with-ffmpeg-on-64.html. which also presented an error while compiling opencv(the error was related to ffmpeg). Now I am really out of ideas, How to generate a video using OPENCV ?

    Thanks in advance