Recherche avancée

Médias (91)

Autres articles (33)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (7751)

  • Trim and loop audio to the length of video

    20 mai 2020, par Nguyễn Trọng

    I have a 30 second video and a 120 second audio.
I ran the following command to loop audio into the video but it only stopped when the audio length was reached even though I added "-shortest".
Help me. (sorry for my bad english)

    



    String[] cmd = {"-y", "-i", video.mp4, "-i", audio.mp3,
            "-filter_complex",
            "[1:a]atrim=0:100,asetpts=PTS-STARTPTS," +
                    "asetrate=44100,aloop=1:size=1*44100," +
                    "aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=1.0[bg];" +
                    "[0:v][bg]concat=n=1:v=1:a=1[video]", "-shortest",
            "-map", "[video]", "-c:v", "libx264", "-c:a", "aac",
            "-preset", "veryfast", output, "-hide_banner"};


    


  • Java - Runtime.exec() freezes on execution of ffmpeg Audio-replacing command that works in windows console

    25 mars 2023, par Finn Andre Worm

    I have been building an application to merge together videos based on data I got from the web. I was lucky enough to find this great tool ffmpeg that has saved me a lot of time and effort, but unfortunately I seem to be stuck on the following issue :

    


    Im attempting to execute a command for merging a video with audio (in the future I will also be adding hardcoded .ASS subtitles and .PNG images).
My application dynamically generates me a command based on the files its suppposed to use which works just as intended, as the command that I get works inside of my windows console (cmd).
But when I try to run it through my Java application, the code seems to "freeze" permanently and while the placeholder file gets created on my desktop with the filename and correct file format, it just has the default windows video icon and cant be opened (as it has not finished being created, duh).
Im also using Eclipse, perhaps thats worth noting.

    


    This is the part of the code where it freezes :

    


    protected void runFFMPEG(Multimap args, String outputFile, String fileFormat) throws IOException
{
    try
    {
        Runtime.getRuntime().exec(setCommand(args, outputFile, fileFormat)).waitFor();
    }
    catch (InterruptedException e)
    {
        e.printStackTrace();
    }
}


    


    as previously said, the command itself is generated correctly, but heres the code nonetheless :

    


    private String[] setCommand(Multimap args, String outputFile, String fileFormat)
{
    String[] command = new String[args.size()*2+2];
    command[0] = ffmpegLocation;
    int[] i = new int[1];
    i[0] = 1;
    args.forEach((key, value) -> { 
        command[i[0]++] = key;
        command[i[0]++] = value;
    });
    command[i[0]] = outputFile + fileFormat;
    return command;
}


    


    Note : I used a normal string previously for command, but I saw another thread saying that using an array instead fixxed their issue (which it didnt for me, else i wouldnt be here...).

    


    This is an example command that gets generated :

    


    ffmpeg.exe -ss 00:00:00 -to 00:00:15 -i C :\Users\Test.mp4 -i C :\Users\FINAL.mp3 -map 0 -map 1:a -c:v copy C :/Users/User/TestVideo.mp4

    


    I also have a different command that concats the audio together into one FINAL.mp3 file, so its not like ffmpeg entirely fails to work in my application.
My guess is that it has something to do with the Runtime i get with Runtime.getRunTime(), but I cant seem to find out what the problem is.
Can someone tell me what I did wrong ? Thanks in advance !

    


  • ffmpeg and php to trim my audios using passthru

    12 décembre 2014, par Geoffrey Mureithi

    I am using ffmpeg and php to trim my audios

    ffmpeg -ss 10 -i input.mp3 -t 6 output.mp3

    I would like instead of output.mp3 to use passthru ie :

    passthru("ffmpeg -ss 10 -i $file -t 6"); //instead of exec(.....);

    and play the preview without saving it. The code above does not work. How do I do it ?