Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (75)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (10405)

  • Surface Texture object is not getting the frames from a Surface Class

    22 avril 2016, par Juan Manuel González Otero

    On the one hand, I have a Surface Class which when instantiated, automatically initialize a new thread and start grabbing frames from a streaming source via native code based on FFMPEG. Here is the main parts of the code for the aforementioned Surface Class :

    public class StreamingSurface extends Surface implements Runnable {

       ...

       public StreamingSurface(SurfaceTexture surfaceTexture, int width, int height) {
           super(surfaceTexture);

           screenWidth  = width;
           screenHeight = height;      
           init();

       }

       public void init() {
           mDrawTop = 0;
           mDrawLeft = 0;
           mVideoCurrentFrame = 0;
           this.setVideoFile();
           this.startPlay();
       }

       public void setVideoFile() {        
           // Initialise FFMPEG
           naInit("");

           // Get stream video res
           int[] res = naGetVideoRes();
           mDisplayWidth = (int)(res[0]);
           mDisplayHeight = (int)(res[1]);

           // Prepare Display
           mBitmap = Bitmap.createBitmap(mDisplayWidth, mDisplayHeight, Bitmap.Config.ARGB_8888);
           naPrepareDisplay(mBitmap, mDisplayWidth, mDisplayHeight);
       }

       public void startPlay() {
           thread = new Thread(this);
           thread.start();
       }

       @Override
       public void run() {
           while (true) {
               while (2 == mStatus) {
                   //pause
                   SystemClock.sleep(100);
               }
               mVideoCurrentFrame = naGetVideoFrame();
               if (0 < mVideoCurrentFrame) {
                   //success, redraw
                   if(isValid()){
                        Canvas canvas = lockCanvas(null);
                        if (null != mBitmap) {
                            canvas.drawBitmap(mBitmap, mDrawLeft, mDrawTop, prFramePaint);
                        }
                        unlockCanvasAndPost(canvas);
                   }
               } else {
                   //failure, probably end of video, break
                   naFinish(mBitmap);
                   mStatus = 0;
                   break;
               }
           }  
       }

    }

    In my MainActivity class, I instantiated this class in the following way :

    public void startCamera(int texture)
    {
       mSurface = new SurfaceTexture(texture);
       mSurface.setOnFrameAvailableListener(this);
       Surface surface = new StreamingSurface(mSurface, 640, 360);
       surface.release();        
    }

    I read the following line in the Android developer page, regarding the Surface class constructor :

    "Images drawn to the Surface will be made available to the SurfaceTexture, which can attach them to an OpenGL ES texture via updateTexImage()."

    That is exactly what I want to do, and I have everything ready for the further renderization. But definitely, with the above code, I never get my frames captured in the surface class transformed to its corresponding SurfaceTexture. I know this because the debugger, for instace, never call the OnFrameAvailableLister method associated with that Surface Texture.

    Any ideas ? Maybe the fact that I am using a thread to call the drawing functions is messing everything ? In such a case, what alternatives I have to grab the frames ?

    Thanks in advance

  • android:video watermark show error

    27 avril 2016, par Sakibmohammad Syed

    I want to watermark video and below is my code but when I try to run then it show error like Failed to validate license file, existing!.

       public class MainActivity extends AppCompatActivity {
       private String strAudioFolderPath;
       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           // here my ffmpeg command to watermark video.
           String s = "ffmpeg -i /sdcard/Download/testing.mp4 -i /sdcard/temp1.jpg -filter_complex 'overlay=10:main_h-overlay_h-10' /sdcard/Download/out.mp4";

           GeneralUtils.deleteFileUtil(strAudioFolderPath + "vk.log");
           PowerManager powerManager = (PowerManager) this.getSystemService(Activity.POWER_SERVICE);
           PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
           wakeLock.acquire();
           LoadJNI vk = new LoadJNI();
           try {
               try {
                   vk.run(GeneralUtils.utilConvertToComplex(s), strAudioFolderPath, MainActivity.this);
                   Log.e("Checking water marker", ">>>>>>>>>>>>>>>");

               } catch (Throwable e) {
               } finally {
                   if (wakeLock.isHeld())
                       wakeLock.release();
                   else {
                   }
               }
           } catch (Exception e)
           {
               e.printStackTrace();
           }        
       }
    }

    and error show in logcat like below.

       04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo I/Videokit: license file not found...
    04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo I/Videokit: license file /sdcard/Download/testing.mp4/ffmpeglicense.lic not created.
    04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo D/Videokit: license check rc: -3
    04-26 17:13:18.211 20492-20492/com.example.android.watermarkvideo E/Videokit: Failed to validate license file, existing!

    Actually I have used ffmpeg library to watermak on video file but it is not woking as well as I have not find any proper solution so please help.
    Thanks in advance.

  • FFmpeg can't run in some device Android

    30 mars 2016, par tqn

    i’m working in a video processing project and now i’m using ffmpeg library in Android. I’m facing with a strange problem with asus zenphone 4 t00l (or all x86 device, I’ve just test in this x86 phone). When start command in project, app always crash :

    03-30 15:08:18.461 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:08:18.781 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 63
    03-30 15:26:15.913 21068-21068/com.paditech.videa D/VideoActivity: onDestroy
    03-30 15:26:18.993 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:26:19.263 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:42.583 21068-21184/com.paditech.videa D/FFmpeg: Running publishing updates method
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 85
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected

    First, I think the problem is ffmpeg library. So I created a test module with simple activity just load and run command and there’re no problem.

    Second, I’m afraid that app cannot load version ffmpeg, because in my log, it’s armv7-neon althought it’s x86 (In my test module, it display x86). And according my search result, may be a external library make app to use abi arm (Build.CPU_API="armv7"). So I try remove all library in gradle in module Test and detected a library. But check in aar file of library, it support all x86 and arm. But after remove it, app still crash with same log. And strangely, althogh Test module register as arm but it’still run success (External question : Why add library jp.wasabeef:picasso-transformations make system register as armv7 although it’s x86)

    Finally, i think problem is command. But after debug, I use same command for Test module but it still success. Now i’m still stuck with it. Could anyone help me to solve it. Thanks. Here my demo code :

       String input = "/storage/emulated/0/Videa/Video/VIDEO_20160122_160020.mp4";
       String output = "/storage/emulated/0/Videa/Audio/AUDIO_20160330_142501.wav";
       String[] command = {
               "-y",
               "-i",
               input,
               "-vn",
               "-f",
               "wav",
               output
       };
       FFmpeg ffmpeg = FFmpeg.getInstance(getApplicationContext());
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {

               @Override
               public void onSuccess(String message) {
                   super.onSuccess(message);
                   System.out.println("Success " + message);
               }

               @Override
               public void onFailure(String message) {
                   super.onFailure(message);
                   System.out.println("Failure " + message);
               }
           });
       } catch (Exception e) {
           e.printStackTrace();
       }

    And here is Failed command :

       ArrayList<string> cmd = new ArrayList<string>();
       cmd.add("-y");
       cmd.add("-i");
       cmd.add(input);
       cmd.add("-vn");
       cmd.add("-f");
       cmd.add("wav");
       cmd.add(output);
       String[] result = new String[cmd.size()];
       return cmd.toArray(result);
    </string></string>