Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (53)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

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

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

  • Why a batch processing of ffmpeg is freezing the system ?

    3 septembre 2019, par Krishna Chebrolu

    I have a requirement of splitting smaller chunks of videos from 50+ mp4 source files for 5000+ records. Each record may result in 2 or 3 smaller chunks from as many source files out of those 50+.

    The logic to determine which source file to be picked up is written in Java and then fed to ffmpeg on Runtime.getRuntime().exec() using ExecutorService with newFixedThreadPool as below :

    private static boolean processqueue(ArrayList<string> cmds) {
       final ExecutorService pool;
       int threadsnum = Runtime.getRuntime().availableProcessors()-2;
       pool = Executors.newFixedThreadPool(threadsnum);

       for(final String cmd: cmds){
           pool.execute(new Runnable() {
               public void run() {
                   System.out.println(cmd);
                   try {
                       Runtime.getRuntime().exec(cmd);
                   } catch (IOException e) {
                       e.printStackTrace();
                       pool.shutdown();
                   }
               }
           });
       }                  
       pool.shutdown();

       // wait for them to finish for up to one minute.
       try {
           if(!pool.awaitTermination(1, TimeUnit.MINUTES)) {
               pool.shutdownNow();
           }

           //Wait a while for tasks to respond to being cancelled
           if(!pool.awaitTermination(1, TimeUnit.MINUTES))
               System.err.println("Pool did not shutdown properly");

       } catch (InterruptedException e) {
           e.printStackTrace();
           pool.shutdownNow();
           //Preserve interrupt status
           Thread.currentThread().interrupt();
           return false;
       }                  

       return true;
    }
    </string>

    the String cmd value is one of these based on split or merge requirement :

    for split :

    ffmpeg -y -ss 00:00:00 -t 00:08 -i E:/tmp/fin12.mp4 -acodec copy -vcodec copy E:/tmp/Intermed/0136f.mp4

    or

    for merge :

    ffmpeg -y -i E:/tmp/Inter/0136c0.mp4 -i E:/tmp/Inter/0136c1.mp4 -i E:/tmp/Inter/0136f.mp4 -i E:/tmp/Jingle.mp4 -i E:/tmp/wm1280.png -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a][3:v][3:a]concat=n=4:v=1:a=1[vv][a];[vv][4:v]overlay=x=0:y=H-overlay_h[v]" -map "[v]" -map "[a]" E:/tmp/final/0136.mp4

    On first attempt, only 250 records were processed. And, on subsequent attempt of balance records processing, it threw below exception ; but, processed another 300 records :

    java.io.IOException: Cannot run program "ffmpeg": CreateProcess error=1455, The paging file is too small for this operation to complete
    at java.lang.ProcessBuilder.start(Unknown Source)

    And, this code freezes often. Why is ExecutorService not holding up the queue to process all the records and exit gracefully ? What am I doing wrong ?

    Note : I’m calling Java class from windows batch script by passing relevant arguments which is executed from command line.

  • video compression error in android

    27 avril 2017, par Arpan Sharma

    I am using ffmpeg for video compression in android.I an following this link
    But i always get exit code 1.I am trying to get video from VIDEO CAPTURE intent inside a fragment.
    This is my code

    final Clip clip_in = new Clip(videoPath);
           File fileTmp = activity.getCacheDir();
           File fileAppRoot = new File(activity.getApplicationInfo().dataDir);

           final Clip clip_out = new Clip(videoPath);
           //put flags in clip
           clip_out.videoFps = "30";
           clip_out.width = 480;
           clip_out.height = 320;
           clip_out.videoCodec = "libx264";
           clip_out.audioCodec = "copy";

           try {
               FfmpegController fc = new FfmpegController(getContext(), fileTmp);
               fc.processVideo(clip_in, clip_out, false, new ShellUtils.ShellCallback() {

                   @Override
                   public void shellOut(String shellLine) {
                       System.out.println("MIX> " + shellLine);
                   }

                   @Override
                   public void processComplete(int exitValue) {
                       if (exitValue != 0) {
    //                        System.err.println("concat non-zero exit: " + exitValue);
                           Log.d("ffmpeg", "Compilation error. FFmpeg failed");
                           Toast.makeText(activity, "result: ffmpeg failed", Toast.LENGTH_LONG).show();
                       } else {
                           if (new File("/storage/emulated/0/Developer/result2.mp4").exists()) {
                               Log.d("ffmpeg", "Success file:" + "/storage/emulated/0/Developer/result2.mp4");
                           }
                       }
                   }
               });

           } catch (Exception e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }

    Any help will be appreciated.

  • How to convert a video to mask with ffmpeg ?

    8 avril 2019, par Zedd W

    I want to synthesize videos with a pre-designed template.

    template structure

    The final result is similar to the video below

    result : This video is synthesized by me using moviepy(a Python module for video editing). But it takes too long to be used in production.

    So, I need to overlay these videos into a single video.

    Current problems

    • How to convert a video to mask by ffmpeg ?
    • How to synthesize these videos to a single video by ffmpeg ?