Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (95)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • 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

Sur d’autres sites (7912)

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

  • How to speed up my video creating/encoding pipeline

    23 septembre 2015, par user606521

    I am creating a video from 120 JPEG images and concatening it with intro video.

    • video (and images) dimmensions : 960x540
    • video/audio output format that I need : mp4 H.264, AAC

    I am creating video from JPEG images using following command :

    ffmpeg -f lavfi -i anullsrc -r 60 -i pipe:0 -y -acodec aac -strict experimental \
    -shortest -movflags frag_keyframe+empty_moov -f mp4 video.mp4

    It creates 2 seconds (120 frames with 60FPS) mp4 video with "silence" (silent audio). video.mp4 size is 94KB. This process takes 1 second. (Note that I am passing images through pipe:0).

    Next I concatenate it with existing intro.mp4 video (H.264, AAC, 931KB, lasts 6 seconds) using following command :

    ffmpeg -i intro.mp4 -i video.mp4 -y \
    -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" \
    -map "[v]" -map "[a]" -acodec aac -strict experimental \
    -movflags frag_keyframe+empty_moov -f mp4 final.mp4

    It creates final mp4 H.254, AAC video which lasts 2 + 6 = 8 seconds and it’s size 990KB. This process takes 3.5 seconds.

    So the whole process takes 5.5 seconds on my Mac. I have to speed it up, especially concatening videos. I am not familiar with video encoding and video formats, but I thought that maybe creating first video in mp4 and then concatening it with another mp4 video is not efficient. Are there any other formats in which I could create video (and intro) that will be faster to create/concatenate so I could encode only final video as mp4 ?

    For example I could create video.<format></format>, concatenate it with intro.<format></format> and finally encode it as final.mp4.

    Use case : I have to create videos in almost real time. 5.5 secs is ok on my Mac, but I have to execute my app on a weaker machine on which this process currently takes 3 + 15 = 18 seconds.

    Also maybe there are some cool flags I could pass to ffmpeg to make it faster ?