Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (44)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4484)

  • Revision 34657 : lister les plugins non utilises (le glob() est pourri, qui fait mieux)

    23 janvier 2010, par fil@… — Log

    lister les plugins non utilises (le glob() est pourri, qui fait mieux)

  • Revision 29746 : Gestion de la file d’attente

    8 juillet 2009, par kent1@… — Log

    Gestion de la file d’attente

  • How do you run a ffmpeg command in Java, in MacOS, using a ProcessBuilder

    5 août 2020, par nottAbott

    I am writing a program in Java that uses ffmpeg to "snip" a video into several pieces and the stitch them back together again. I have everything working relatively smoothly in Windows, but I cannot get ffmpeg to work in Mac, or in Linux for that matter. I'm focusing on mac right now though. I thought that it might be a permissions problem, but when I run it with sudo I get an error that says (after typing in the password :

    


    sudo: ffmpeg: command not found


    


    when I run it without sudo I get :

    


    java.io.IOException: Cannot run program "ffmpeg": error=2, No such file or directory


    


    I think that it might be because the ffmpeg package, on the Mac machine, was downloaded with homebrew, and ffmpeg is stored in /usr/local/Cellar/ffmpeg instead of the default folder, wherever it may be. That may not be the problem though, because I deleted ffmpeg and re-downloaded it with homebrew. It may have been in its defaulter folder in my first tests as well. It would be great to figure this out. Most of my family uses Mac (not me) and I really want to share my work with them. That is why I chose to code this in Java. Oh, and I did try using the directory to the binary in the command. Here's the code :

    


        //snips out all the clips from the main video
    public void snip() throws IOException, InterruptedException {
        
        for(int i = 0; i < snippets.size(); i++) {
            //ffmpeg -i 20sec.mp4 -ss 0:0:1 -to 0:0:5 -c copy foobar.mp4
            String newFile = "foobar" + String.valueOf(i) + ".mp4";
            
            //THIS WORKS
            if(OS.isWindows()) {
                ProcessBuilder processBuilder = new ProcessBuilder("ffmpeg", "-i", videoName, "-ss",
                        snippets.get(i).getStartTime(), "-to", snippets.get(i).getEndTime(), newFile);
                            
                Process process = processBuilder.inheritIO().start();
                process.waitFor();
                System.out.println("Win Snip " + i + "\n");
            }
            
            else if (OS.isMac()) {
                //FFMPEG LOCATION: /usr/local/Cellar/ffmpeg
                //THE ERROR: sudo: ffmpeg: command not found
                //ERROR W/OUT SUDO: java.io.IOException: Cannot run program "ffmpeg": error=2, No such file or directory
                ProcessBuilder processBuilder = new ProcessBuilder("sudo", "-S", "ffmpeg", "-f", videoName, "-ss",
                        snippets.get(i).getStartTime(), "-to", snippets.get(i).getEndTime(), newFile);
                
                Process process = processBuilder.inheritIO().start();
                process.waitFor();
                System.out.println("Mac Snip " + i + "\n");
            }
            
            else if (OS.isUnix()) {
                System.out.println("Your operating system is not supported");
                //TODO
                //need to figure out if deb/red hat/whatever are different
            }
            
            else if (OS.isSolaris()) {
                System.out.println("Your operating system is not supported yet");
                //TODO probably won't do
            }
            
            else {
                 System.out.println("Your operating system is not supported");
            }
            //add to the list of files to be concat later
            filesToStitch.add(newFile);
            filesToDelete.add(newFile);
            
        }
        //System.out.println(stitchFiles);
    }