Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (105)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (9013)

  • Compress video like whatsapp

    10 juillet 2021, par user1079425

    I'm not an expert in Video Editing but what I want to understand the logic of Whatsapp video processing.

    



    First of all I have noticed that whatever the file is, Whatsapp sets the limit of Uploaded videos to 16MB, after which whatsapp crops the video to not exceed the limit. is this a convention or it's a personal choice ?

    



    Secondly, When a video is recorded using the Camera it's not compressed by default, so whatsapp compresses it using FFMPEG I guess, and it takes no time. (tried for a video of 1min 1920x1080 with 125MB of size, becomes 640x360 with 5MB of size in no time, and the upload starts automatically).. how may they do this ? and why the choice of 640x360, It seems to me very fast for 2 asynchronous tasks : Compression + Upload.

    



    When I run the compression command ffmpeg -y -i in.mp4 -codec:v libx264 -crf 23 -preset medium -codec:a libfdk_aac -vbr 4 -vf scale=-1:640,format=yuv420p out.mp4 it takes approximatively 1 min and the video is being rotated !! :D

    



    Finally, when we download a video from Youtube it's already compressed (I guess) and whatsapp doesn't even try to compress it. So I think that it automatically detects thats the video is compressed. How can we detect this ?

    



    Thank you.

    


  • What are the commands for FFmpeg extract images binary command

    19 juillet 2017, par Tix

    My ffmpeg for android studio is compiled using this :

    compile ’com.writingminds:FFmpegAndroid:0.3.2’

    In the code below i have this line of code :

    String[] complexCommand = "-i", yourRealPath, "-c:v", "libx264",
    "-crf", "22", "-map", "0", "-segment_time", "6", "-g", "9",
    "-sc_threshold", "0", "-force_key_frames", "expr:gte(t,n_forced*6)",
    "-f", "segment", dest.getAbsolutePath()
     ;

    Things i want to know :

    1. I’d like to know what those inputs(i.e. "-sc_threshold", "-g", "-crf") are, and what are their functions.
    2. If a video has 30fps and is 5 seconds long, are there 150 frames, if so is ffmpeg able to extact all 150 ?

    This is my code :

        /**
        * Command for extracting images from video
        */
       private void extractImagesVideo(int startMs, int endMs) {
           File moviesDir = Environment.getExternalStoragePublicDirectory(
                   Environment.DIRECTORY_PICTURES
           );

           String filePrefix = "extract_picture";
           String fileExtn = ".jpg";
           String yourRealPath = getPath(MainActivity.this, selectedVideoUri);

           File dir = new File(moviesDir, "VideoEditor");
           int fileNo = 0;
           while (dir.exists()) {
               fileNo++;
               dir = new File(moviesDir, "VideoEditor" + fileNo);

           }
           dir.mkdir();
           filePath = dir.getAbsolutePath();
           File dest = new File(dir, filePrefix + "%03d" + fileExtn);


           Log.d(TAG, "startTrim: src: " + yourRealPath);
           Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

           String[] complexCommand = {"-y", "-i", yourRealPath, "-an", "-r", "1/2", "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, dest.getAbsolutePath()};

           execFFmpegBinary(complexCommand);

       }

    /**
        * 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);
                       if (choice == 1 || choice == 2 || choice == 5 || choice == 6 || choice == 7) {
                           Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                       } else if (choice == 3) {
                           Intent intent = new Intent(MainActivity.this, PreviewImageActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                       } else if (choice == 4) {
                           Intent intent = new Intent(MainActivity.this, AudioPreviewActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                       } else if (choice == 8) {
                           choice = 9;
                           reverseVideoCommand();
                       } else if (Arrays.equals(command, lastReverseCommand)) {
                           choice = 10;
                           concatVideoCommand();
                       } else if (choice == 10) {
                           File moviesDir = Environment.getExternalStoragePublicDirectory(
                                   Environment.DIRECTORY_MOVIES
                           );
                           File destDir = new File(moviesDir, ".VideoPartsReverse");
                           File dir = new File(moviesDir, ".VideoSplit");
                           if (dir.exists())
                               deleteDir(dir);
                           if (destDir.exists())
                               deleteDir(destDir);
                           choice = 11;
                           Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                           intent.putExtra(FILEPATH, filePath);
                           startActivity(intent);
                       }
                   }

    Code downloaded from :

    https://github.com/bhuvnesh123/FFmpeg-Video-Editor-Android

  • avfilter/pthread : use slice threading from avutil

    12 juillet 2017, par Muhammad Faiz
    avfilter/pthread : use slice threading from avutil
    

    Benchmark (with 2 cpus) :
    ./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
    threads=2 :
    old : 31.129s 31.446s 31.574s
    new : 29.602s 29.636s 29.656s
    threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation) :
    old : 40.132s 40.279s 40.279s
    new : 39.308s 39.570s 39.693s
    threads=4 :
    old : 31.306s 31.366s 31.654s
    new : 30.231s 30.360s 30.451s

    Signed-off-by : Muhammad Faiz <mfcc64@gmail.com>

    • [DH] libavfilter/pthread.c