Recherche avancée

Médias (91)

Autres articles (96)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (10186)

  • Non-monotonous DTS in output stream 0:0 during concatenation parts of the same video file

    7 février 2020, par user3841429

    I have a video file example.mp4, and text file concat.txt :

    file 'example.mp4'
    outpoint 422.719
    file 'example.mp4'
    inpoint 422.719
    outpoint 683.151
    file 'example.mp4'
    inpoint 688.151
    outpoint 1014.349
    file 'example.mp4'
    inpoint 1019.349

    I do :

    ffmpeg -f concat -i concat.txt -c copy -y out.mp4

    or

    ffmpeg -fflags +igndts -f concat -i concat.txt -c copy -y out.mp4

    And get set of errors in both cases :

    [mp4 @ 0x55a9a90ad980] Non-monotonous DTS in output stream 0:0;...
    [mp4 @ 0x55a9a90ad980] Non-monotonous DTS in output stream 0:0;...
    ...

    Also there are sound artifacts near the glue spots. They sound like beginning of the second part goes to the end of the first.

  • Ffmpeg- Split video into 30 seconds parts in android

    22 novembre 2019, par Corgi Mogi

    I am working on a project. In which I want to split the video into 30 sec equal parts. If the video is 45 sec long than ideally in 30 and 15-sec parts. I already created a method which takes the starting and the ending point and run the Ffmpeg command to cut the video. This is what I created so far

      private void executeCutVideoCommand(int startMs, int endMs) {
           File moviesDir = Environment.getExternalStoragePublicDirectory(
                   Environment.DIRECTORY_MOVIES
           );

           String filePrefix = "cut_video";
           String fileExtn = ".mp4";
           String yourRealPath = getPath(VideoCutterActivity.this, selectedVideoUri);
           File dest = new File(moviesDir, filePrefix + fileExtn);
           int fileNo = 0;
           while (dest.exists()) {
               fileNo++;
               dest = new File(moviesDir, filePrefix + fileNo + fileExtn);
           }

           filePath = dest.getAbsolutePath();
           String[] complexCommand = {"-ss", "" + startMs / 1000, "-y", "-i", yourRealPath, "-t", "" + (endMs - startMs) / 1000,"-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath};

           execFFmpegBinary(complexCommand);
           MediaScannerConnection.scanFile(VideoCutterActivity.this,
                   new String[] { filePath },
                   null,
                   new MediaScannerConnection.OnScanCompletedListener() {

                       public void onScanCompleted(String path, Uri uri) {

                           Log.i("ExternalStorage", "Scanned " + path + ":");
                           Log.i("ExternalStorage", "-> uri=" + uri);
                       }
                   });


       }

       /**
        * Executing ffmpeg binary
        */
       private void execFFmpegBinary(final String[] command) {
           try {
               ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                   @Override
                   public void onFailure(String s) {
                       Log.d(TAG, "FAILED with output : " + s);
                   }

                   @Override
                   public void onSuccess(String s) {
                       Log.d(TAG, "SUCCESS with output : " + s);
                           Intent intent = new Intent(VideoCutterActivity.this, PreviewActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                   }

                   @Override
                   public void onProgress(String s) {
                       progressDialog.setMessage("progress : " + s);
                   }

                   @Override
                   public void onStart() {
                       progressDialog.setMessage("Processing...");
                       progressDialog.show();
                   }

                   @Override
                   public void onFinish() {
                       progressDialog.dismiss();


                   }
               });
           } catch (FFmpegCommandAlreadyRunningException e) {
               // do nothing for now
           }
       }

    i tried to add a loop in method Calling But than app crashes

       cutVideo.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View v) {

                   choice = 2;

                   if (selectedVideoUri != null) {
                       int start,end;
                       for (int i=0;i<=duration;i=i+30){
                           start=i;
                           end=start+30;
                           executeCutVideoCommand(start,end);

                       }
    //                    executeCutVideoCommand(rangeSeekBar.getSelectedMinValue().intValue() * 1000, rangeSeekBar.getSelectedMaxValue().intValue() * 1000);

                   } else
                       Snackbar.make(mainlayout, "Please upload a video", 4000).show();
               }
           });


       }

    I hope now you can what i want to do. I want to Ffmpeg command or method which split the video into 30-sec parts and place them on the given filepath. Let me know if we you wanna know more about the code. Help is much appreciated

  • Split the video in 30 second equal parts in android using the Ffmpeg

    21 novembre 2019, par corgiwooer

    I am on a video editing project. In which I want to edit the video into 30 sec equal parts. Right now I am using the RangeSeekBar to get the starting and ending point which works perfectly fine. But now I want to split the video into equal parts but don’t know how to do it. This is what I tried

    private void executeCutVideoCommand(int startMs, int endMs) {
           File moviesDir = Environment.getExternalStoragePublicDirectory(
                   Environment.DIRECTORY_MOVIES
           );

           String filePrefix = "cut_video";
           String fileExtn = ".mp4";
           String yourRealPath = getPath(VideoCutterActivity.this, selectedVideoUri);
           File dest = new File(moviesDir, filePrefix + fileExtn);
           int fileNo = 0;
           while (dest.exists()) {
               fileNo++;
               dest = new File(moviesDir, filePrefix + fileNo + fileExtn);
           }

           filePath = dest.getAbsolutePath();
           String[] complexCommand = {"-ss", "" + startMs / 1000, "-y", "-i", yourRealPath, "-t", "" + (endMs - startMs) / 1000,"-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath};

           execFFmpegBinary(complexCommand);
           MediaScannerConnection.scanFile(VideoCutterActivity.this,
                   new String[] { filePath },
                   null,
                   new MediaScannerConnection.OnScanCompletedListener() {

                       public void onScanCompleted(String path, Uri uri) {

                           Log.i("ExternalStorage", "Scanned " + path + ":");
                           Log.i("ExternalStorage", "-> uri=" + uri);
                       }
                   });


       }

       /**
        * Executing ffmpeg binary
        */
       private void execFFmpegBinary(final String[] command) {
           try {
               ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                   @Override
                   public void onFailure(String s) {
                       Log.d(TAG, "FAILED with output : " + s);
                   }

                   @Override
                   public void onSuccess(String s) {
                       Log.d(TAG, "SUCCESS with output : " + s);
                           Intent intent = new Intent(VideoCutterActivity.this, PreviewActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                   }

                   @Override
                   public void onProgress(String s) {
                       progressDialog.setMessage("progress : " + s);
                   }

                   @Override
                   public void onStart() {
                       progressDialog.setMessage("Processing...");
                       progressDialog.show();
                   }

                   @Override
                   public void onFinish() {
                       progressDialog.dismiss();


                   }
               });
           } catch (FFmpegCommandAlreadyRunningException e) {
               // do nothing for now
           }
       }

    The above method takes the starting and the ending point and edits the video.

    I also tried to add for loop for this purpose but it didnt workout for me.

    cutVideo.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View v) {

                   choice = 2;

                   if (selectedVideoUri != null) {
                       int start,end;
                       for (int i=0;i<=duration;i=i+30){
                           start=i;
                           end=start+30;
                           executeCutVideoCommand(start,end);

                       }
    //                    executeCutVideoCommand(rangeSeekBar.getSelectedMinValue().intValue() * 1000, rangeSeekBar.getSelectedMaxValue().intValue() * 1000);

                   } else
                       Snackbar.make(mainlayout, "Please upload a video", 4000).show();
               }
           });

    Please can anyone tell me how to do it. Help is much appreciated