Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (73)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (9232)

  • Anomalie #4468 : CSS colonne gauche du privé

    7 avril 2020

    RastaPopoulos :
    peut-être une variante "important" qui justement là prend la couleur principale ?

    Oui tant qu’à faire

    marcimat :
    Ça pourrait pas être renommé le "boutons_groupe" en anglais (le reste des classes de cette catégorie est en anglais ; ça fait bizarre, même le .block que tu ajoutes...)

    Heu, du coup j’ai pas compris, tu suggères de tout mettre en français ou en anglais ?
    L’un ou l’autre pourquoi pas, avec le mélange actuel on sait pas trop sur quel pied danser quand on arrive après pour ajouter des trucs.

    Le .boutons_groupe à la place de .button-group c’était pour que ça soit cohérent quand c’est utilisé dans les formulaires :

    Le .block c’est un peu pareil : c’est une classe qu’on peut passer en paramètre de |icone_horizontale et de #BOUTON_ACTION, et là actuellement c’est que des termes anglais (add, link, etc.)

    C’est pas simple cette histoire...

    b b :

    faut s’y retrouver dans ces CSS minifiées

    Pour info c’est débrayable avec define(’_INTERDIRE_COMPACTE_HEAD_ECRIRE’,true) ; ;)

    Ah mais je parlais de l’écriture avec toutes les règles sur une ligne et sans espace dans les CSS :
    .classe{truc:machin;chose:bidule;pouet:truc;}

    J’ai perdu un dizième à chaque oeil à tout relire :p

  • FFmpeg4Android : How to select videos from gallery ?

    4 décembre 2015, par marian

    I have created an app using FFmpeg4Android library. I would like to add watermark into videos using ffmpeg. Command for adding watermark is working fine but the coding has pre-fixed video name in the command. I would like to choose videos from gallery folder and then add watermark to the videos. I do not know how to add intent for choosing videos with FFmpeg. I have tried to add the intent like this replacing the in.mp4 with PICK_FROM_GALLERY intent :

    private void runTranscodingUsingLoader() {
       Log.i(Prefs.TAG, "runTranscodingUsingLoader started...");

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

       Intent intent = new Intent();

       intent.setType("video/*");
       intent.setAction(Intent.ACTION_GET_CONTENT);

       startActivityForResult(Intent.createChooser(intent, "Complete action using"), PICK_FROM_GALLERY);


       String[] complexCommand = {"ffmpeg","-y" ,"-i", String.valueOf(PICK_FROM_GALLERY),"-strict","experimental",
               "-vf", "movie=/sdcard/videokit/watermark.png [watermark];" +
               " [in][watermark] overlay=main_w-overlay_w-10:10 [out]","-s",
               "320x240","-r", "30", "-b", "15496k", "-vcodec", "mpeg4","-ab",
               "48000", "-ac", "2", "-ar", "22050", "/sdcard/videokit/out1.mp4"};

    It opens the gallery but the watermarking command doesnt get executed in the selected video. Can someone help me to resolve this issue. I could not find proper references/examples regarding this. My full coding is as follows.

    public class ProgressBarExample extends Activity  {

    public ProgressDialog progressBar;

    String workFolder = null;
    String demoVideoFolder = null;
    String demoVideoPath = null;
    String vkLogPath = null;
    LoadJNI vk;
    private final int STOP_TRANSCODING_MSG = -1;
    private final int FINISHED_TRANSCODING_MSG = 0;
    private boolean commandValidationFailedFlag = false;
    private static final int PICK_FROM_GALLERY = 1;

    private void runTranscodingUsingLoader() {
       Log.i(Prefs.TAG, "runTranscodingUsingLoader started...");

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




       String[] complexCommand = {"ffmpeg","-y" ,"-i", "/sdcard/videokit/in.mp4","-strict","experimental",
               "-vf", "movie=/sdcard/videokit/watermark.png [watermark];" +
               " [in][watermark] overlay=main_w-overlay_w-10:10 [out]","-s",
               "320x240","-r", "30", "-b", "15496k", "-vcodec", "mpeg4","-ab",
               "48000", "-ac", "2", "-ar", "22050", "/sdcard/videokit/out1.mp4"};
       ///////////////////////////////////////////////////////////////////////


       vk = new LoadJNI();
       try {
           // running complex command with validation
           vk.run(complexCommand, workFolder, getApplicationContext());

           // running without command validation
           //vk.run(complexCommand, workFolder, getApplicationContext(), false);

           // running regular command with validation
           //vk.run(GeneralUtils.utilConvertToComplex(commandStr), workFolder, getApplicationContext());

           Log.i(Prefs.TAG, "vk.run finished.");
           // 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();
               Log.i(Prefs.TAG, "Wake lock released");
           }
           else{
               Log.i(Prefs.TAG, "Wake lock is already released, doing nothing");
           }
       }

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


    @Override
    public void onCreate(Bundle savedInstanceState) {
       Log.i(Prefs.TAG, "onCreate ffmpeg4android ProgressBarExample");

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

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

       Log.i(Prefs.TAG, getString(R.string.app_name) + " version: " + GeneralUtils.getVersionName(getApplicationContext()) );

       Button invoke =  (Button)findViewById(R.id.invokeButton);
       invoke.setOnClickListener(new OnClickListener() {
           public void onClick(View v){
               Log.i(Prefs.TAG, "run clicked.");
               runTranscoding();
           }
       });

       workFolder = getApplicationContext().getFilesDir() + "/";
       Log.i(Prefs.TAG, "workFolder (license and logs location) path: " + workFolder);
       vkLogPath = workFolder + "vk.log";
       Log.i(Prefs.TAG, "vk log (native log) path: " + vkLogPath);
       GeneralUtils.copyLicenseFromAssetsToSDIfNeeded(this, workFolder);
       GeneralUtils.copyDemoVideoFromAssetsToSDIfNeeded(this, demoVideoFolder);
       int rc = GeneralUtils.isLicenseValid(getApplicationContext(), workFolder);
       Log.i(Prefs.TAG, "License check RC: " + rc);
    }



    private Handler handler = new Handler() {
       @Override
       public void handleMessage(Message msg) {
           Log.i(Prefs.TAG, "Handler got message");
           if (progressBar != null) {
               progressBar.dismiss();

               // stopping the transcoding native
               if (msg.what == STOP_TRANSCODING_MSG) {
                   Log.i(Prefs.TAG, "Got cancel message, calling fexit");
                   vk.fExit(getApplicationContext());


               }
           }
       }
    };

    public void runTranscoding() {
       progressBar = new ProgressDialog(ProgressBarExample.this);
       progressBar.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
       progressBar.setTitle("FFmpeg4Android Direct JNI");
       progressBar.setMessage("Press the cancel button to end the operation");
       progressBar.setMax(100);
       progressBar.setProgress(0);

       progressBar.setCancelable(false);
       progressBar.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() {
           @Override
           public void onClick(DialogInterface dialog, int which) {
               handler.sendEmptyMessage(STOP_TRANSCODING_MSG);
           }
       });

       progressBar.show();

       new Thread() {
           public void run() {
               Log.d(Prefs.TAG,"Worker started");
               try {
                   //sleep(5000);
                   runTranscodingUsingLoader();
                   handler.sendEmptyMessage(FINISHED_TRANSCODING_MSG);

               } catch(Exception e) {
                   Log.e("threadmessage",e.getMessage());
               }
           }
       }.start();

       // Progress update thread
       new Thread() {
           ProgressCalculator pc = new ProgressCalculator(vkLogPath);
           public void run() {
               Log.d(Prefs.TAG,"Progress update started");
               int progress = -1;
               try {
                   while (true) {
                       sleep(300);
                       progress = pc.calcProgress();
                       if (progress != 0 && progress < 100) {
                           progressBar.setProgress(progress);
                       }
                       else if (progress == 100) {
                           Log.i(Prefs.TAG, "==== progress is 100, exiting Progress update thread");
                           pc.initCalcParamsForNextInter();
                           break;
                       }
                   }

               } catch(Exception e) {
                   Log.e("threadmessage",e.getMessage());
               }
           }
       }.start();
    }

    }

    Any help/guidance would be really helpful. Thank you.

  • How we can capture entire screen screenshot using android application via programming

    18 novembre 2022, par Krunal Indrodiya

    Can anyone having idea how we can capture entire screen screenshot including other application overlay menu and toast using android application programming not for adb commands and manual button press.

    


    I have went through some of the code which is taking screenshot excluding toast and other application overlay displayed on my screen.

    


    Below code is only capturing activity view screenshot not capturing any other app overrlay menu and toast. Mostly because of val v1: View = window.decorView this line.

    


    val mPath: String = context.cacheDir.absolutePath + "/temp_${System.currentTimeMillis()}" + ".png"
// create bitmap screenshot
val v1: View = window.decorView
v1.isDrawingCacheEnabled = true
val bitmap = Bitmap.createBitmap(v1.drawingCache)
v1.isDrawingCacheEnabled = false
val imageFile = File(mPath)
val outputStream = FileOutputStream(imageFile)
val quality = 100
bitmap.compress(Bitmap.CompressFormat.PNG, quality, outputStream)
outputStream.flush()
outputStream.close()


    


    Also try to execute command to capture screenshot via app programming but not get succeed,

    


    val process = Runtime.getRuntime().exec("su")
val os = DataOutputStream(process.outputStream)
val cmd= "exec-out screencap"
os.writeBytes(cmd)
os.close()


    


    Requirement

    


      

    • Listener to identify if any other app displaying overlay menu.
    • 


    • I would like to capture screenshot when any other application overlay is displayed on my screen and screenshot must contains other application overlay.
    • 


    


    Please let me know how can i archive this. I really appreciate for your single reply or answer. Thanks in advance.