Recherche avancée

Médias (91)

Autres articles (69)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (16159)

  • How to trim and merge using Fluent FFMpeg ?

    29 juillet 2016, par John D.

    Here’s what I want to do with fluent-ffmpeg :

    I have 3 input files. An intro, main, and outro video. I wish to merge the three, while trimming the main video. Here is my code :

    var ffmpegCommand = ffmpeg();
    ffmpegCommand.addInput(introVideo);
    ffmpegCommand.addInput(mainVideo).seekInput(20).duration(3);
    ffmpegCommand.addInput(outroVideo);
    ffmpegCommand.on('error', function(err, stdout, stderr){
     console.log("FAILED!\n\t"+err+"\n\t"+stdout+"\n\t"+stderr);
    });
    ffmpegCommand.on('end', function(){
     console.log('COMPLETE!');
    });
    ffmpegCommand.on('start', function(commandLine) {
     console.log('Spawned Ffmpeg with command: ' + commandLine);
    });
    ffmpegCommand.mergeToFile('final.mp4', './vid_files/tmp');

    The program executes fine, but when I ffplay final.mp4, the result is that introVideo plays then the video appears to freeze. According to the fluent-ffmpeg documentation, it states "Each of these [Input options] methods apply on the last input added". So I can’t figure out why that syntax doesn’t seem to work...

    How can I trim the main video to send to mergeToFile ?

    Note that this works fine if I don’t have .seekinput(20).duration(3) on the second addInput.

    Oh, here’s the outputted commandLine value :

    ffmpeg -i ./vid_files/intro.mp4 -ss 20 -i ./vid_files/main.mp4 -i ./vid_files/outro.mp4 -y -filter_complex concat=n=3:v=1:a=1 -t 3 final.mp4
  • Can't write video using moviepy. output format error

    23 décembre 2022, par Ronnie Kisor

    I'm trying to concatenate videos in each folder so that I get one video in each folder instead of multiple short ones. This is an external USB drive if that matters.

    


    My code seems to iterate over the files as expected, but I keep getting this error after the audio is written, during the "writing video" action, I believe : b"[NULL @ 000002a8340ae640] Unable to find a suitable output format for 'D:\\taxes\\folder\\test'\r\nD:\\taxes\\folder\\test: Invalid argument\r\n"

    


    I haven't found a way to force an output format yet. Any thoughts ?

    


    import os
from moviepy.editor import *

startingDir = r'D:\taxes'

avoid = ['0incomplete', 'old', 'that', 'this']

for thing in os.listdir(startingDir):
    clips = []
    name = ''
    
    if thing in avoid:
        print('                              avoided {}'.format(thing))
        continue

    folder = os.path.join(startingDir, thing)

    if os.path.isdir(folder):
        for clip in os.listdir(folder):
            print (clip)
            clips.append(VideoFileClip(os.path.join(folder, clip)))
        print('\n')

        try:
            final = concatenate_videoclips(clips)
            final.write_videofile(os.path.join(folder, 'test'), audio=True, codec='libx264', threads=10)
            final.close() 
        except Exception as e:
            print (e)
            print('\n Continuing... \n\n')
            continue


    


  • ffmpeg ProcessBuilder No such file or directory

    24 avril 2020, par silentsudo

    I am trying to get media duration using ffmpeg command from a java program. I am calling this method from within spring boot application.
I am using ProcessBuilder.

    



    File object is valid and exists for privacy I have replaced file path in error logs.

    



    My Code is as below :

    



    private String getMediaDuration(File file) {
        final String command = "/usr/bin/ffmpeg -version";//-i " + file.getAbsolutePath() + " 2>&1 | grep Duration | cut -c 13-20";
        try {
            ProcessBuilder builder = new ProcessBuilder("/usr/bin/ffmpeg",
                    "-version");
            builder.directory(file.getParentFile());

            System.out.println("Directory : " + builder.directory().exists());
            System.out.println("Directory : " + builder.directory().getAbsolutePath());
            final Process process = builder.start();
            final InputStream is = process.getInputStream();
            final InputStreamReader isr = new InputStreamReader(is);
            final BufferedReader br = new BufferedReader(isr);
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
            return line;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }


    



    Unfortunately nothing seems to be working
Error below :

    



    java.io.IOException: Cannot run program "/usr/bin/ffmpeg -version" (in directory "/abc/xyz"): error=2, No such file or directory&#xA;    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)&#xA;    at ....getMediaDuration(FFmpegRunner.java:208)&#xA;    at ....ffmpegprocessor.FFmpegRunner.run(FFmpegRunner.java:61)&#xA;    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&#xA;    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&#xA;    at java.lang.Thread.run(Thread.java:748)&#xA;Caused by: java.io.IOException: error=2, No such file or directory&#xA;    at java.lang.UNIXProcess.forkAndExec(Native Method)&#xA;    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)&#xA;    at java.lang.ProcessImpl.start(ProcessImpl.java:134)&#xA;    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)&#xA;    ... 5 more&#xA;</init>

    &#xA;&#xA;

    Output for whereis ffmpeg

    &#xA;&#xA;

    ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz&#xA;

    &#xA;&#xA;

    Please help me understand where it is going wrong. Thank you.

    &#xA;