Recherche avancée

Médias (91)

Autres articles (64)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

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

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (10173)

  • Cutting whatsapp shared videos using FFMPEG

    2 août 2015, par Bhuvnesh Varma

    I am using hiteshsondhi88/ffmpeg-android library to time or cut videos.I have added below dependency.

    compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'

    I am using below command

    execFFmpegCommand("-i " + path + " -ss " + startMs / 1000 + " -to " + endMs / 1000 + " -strict -2 -async 1 " + dest.getAbsolutePath());

    to cut or trim videos.

    private void execFFmpegCommand(final String command) {
           try {
               ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                   @Override
                   public void onFailure(String s) {
                       Log.e("Preview", "FAILED with output : " + s);
                   }

                   @Override
                   public void onSuccess(String s) {
                       Log.e("Preview", "SUCCESS with output : " + s);
                   }

                   @Override
                   public void onProgress(String s) {
                       Log.e("Preview", "Started command : ffmpeg " + command);
                       Log.e("Preview", "progress : " + s);
                   }

                   @Override
                   public void onStart() {
                       Log.e("Preview", "Started command : ffmpeg " + command);

                   }

                   @Override
                   public void onFinish() {
                       Log.e("Preview", "Finished command : ffmpeg " + command);



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

    Its working for most videos but for some videos its NOT working especially for videos that are shared from whatssapp.It gives below error..I am using Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_MOVIES ) for storage of videos.

    FAILED with output : WARNING: linker: files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
       ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
       built on Oct  7 2014 15:11:41 with gcc 4.8 (GCC)
       configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/x86 --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
       libavutil      54.  7.100 / 54.  7.100
       libavcodec     56.  1.100 / 56.  1.100
       libavformat    56.  4.101 / 56.  4.101
       libavdevice    56.  0.100 / 56.  0.100
       libavfilter     5.  1.100 /  5.  1.100
       libswscale      3.  0.100 /  3.  0.100
       libswresample   1.  1.100 /  1.  1.100
       libpostproc    53.  0.100 / 53.  0.100
       /storage/emulated/0/1: No such file or directory
  • Q.For encoding error of ffmpeg

    21 mars 2016, par 社畜根性

    I ran the following command.

    ffmpeg -i test.mp4 -threads 2 -codec:v libx264 -s:v 1280x720 -aspect:v 16:9 -b:v 256k -map 0 -f segment -segment_format mpegts -segment_time 10 -segment_list stream.m3u8 streamfiles/stream%03d.ts

    Execution result

    ffmpeg version N-75926-gce0834b Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.6 (Debian 4.6.3-14+rpi1)
     configuration: --arch=armel --target-os=linux --enable-shared --enable-gpl --enable-libx264 --enable-nonfree
     libavutil      55.  3.100 / 55.  3.100
     libavcodec     57.  5.100 / 57.  5.100
     libavformat    57.  3.100 / 57.  3.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 11.100 /  6. 11.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.100 /  2.  0.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.40.100
     Duration: 00:00:03.28, start: 0.000000, bitrate: 10159 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 10156 kb/s, 25 fps, 25 tbr, 1200k tbn, 2400k tbc (default)
       Metadata:
         handler_name    : VideoHandler
    Illegal instruction

    The result is that an error occurred.
    Someone told me that it’s an error if you do not put the option to ./configure of libx264. That option is the --extra-cflags='-march=armv6' --extra-ldflags='-march=armv6'. Otherwise it would use the instruction of unsupported.

    So I ran ./configure with the option, then I ran the make and now I’m getting an error message :

    common/arm/quant-a.S: Assembler messages:
    common/arm/quant-a.S:362: Error: selected processor does not support ARM mode `rbit r1,r1'
    common/arm/quant-a.S:363: Error: selected processor does not support ARM mode `rbit r1,r1'
    Makefile:217: recipe for target 'common/arm/quant-a.o' failed
    make: *** [common/arm/quant-a.o] Error 1

    I do not know the meaning of this error. How should you deal me this error ?

    I use the machine is Raspberry PI B+ and my OS is Raspbian. I want to use ffmpeg and libx264.

    Any advice and suggestions will be greatly appreciated.

  • Can i programmatically rename a file on removable sd card

    2 août 2015, par Bhuvnesh Varma

    I tried below codes for renaming file.It works fine for internal storage but is not working for removable sd card file.I need to rename file on removable sd card to remove spaces and special characters from filename as I am using fmpeg command to cut videos.

    File from = new File(originalpath);
    String rename=originalpath.replace(" ", "").replace("-","").replace(",","").trim();
    File to = new File(rename);
    Boolean result= from.renameTo(to);

    OR

    File from = new File(originalpath);
    File to=new File((Environment.getExternalStorageDirectory()),"gvideo.mp4");
    Boolean result2= from.renameTo(to);

    Both of them gives result false

    Adding details about command-

    execFFmpegBinary("-i " + from.getAbsolutePath() + " -ss " + startMs / 1000 + " -to " + endMs / 1000 + " -strict -2 -async 1 " + dest.getAbsolutePath());
    private void execFFmpegBinary(final String command) {
           try {
               ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                   @Override
                   public void onFailure(String s) {
                       Log.e("Previewragment", "FAILED with output : " + s);
                   }

                   @Override
                   public void onSuccess(String s) {
                       Log.e("Previewragment", "SUCCESS with output : " + s);
                   }

                   @Override
                   public void onProgress(String s) {
                       Log.e("Previewragment", "Started command : ffmpeg " + command);
                       Log.e("Previewragment", "progress : " + s);
                   }

                   @Override
                   public void onStart() {
                       Log.e("Previewragment", "Started command : ffmpeg " + command);

                   }

                   @Override
                   public void onFinish() {
                       Log.e("Previewragment", "Finished command : ffmpeg " + command);



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

    Failure message-

    FAILED with output : WARNING: linker: /data/data/xyz/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
       ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
       built on Oct  7 2014 15:11:41 with gcc 4.8 (GCC)
       configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/x86 --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
       libavutil      54.  7.100 / 54.  7.100
       libavcodec     56.  1.100 / 56.  1.100
       libavformat    56.  4.101 / 56.  4.101
       libavdevice    56.  0.100 / 56.  0.100
       libavfilter     5.  1.100 /  5.  1.100
       libswscale      3.  0.100 /  3.  0.100
       libswresample   1.  1.100 /  1.  1.100
       libpostproc    53.  0.100 / 53.  0.100
       "/storage/emulated/0/Movies/m_ASUS_Display_Demo.mp4": No such file or directory

    Added complete method-

    private void executeTrimCommand(int startMs, int endMs) {

           File moviesDir = Environment.getExternalStoragePublicDirectory(
                   Environment.DIRECTORY_MOVIES
           );

           String filePrefix = "guggu";
           String fileExtn = ".mp4";
           String fileName = filePrefix + fileExtn;

          File from = new File(path);

           try {


               dest = new File(moviesDir, filePrefix + "_1" + fileExtn);

               if (dest.exists()) {
                   dest.delete();
               }



               String command = String.format("-i \"%s\" -ss %d -to %d -strict -2 -async 1 \"%s\" ",path,startMs / 1000 , endMs / 1000, dest.getAbsolutePath());
               execFFmpegBinary(command);
           } catch (Exception e) {
               Log.e("Previewragment", e.toString());
               e.printStackTrace();
           }
       }