Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (107)

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (7002)

  • How to code Laravel FFMpeg video conversion for specific parameters ?

    7 octobre 2022, par Wayne Fulcher

    I am using Laravel 9.x running php 8.1.x.
I have some code that I use to convert videos that have a context type other than video/mp4 to a H264 format. The reason is to make a video format that is compatible with Apple (iOS), Android and most web browsers. This code has worked so far on every video we have used it on except for one.
My current code is

    


            $ffmpeg = FFMpeg::create();
        $video = $ffmpeg->open($videoFilename);
        $format = new X264();
        $format->setAudioCodec("aac"); 
        $video->save($format, $newFilename);


    


    So in an attempt to debug what else needs to be done I started manually running ffmpeg commands on my computer against a copy of the video in question. I have finally figured out what additional parameters are required to successfully convert that video so it plays on all devices. The manual command is as follows :

    


    ffmpeg -i input.mov -pix_fmt yuv420p -b:v 4000k -c:v libx264 output.mp4


    


    I am about 90% sure the parameters that dealt with the specifics of this video were the following :

    


    -pix_fmt yuv420p -b:v 4000k

    


    My problem now is I can not figure out what changes to my php code I need to make that would be the equivalent to those additional command line parameters.
Also I am wondering as I am typing this question, is there a way for me to "auto-detect" when a video requires this additional parameters or not ? (maybe that is a second post/question)

    


  • mips/mathops : remove 64-bit code

    26 février 2015, par James Cowgill
    mips/mathops : remove 64-bit code
    

    GCC is perfectly happy generating optimized multiplication code on its own for
    64-bit arches. GCC refuses to optimize the loongson code when in 32-bit mode,
    so I’ve left that.

    Signed-off-by : James Cowgill <james410@cowgill.org.uk>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/mips/mathops.h
  • Issues in executing FFmpeg command in Java code in Linux

    12 août 2017, par Tina J

    I have problems executing this ffmpeg command in my java code :

    ffmpeg -i sample.mp4 -i ad.mp4 -filter_complex "[0:v]trim=0:15,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out]" -map "[out]" output.mp4

    I used the getRuntime() method below, but that doesn’t work for me. Even if I simply remove the ", still it doesn’t work. When I simply copy-paste the equivalent string in terminal, it works.

    String c1=" -i "+dir+"sample.mp4 "+"-i "+dir+"ad.mp4 -fi‌​lter_complex [0:v]‌​trim=0:15,setpts=PTS‌​-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out] -map [out] "+dir+"output.‌​mp4";
    RunCommand("ffmpeg"+c1);

    Using this method :

    private static void RunCommand(String command) throws InterruptedException {
       try {
           // Execute command
           Process proc = Runtime.getRuntime().exec(command);
           System.out.println(proc.exitValue());

           // Get output stream to write from it
           // Read the output

           BufferedReader reader =  
                   new BufferedReader(new InputStreamReader(proc.getInputStream()));
           String line = "";
           while((line = reader.readLine()) != null) {
               System.out.print(line + "\n");
               //              System.out.println(ads.get(0));
           }
           proc.waitFor();  

       } catch (IOException e) {
       }
    }

    This one doesn’t work also, and printing the exit value shows this :

    Exception in thread "main" java.lang.IllegalThreadStateException: process hasn't exited
       at java.lang.UNIXProcess.exitValue(UNIXProcess.java:423)
       at parser.Parser.RunCommand(Parser.java:106)
       at parser.Parser.commandGenerator2(Parser.java:79)
       at parser.Parser.main(Parser.java:44)

    If I move the proc.waitFor(); before printing the exit value, it is 1.

    What is the problem ? Why it doesn’t run in Java code ?