Recherche avancée

Médias (91)

Autres articles (52)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (7733)

  • imageJpeg and FFMPEG in windows vs linux

    25 janvier 2020, par Tanmay Gawankar

    I have a working code for converting image to a 5 seconds video using FFMPEG.

    The problem is, The code only works for downloaded images, FFMPEG doesn’t convert image to video when image is generated programmatically ONLY IN LINUX.

    PHP code

    <?php
       $downloadedF="folder/d.jpg";
       $downloadedV="folder/d.mp4";
       $renderedF="folder/r.jpg";
       $renderedV="folder/r.mp4";

       $op_d=shell_exec("ffmpeg -r 1/5 -i ".$downloadedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$downloadedV);
       $op_r=shell_exec("ffmpeg -r 1/5 -i ".$renderedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$renderedV);

       echo "Errors:<br />".$op_d."<br /><br />".$op_r;
    ?>

    The d.mp4(or output for downloaded image) is getting generated for both Windows and Linux
    The r.mp4(or output for rendered image) gets generated only in Windows and 48 bytes empty file is getting created in Linux

    System :

    XAMPP on Windows 10(Development)
    Godaddy Starter plan hosting - Linux(Probably redhat)(Production)

    File Structure

    root folder
       |-index.php
       |-ffmpeg (will be ffmpeg.exe in Windows)
       |-folder
           |-d.jpg (random downloaded image from google)
           |-d.mp4 (Will be created - video converted from downloaded image)
           |-r.jpg (rendered image using php imagejpg)
           |-r.mp4 (Will be created - video converted from rendered image)

    Rendered Image Code :

    $imgFF = imagecreatetruecolor($videoWidth, $videoHeight);
    //---adding many text using imagettftext();
    imagejpeg($imgFF, $path."-000.jpg");  //for this example, I copied output to folder as r.jpg

    Edit 1 :

    The return value of shell_exec has no error/output even after adding

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    Edit 2 :

    The log for successful conversion can be found at Here
    The log for unsuccessful conversion of rendered image can be found at Here

    Note :

    • The scenario here is minimized and code is separated from long code.
    • In Linux command i add ./ for FFMPEG

  • Mute parts of Wave file using Python/FFMPEG/Pydub

    20 avril 2020, par Adil Azeem

    I am new to Python, please bear with me. I have been able to get so far with the help of Google/StackOverflow and youtube :). So I have a long (2 hours) *.wav file. I want to mute certain parts of that file. I have all of those [start], [stop] timestamps in the "Timestamps.txt" file in seconds. Like this :

    &#xA;&#xA;

       0001.000 0003.000&#xA;   0744.096 0747.096&#xA;   0749.003 0750.653&#xA;   0750.934 0753.170&#xA;   0753.210 0754.990&#xA;   0756.075 0759.075&#xA;   0760.096 0763.096&#xA;   0810.016 0811.016&#xA;   0815.849 0816.849&#xA;

    &#xA;&#xA;

    What I have been able to do is read the file and isolate each tuple. I have just output the first tuple and printed it to check if everything looks good. It seems that the isolation of tuple works :) I plan to count the number of tuples (which is 674 in this case) and put in a 'for loop' according to that count and change the start and stop time according to the tuple. Perform the loop on that single *.wav file and output on file with muted sections as the timestamps. I have no idea how to implement my thinking with FFMPEG or any other utility in Python e.g pydub. Please help me.

    &#xA;&#xA;

       with open(&#x27;Timestamps.txt&#x27;) as f:&#xA;   data = [line.split() for line in f.readlines()]&#xA;   out = [(float(k), float(v)) for k, v in data]&#xA;&#xA;   r = out[0] &#xA;   x= r[0]&#xA;   y= r[1]&#xA;   #specific x and y values&#xA;   print(x)&#xA;   print(y)&#xA;

    &#xA;

  • how to create video from ffmpeg ?

    4 mai 2020, par Hong

    I have 10 images, 2 videos(mov, mp4) and 1 audio.

    &#xA;&#xA;

    My plan is

    &#xA;&#xA;

      &#xA;
    1. create images to video (images.mp4)
    2. &#xA;

    &#xA;&#xA;

    ffmpeg -framerate 0.75 -pattern_type glob -i &#x27;*.png&#x27; \&#xA; -c:v libx264 -vf "format=yuv420p,pad=ceil(iw/2)*2:ceil(ih/2)*2" -r 30 -pix_fmt yuv420p out.mp4  &#xA;

    &#xA;&#xA;

      &#xA;
    1. concat videos&#xA;filelist :
    2. &#xA;

    &#xA;&#xA;

    file &#x27;images.mp4&#x27;&#xA;file &#x27;video1.mov&#x27;&#xA;file &#x27;video2.mp4&#x27;&#xA;

    &#xA;&#xA;

    2-1 )&#xA;ffmpeg -f concat -safe 0 -i filelist.txt -auto_convert 1 -c copy output.mp4

    &#xA;&#xA;

    2-2 ) first. i'm encode mov to mp4. and change filelist.txt

    &#xA;&#xA;

    file &#x27;images.mp4&#x27;&#xA;file &#x27;video1.mp4&#x27;&#xA;file &#x27;video2.mp4&#x27;&#xA;ffmpeg -f concat -safe 0 -i filelist.txt -auto_convert 1 -c copy output.mp4&#xA;

    &#xA;&#xA;

      &#xA;
    1. add background music.&#xA;It has not yet reached this stage.&#xA;It's blocked in plan 2.
    2. &#xA;

    &#xA;&#xA;

    this plan is right ?&#xA;I'm not sure about this plan.

    &#xA;&#xA;

    Step 2 output is strange.&#xA;The frame of the video No. 1 and No. 2 is not smooth.

    &#xA;&#xA;

    How can I create video from images and meger another video.

    &#xA;