Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (61)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • 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 (...)

Sur d’autres sites (7564)

  • 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;

  • 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.

    &#xA;

    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 &#x27;D:\\taxes\\folder\\test&#x27;\r\nD:\\taxes\\folder\\test: Invalid argument\r\n"

    &#xA;

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

    &#xA;

    import os&#xA;from moviepy.editor import *&#xA;&#xA;startingDir = r&#x27;D:\taxes&#x27;&#xA;&#xA;avoid = [&#x27;0incomplete&#x27;, &#x27;old&#x27;, &#x27;that&#x27;, &#x27;this&#x27;]&#xA;&#xA;for thing in os.listdir(startingDir):&#xA;    clips = []&#xA;    name = &#x27;&#x27;&#xA;    &#xA;    if thing in avoid:&#xA;        print(&#x27;                              avoided {}&#x27;.format(thing))&#xA;        continue&#xA;&#xA;    folder = os.path.join(startingDir, thing)&#xA;&#xA;    if os.path.isdir(folder):&#xA;        for clip in os.listdir(folder):&#xA;            print (clip)&#xA;            clips.append(VideoFileClip(os.path.join(folder, clip)))&#xA;        print(&#x27;\n&#x27;)&#xA;&#xA;        try:&#xA;            final = concatenate_videoclips(clips)&#xA;            final.write_videofile(os.path.join(folder, &#x27;test&#x27;), audio=True, codec=&#x27;libx264&#x27;, threads=10)&#xA;            final.close() &#xA;        except Exception as e:&#xA;            print (e)&#xA;            print(&#x27;\n Continuing... \n\n&#x27;)&#xA;            continue&#xA;

    &#xA;

  • 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