Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (83)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (13098)

  • ffmpeg command not working with white space of directory path in Android

    13 avril 2017, par Sakib Syed

    I am working with FFMPEG library in which I want to rotate video using this library which works fine if I am file path has no any white space. But in my case I have white space of video directory (you can see full path in String commandStr onPreExecute() method of asynctask) path then it is not working at all. I have also seen same question like this and some more but not get any idea how to resolved it properly. Below is my code of MainActivity.class

       public class MainActivity extends AppCompatActivity implements View.OnClickListener{

       String workFolder = null;
       String demoVideoFolder = null;
       String vkLogPath = null;
       private boolean commandValidationFailedFlag = false;

       private Button btnRun;


       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           GeneralUtils.checkForPermissionsMAndAbove(MainActivity.this, true);


           setIds();
           setListner();


           demoVideoFolder = Environment.getExternalStorageDirectory().getAbsolutePath() + "/videokit/";

           Log.i(Prefs.TAG, getString(R.string.app_name) + " version: " + GeneralUtils.getVersionName(getApplicationContext()) );
           workFolder = getApplicationContext().getFilesDir().getAbsolutePath() + "/";
           vkLogPath = workFolder + "vk.log";

           GeneralUtils.copyLicenseFromAssetsToSDIfNeeded(this, workFolder);
           GeneralUtils.copyDemoVideoFromAssetsToSDIfNeeded(this, demoVideoFolder);


           int rc = GeneralUtils.isLicenseValid(getApplicationContext(), workFolder);
           Log.i(Prefs.TAG, "License check RC: " + rc);
       }

       private void setListner() {
           btnRun.setOnClickListener(this);
       }

       private void setIds() {
           try {
               btnRun =  (Button)findViewById(R.id.btnRun);
           } catch (Exception e) {
               e.printStackTrace();
           }
       }

       @Override
       public void onClick(View view) {
           switch (view.getId()){
               case R.id.btnRun:

                   Log.i(Prefs.TAG, "run clicked.");
                   if (GeneralUtils.checkIfFileExistAndNotEmpty(workFolder)) {
                       new TranscdingBackground(MainActivity.this).execute();
                   }
                   else {
                       Toast.makeText(getApplicationContext(), workFolder + " not found", Toast.LENGTH_LONG).show();
                   }
                   break;
           }
       }

       public class TranscdingBackground extends AsyncTask
       {

           ProgressDialog progressDialog;
           Activity _act;
           String commandStr;

           public TranscdingBackground (Activity act) {
               _act = act;
           }



           @Override
           protected void onPreExecute() {

    //            commandStr = "ffmpeg -y -i /storage/emulated/0/WhatsApp/Media/in.mp4 -vf rotate=270*(PI/180) /sdcard/videokit/out.mp4";
               commandStr = "ffmpeg -y -i /storage/emulated/0/WhatsApp/Media/WhatsApp Video/in.mp4 -vf rotate=270*(PI/180) /sdcard/videokit/out.mp4";


               progressDialog = new ProgressDialog(_act);
               progressDialog.setMessage("FFmpeg4Android Transcoding in progress...");
               progressDialog.show();

           }

           protected Integer doInBackground(String... paths) {
               Log.i(Prefs.TAG, "doInBackground started...");

               // delete previous log
               boolean isDeleted = GeneralUtils.deleteFileUtil(workFolder + "/vk.log");
               Log.i(Prefs.TAG, "vk deleted: " + isDeleted);

               PowerManager powerManager = (PowerManager)_act.getSystemService(Activity.POWER_SERVICE);
               PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
               Log.d(Prefs.TAG, "Acquire wake lock");
               wakeLock.acquire();



               LoadJNI vk = new LoadJNI();
               try {

                   vk.run(GeneralUtils.utilConvertToComplex(commandStr), workFolder, getApplicationContext());

                   // copying vk.log (internal native log) to the videokit folder
                   GeneralUtils.copyFileToFolder(vkLogPath, demoVideoFolder);

               } catch (CommandValidationException e) {
                   Log.e(Prefs.TAG, "vk run exeption.", e);
                   commandValidationFailedFlag = true;

               } catch (Throwable e) {
                   Log.e(Prefs.TAG, "vk run exeption.", e);
               }
               finally {
                   if (wakeLock.isHeld())
                       wakeLock.release();
                   else{
                       Log.i(Prefs.TAG, "Wake lock is already released, doing nothing");
                   }
               }
               Log.i(Prefs.TAG, "doInBackground finished");
               return Integer.valueOf(0);
           }

           protected void onProgressUpdate(Integer... progress) {
           }

           @Override
           protected void onCancelled() {
               Log.i(Prefs.TAG, "onCancelled");
               //progressDialog.dismiss();
               super.onCancelled();
           }


           @Override
           protected void onPostExecute(Integer result) {
               Log.i(Prefs.TAG, "onPostExecute");
               progressDialog.dismiss();
               super.onPostExecute(result);

               // finished Toast
               String rc = null;
               if (commandValidationFailedFlag) {
                   rc = "Command Vaidation Failed";
               }
               else {
                   rc = GeneralUtils.getReturnCodeFromLog(vkLogPath);
               }
               final String status = rc;
               MainActivity.this.runOnUiThread(new Runnable() {
                   public void run() {
                       Toast.makeText(MainActivity.this, status, Toast.LENGTH_LONG).show();
                       if (status.equals("Transcoding Status: Failed")) {
                           Toast.makeText(MainActivity.this, "Check: " + vkLogPath + " for more information.", Toast.LENGTH_LONG).show();
                       }
                   }
               });
           }
       }

    }

    Here onPreExecute() method I have given video file path.

  • ffmpeg drawtext leading space characters in text are getting ignored

    4 novembre 2017, par yoda89

    I am using the below arguments for drawtext in ffmpeg

    ffmpeg -i input.gif -vf drawtext="fontfile='ariblk.ttf':text='    Hello World':x=10:y=10:fontsize=30:fontcolor=white" output.gif

    notice the spaces before the text specified in argument, but in output the spaces before the text are getting ignored.
    So how could I stop ffmpeg from doing that.

  • avformat/hlsenc : allocate space for terminating null

    13 novembre 2017, par Timo Rothenpieler
    avformat/hlsenc : allocate space for terminating null
    

    Fixes CID #1420394

    • [DH] libavformat/hlsenc.c