Recherche avancée

Médias (0)

Mot : - Tags -/logo

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (101)

  • 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

  • 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

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

Sur d’autres sites (8243)

  • Killing cmd processes in Bravobit FFmpeg

    10 octobre 2018, par kataroty

    I am using Bravobit FFmpeg Bravobit FFmpeg github to convert some audio files. There are more convertion than these 2 but I do not think they are necessary to add here.

    My question is, is it possible to kill or stop these commands once they are started.

    At the moment when I start the first method convertPCMToWav() and then call finish() in the Main method which stops all other processes but these. They just keep on going like nothing has happened.

    public class AudioProcessor {

       private Context context;
       private FFmpeg ffmpeg;

       private File micPcmFile;

       private File pcmtowavTempFile;
       private File mp3towavTempFile;

       public AudioProcessor(Context context, Activity activity) {
           ffmpeg = null;
           ffmpeg = FFmpeg.getInstance(context);
           this.context = context;
           prepare();
       }

       /**
        * Program main method. Starts running program
        * @throws Exception
        */
       public void process() throws Exception {
           if (!ffmpeg.isSupported()) {
               Log.e("AudioProcessor", "FFMPEG not supported! Cannot convert audio!");
               throw new Exception("FFMPeg has to be supported");
           }
           if (!checkIfAllFilesPresent()) {
               Log.e("AudioProcessor", "All files are not set yet. Please set file first");
               throw new Exception("Files are not set!");
           }

           Log.e("AudioProcessor", "Start processing audio");




           Handler handler = new Handler();
           handler.postDelayed(new Runnable() {
               @Override
               public void run() {
                   convertPCMToWav();
               }
           }, 200);
       }

       /**
        * Prepares program
        */
       private void prepare() {
           prepareTempFiles();
       }

       /**
        * Converts PCM to wav file. Automatically create new file.
        */
       private void convertPCMToWav() {
           String[] cmd = { "-f" , "s16le", "-ar", "44.1k", "-i", micPcmFile.toString(), "-y", pcmtowavTempFile.toString()};
           ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

               @Override
               public void onStart() {
                   super.onStart();
               }

               @Override
               public void onSuccess(String message) {
                   super.onSuccess(message);
                   convertMP3ToWav();
               }
               @Override
               public void onFailure(String message) {
                   super.onFailure(message);
               }
           });
       }

       /**
        * Converts mp3 file to wav file.
        * Creates Wav file
        */
       private void convertMP3ToWav() {
           String[] cmd = { "-i" , backgroundMp3File.toString(), "-y", mp3towavTempFile.toString() };
           ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
               @Override
               public void onStart() {
                   super.onStart();
               }

               @Override
               public void onSuccess(String message) {
                   super.onSuccess(message);
                   changeMicAudio();
               }
               @Override
               public void onFailure(String message) {
                   super.onFailure(message);

               }
           });
       }

      /**
        * Prepares temp required files by deleteing them if they exsist.
        * Files cannot exists before ffmpeg actions. FFMpeg automatically creates those files.
        */
       private void prepareTempFiles() {
           pcmtowavTempFile = new File(context.getFilesDir()+ Common.TEMP_LOCAL_DIR + "/" + "_pcm.wav");
           mp3towavTempFile = new File(context.getFilesDir()+ Common.TEMP_LOCAL_DIR + "/" + "_mp3.wav");  
           destroyTempFiles();
       }

      /**
        * Destroys temp required files
        */
        private void destroyTempFiles() {

            pcmtowavTempFile.delete();
            mp3towavTempFile.delete();
       }

    }
  • FFMpeg Error initializing filter 'drawtext' on Android project

    14 janvier 2019, par user3884677

    I try to draw a text on a video using FFMpeg but I have the error :

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 4.8 (GCC)
         configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
         libavutil      55. 17.103 / 55. 17.103
         libavcodec     57. 24.102 / 57. 24.102
         libavformat    57. 25.100 / 57. 25.100
         libavdevice    57.  0.101 / 57.  0.101
         libavfilter     6. 31.100 /  6. 31.100
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/mediapicker/videos/eb89fc80-ebcc-4848-a95c-6983b2c5b09d.mp4':
         Metadata:
           major_brand     : 3gp4
           minor_version   : 0
           compatible_brands: isom3gp4
           creation_time   : 2018-10-03 15:46:13
           com.android.version: 6.0
         Duration: 00:00:04.78, start: 0.000000, bitrate: 6167 kb/s
           Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 6122 kb/s, SAR 1:1 DAR 16:9, 19.95 fps, 19.92 tbr, 90k tbn, 180k tbc (default)
           Metadata:
             rotate          : 90
             creation_time   : 2018-10-03 15:46:13
             handler_name    : VideoHandle
           Side data:
             displaymatrix: rotation of -90.00 degrees
           Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
           Metadata:
             creation_time   : 2018-10-03 15:46:13
             handler_name    : SoundHandle
       Fontconfig error: Cannot load default config file
       [Parsed_drawtext_0 @ 0xb561e040] impossible to init fontconfig
       [AVFilterGraph @ 0xb5609140] Error initializing filter 'drawtext' with args '"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=Test Heading"'
       Error opening filters!

    This is my code :

    private GLSurfaceView mGLView;
       private Button chooseVideo;
       private Button valideButton;
       private String SelectedVideo;
       private VideoView videoView;

       @Override
       protected void onCreate(Bundle savedInstanceState) {

           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           chooseVideo= findViewById(R.id.choose_video);
           chooseVideo.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {

                   new VideoPicker.Builder(MainActivity.this)
                           .mode(VideoPicker.Mode.GALLERY)
                           .directory(VideoPicker.Directory.DEFAULT)
                           .extension(VideoPicker.Extension.MP4)
                           .enableDebuggingMode(true)
                           .build();
               }
           });
           videoView = (VideoView) findViewById(R.id.videoView);
           final FFmpeg ffmpeg = FFmpeg.getInstance(MainActivity.this);
           try {
               ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
                   @Override
                   public void onStart() {
                   }

                   @Override
                   public void onFailure() {
                   }

                   @Override
                   public void onSuccess() {
                   }

                   @Override
                   public void onFinish() {
                   }
               });
           } catch (FFmpegNotSupportedException e) {
           }
           valideButton= findViewById(R.id.valide);
           valideButton.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {
                   try {
                       String[] cmd = {"-y" , "-i", SelectedVideo,
                               "-vf", "drawtext=\"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=\'Test Heading\'\"",
                               "-acodec",
                               "copy",                       Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4"};

                       ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                           }

                           @Override
                           public void onProgress(String message) {
                           }

                           @Override
                           public void onFailure(String message) {
                               Log.i("ffmpegFailure",message);
                           }

                           @Override
                           public void onSuccess(String message) {
                               Log.i("ffmpegExecute",message);
                               videoView.setVideoPath(Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4");
                               videoView.requestFocus();
                               videoView.start();
                           }
                           @Override
                           public void onFinish() {
                           }
                       });
                   } catch (FFmpegCommandAlreadyRunningException e) {
                       // Handle if FFmpeg is already running
                   }
               }
           });
    }

    My problem is that I can not use the option ’drawtext’. When I don’t use the option ’drawtext’ it’s work. I do not know which syntax I should use.
    I tried a lot of possibilities without success.
    I use this library : http://writingminds.github.io/ffmpeg-android-java/

    Can you help me ?

  • FFMpeg Error initializing filter 'drawtext'

    4 octobre 2018, par user3884677

    I try to draw a text on a video using FFMpeg but I have the error :

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 4.8 (GCC)
         configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
         libavutil      55. 17.103 / 55. 17.103
         libavcodec     57. 24.102 / 57. 24.102
         libavformat    57. 25.100 / 57. 25.100
         libavdevice    57.  0.101 / 57.  0.101
         libavfilter     6. 31.100 /  6. 31.100
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/mediapicker/videos/eb89fc80-ebcc-4848-a95c-6983b2c5b09d.mp4':
         Metadata:
           major_brand     : 3gp4
           minor_version   : 0
           compatible_brands: isom3gp4
           creation_time   : 2018-10-03 15:46:13
           com.android.version: 6.0
         Duration: 00:00:04.78, start: 0.000000, bitrate: 6167 kb/s
           Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 6122 kb/s, SAR 1:1 DAR 16:9, 19.95 fps, 19.92 tbr, 90k tbn, 180k tbc (default)
           Metadata:
             rotate          : 90
             creation_time   : 2018-10-03 15:46:13
             handler_name    : VideoHandle
           Side data:
             displaymatrix: rotation of -90.00 degrees
           Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
           Metadata:
             creation_time   : 2018-10-03 15:46:13
             handler_name    : SoundHandle
       Fontconfig error: Cannot load default config file
       [Parsed_drawtext_0 @ 0xb561e040] impossible to init fontconfig
       [AVFilterGraph @ 0xb5609140] Error initializing filter 'drawtext' with args '"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=Test Heading"'
       Error opening filters!

    This is my code :

    private GLSurfaceView mGLView;
       private Button chooseVideo;
       private Button valideButton;
       private String SelectedVideo;
       private VideoView videoView;

       @Override
       protected void onCreate(Bundle savedInstanceState) {

           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           chooseVideo= findViewById(R.id.choose_video);
           chooseVideo.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {

                   new VideoPicker.Builder(MainActivity.this)
                           .mode(VideoPicker.Mode.GALLERY)
                           .directory(VideoPicker.Directory.DEFAULT)
                           .extension(VideoPicker.Extension.MP4)
                           .enableDebuggingMode(true)
                           .build();
               }
           });
           videoView = (VideoView) findViewById(R.id.videoView);
           final FFmpeg ffmpeg = FFmpeg.getInstance(MainActivity.this);
           try {
               ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
                   @Override
                   public void onStart() {
                   }

                   @Override
                   public void onFailure() {
                   }

                   @Override
                   public void onSuccess() {
                   }

                   @Override
                   public void onFinish() {
                   }
               });
           } catch (FFmpegNotSupportedException e) {
           }
           valideButton= findViewById(R.id.valide);
           valideButton.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {
                   try {
                       String[] cmd = {"-y" , "-i", SelectedVideo,
                               "-vf", "drawtext=\"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=\'Test Heading\'\"",
                               "-acodec",
                               "copy",                       Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4"};

                       ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                           }

                           @Override
                           public void onProgress(String message) {
                           }

                           @Override
                           public void onFailure(String message) {
                               Log.i("ffmpegFailure",message);
                           }

                           @Override
                           public void onSuccess(String message) {
                               Log.i("ffmpegExecute",message);
                               videoView.setVideoPath(Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4");
                               videoView.requestFocus();
                               videoView.start();
                           }
                           @Override
                           public void onFinish() {
                           }
                       });
                   } catch (FFmpegCommandAlreadyRunningException e) {
                       // Handle if FFmpeg is already running
                   }
               }
           });
    }

    My problem is that I can not use the option ’drawtext’. When I don’t use the option ’drawtext’ it’s work. I do not know which syntax I should use.
    I tried a lot of possibilities without success.
    I use this library : http://writingminds.github.io/ffmpeg-android-java/

    Can you help me ?