Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (77)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (8228)

  • I have a ffmpeg command to concatenate 300+ videos of different formats. What is the proper syntax for the concat complex filter ?

    25 avril 2022, par jokoon

    I plan to concatenate a large amount of video files of different formats and resolution, some without sound, and add a short black screen "pause" of about 0.5s between each.

    &#xA;

    I wrote a python script to generate such command.

    &#xA;

    I created a 0.5s video file using ffmpeg.exe -t 0.5 -f lavfi -i color=c=black:s=640x480 -c:v libx264 -tune stillimage -pix_fmt yuv420p blank500ms.mp4.

    &#xA;

    I then added a silent audio to it with -f lavfi -i anullsrc -c:v copy -c:a aac -shortest

    &#xA;

    I now have the problem of adding a blank audio track for streams without one, but I don't want to generate new file, I want to add it to my complex filter.

    &#xA;

    This is my complex script and generate command.

    &#xA;

    The command (there are line returns, because I send this with the python subprocess module)

    &#xA;

    ffmpeg.exe&#xA;-i&#xA;input0.mp4&#xA;-i&#xA;input1.mp4&#xA;-i&#xA;input2.mp4&#xA;-i&#xA;input3.mp4&#xA;-i&#xA;input4.mp4&#xA;-i&#xA;input5.mp4&#xA;-i&#xA;input6.mp4&#xA;-i&#xA;input7.mp4&#xA;-i&#xA;input8.mp4&#xA;-i&#xA;input9.mp4&#xA;-i&#xA;input10.mp4&#xA;-f&#xA;lavfi&#xA;-i&#xA;anullsrc&#xA;-filter_complex_script&#xA;C:/filter_complex_script.txt&#xA;-map&#xA;"[final_video]"&#xA;-map&#xA;"[final_audio]"&#xA;output.mp4&#xA;

    &#xA;

    The complex_filter_script :

    &#xA;

    [0]fps=24[fps0];&#xA;[fps0]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled0];&#xA;[1]fps=24[fps1];&#xA;[fps1]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled1];&#xA;[2]fps=24[fps2];&#xA;[fps2]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled2];&#xA;[3]fps=24[fps3];&#xA;[fps3]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled3];&#xA;[4]fps=24[fps4];&#xA;[fps4]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled4];&#xA;[5]fps=24[fps5];&#xA;[fps5]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled5];&#xA;[6]fps=24[fps6];&#xA;[fps6]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled6];&#xA;[7]fps=24[fps7];&#xA;[fps7]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled7];&#xA;[8]fps=24[fps8];&#xA;[fps8]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled8];&#xA;[9]fps=24[fps9];&#xA;[fps9]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled9];&#xA;[10]fps=24[fps10];&#xA;[fps10]scale=480:270:force_original_aspect_ratio=decrease,pad=480:270:(ow-iw)/2:(oh-ih)/2,setsar=1,setpts=PTS-STARTPTS[rescaled10];&#xA;[10]split=10[blank0][blank1][blank2][blank3][blank4][blank5][blank6][blank7][blank8][blank9];&#xA;[rescaled0:v][0:a][blank0][rescaled1:v][1:a][blank1][rescaled2:v][2:a][blank2][rescaled3:v][3:a][blank3][rescaled4:v][4:a][blank4][rescaled5:v][5:a][blank5][rescaled6:v][11:a][blank6][rescaled7:v][11:a][blank7][rescaled8:v][11:a][blank8][rescaled9:v][11:a][blank9]concat=n=22:v=1:a=1[final_video][final_audio]&#xA;

    &#xA;

    As you can see, some video use [11:a], because it's a silent audio stream.

    &#xA;

    input10.mp4, mapped to [10] and then split (or "cloned") into blanked0 to 9, is a short pause separator.

    &#xA;

    ffmpeg tells me the error

    &#xA;

    [Parsed_split_55 @ 000001591c33b280] Media type mismatch between the &#x27;Parsed_split_55&#x27; filter output pad 1 (video) and the &#x27;Parsed_concat_56&#x27; filter input pad 5 (audio)&#xA;[AVFilterGraph @ 000001591bf1e6c0] Cannot create the link split:1 -> concat:5&#xA;Error initializing complex filters.&#xA;Invalid argument&#xA;

    &#xA;

    I'm a bit lost when it comes to using the [X:Y:Z] syntax, and how the order matter in the concat argument list.

    &#xA;

    I'm open to any other suggestion to solve my problem. I would rather do this in a single command, without intermediate file.

    &#xA;

    EDIT :

    &#xA;

    For details, I already wrote a large concat+xstack filter that worked well with 8GB of memory.

    &#xA;

    In this case, there are a lot of inputs, but those inputs are small, most of them are between 1 and 10MB, so it would probably not generate out-of-memory problems, although I'm not certain.

    &#xA;

  • Getting know how much progress has ffmpeg done in C#

    29 décembre 2022, par Aenye_Cerbin

    I'm writing an app that uses ffmpeg to convert audio/video files.&#xA;I can call ffmpeg and specify it's options, I can see that it's working.&#xA;I want to be able to check how much of the job is done, so I can present it to user.&#xA;As I've read ffmpeg doesn't support any progress bar or percentage and ffmpeg console output is not very friendly, so I cannot simply show it's output to user, because it will look awful. I am not using any wrapper and do not plan to use any because I need to write my own backend that call ffmpeg and frontend to communicate with user.

    &#xA;

    I'm using System.Threading to start ffmpeg in new process, I can say if the process is running, or get it's exit code, but I don't see any way to get info about how much of the job is done. I thought I can simply measure input file size and check periodically output file size, but it won't be any accurate, because the output file will have different size depending on what codec and container we use.&#xA;I've read I can also use frame progress, but the way of obtaining it is still not clear to me. I also need to do it for audio files.

    &#xA;

    Is there any reasonable way to do so ?

    &#xA;

  • Failed to convert web-saved .wemb audio to .wav by using php "shell_exec" and javascript

    30 mai 2022, par Anirbasgnaw

    I'm working on an online experimenter which could record participants' audio from the browser. The audio data I get has an extension of .wemb, so I plan to use ffmpeg to convert it to .wav while I save the data.

    &#xA;

    I tried to use PHP's shell_exec but nothing happens when I run the scripts. Then I found that my echo and print_r also did not work. I'm new to PHP and javascript, so I''m really confused now.

    &#xA;

    Below are the relevant codes, I really appreciate it if you could help !

    &#xA;

    write_data.php :

    &#xA;

    &lt;?php&#xA;  $post_data = json_decode(file_get_contents(&#x27;php://input&#x27;), true); &#xA;  // the directory "data" must be writable by the server&#xA;  $name = "../".$post_data[&#x27;filename&#x27;];&#xA;  $data = $post_data[&#x27;filedata&#x27;];&#xA;   // write the file to disk&#xA;  file_put_contents($name, $data);&#xA;  &#xA;  $INPUT = trim($name) . ".webm";&#xA;  $OUTPUT = trim($name) . ".wav";&#xA;  echo "start converting...";&#xA;&#xA;  // check if ffmprg is available&#xA;  $ffmpeg = trim(shell_exec(&#x27;which ffmpeg&#x27;));&#xA;  print_r($ffmpeg);&#xA;  // call ffmpeg&#xA;  shell_exec("ffmpeg -i &#x27;$INPUT&#x27; -ac 1 -f wav &#x27;$OUTPUT&#x27; 2>&amp;1 ");&#xA;?>&#xA;

    &#xA;

    javascript :

    &#xA;

      saveData: function(fileName,format){&#xA;    // save  as json by default&#xA;    if (!format){ format = &#x27;json&#x27;;}&#xA;    // add extension to filename&#xA;    fileName = `${fileName}.${format}`&#xA;    // create saveData object using fetch&#xA;    let saveData = [];&#xA;    if (format == &#x27;json&#x27;) {&#xA;        saveData = {&#xA;          type: &#x27;call-function&#x27;,&#xA;          async: true,&#xA;          func: async function(done) {&#xA;            let data = jsPsych.data.get().json();&#xA;            const response = await fetch("../write_data.php", {&#xA;              method: "POST",&#xA;              headers: {&#xA;                "content-type": "application/json"&#xA;              },&#xA;              body: JSON.stringify({ filename: fileName, filedata: data })&#xA;            });&#xA;            if (response.ok) {&#xA;              const responseBody = await response.text();&#xA;              done(responseBody);&#xA;            }&#xA;          }&#xA;        }&#xA;    } else {&#xA;        saveData = {&#xA;          type: &#x27;call-function&#x27;,&#xA;          async: true,&#xA;          func: async function(done) {&#xA;            let data = jsPsych.data.get().csv();&#xA;            const response = await fetch("../write_data.php", {&#xA;              method: "POST",&#xA;              headers: {&#xA;                "content-type": "application/json"&#xA;              },&#xA;              body: JSON.stringify({ filename: fileName, filedata: data })&#xA;            });&#xA;            if (response.ok) {&#xA;              const responseBody = await response.text();&#xA;              done(responseBody);&#xA;            }&#xA;          }&#xA;        }&#xA;    }&#xA;    return saveData;&#xA;  },&#xA;

    &#xA;