Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (103)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (4506)

  • How to install JavaCV on Android and use FrameGrabber

    16 mars 2023, par Mark

    Could someone tell me where I'm doing wrong ? These are the steps that I have followed :

    


      

    1. Downloaded the adt-bundle-windows from android developer website

      


    2. 


    3. Created a new project and a libs/armeabi folder

      


    4. 


    5. Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.3-android-arm.zip, and ffmpeg-1.0-android-arm.zip directly into the newly created "libs/armeabi" folder, without creating any new subdirectories.

      


      (A part that I don't understand is "Extract all the *.so files from javacv-android-arm.jar", I simply inserted the javacv-android-arm.jar file inside libs/armeabi folder)

      


    6. 


    7. Navigated to Project > Properties > Java Build Path > Libraries and click "Add JARs...".

      


    8. 


    9. Selected both javacpp.jar and javacv.jar from the newly created "libs" folder.

      


    10. 


    


    After that I have downloaded OpenCV2.4.3 from here and ffmpeg from here and extracted the files on my C :/ root.
Finally after setting my system path...,

    


    C:\opencv\build\x64\vc10\bin;C:\ffmpeg-64\bin;C:\Program Files\Java\jdk1.7.0_10\bin


    


    ...if I try to use simply FrameGrabber in my Android application...

    


    import com.googlecode.javacv.FFmpegFrameGrabber;
import com.googlecode.javacpp.Loader;
import com.googlecode.javacv.*;
import com.googlecode.javacv.cpp.*;
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_calib3d.*;
import static com.googlecode.javacv.cpp.opencv_objdetect.*;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        FFmpegFrameGrabber i = new FFmpegFrameGrabber("/mnt/sdcard/SinglePerson.avi"); 
    }


    


    ...I get the following errors :

    


    01-29 17:59:26.976: E/AndroidRuntime(30656): FATAL EXCEPTION: main
01-29 17:59:26.976: E/AndroidRuntime(30656): java.lang.NoClassDefFoundError: com.googlecode.javacv.FFmpegFrameGrabber
01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.example.xxxxxxxxx.MainActivity.onCreate(MainActivity.java:23)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.Activity.performCreate(Activity.java:4465)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.os.Handler.dispatchMessage(Handler.java:99)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.os.Looper.loop(Looper.java:137)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.main(ActivityThread.java:4424)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at java.lang.reflect.Method.invokeNative(Native Method)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at java.lang.reflect.Method.invoke(Method.java:511)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-29 17:59:26.976: E/AndroidRuntime(30656):    at dalvik.system.NativeStart.main(Native Method)


    


    Someone can help me please ?

    


  • JavaCV convertToIplImage return NULL

    20 juin 2015, par user2642182

    In JavaCV used in Android,while converting Frame to IplImage for applying color effect on video,we are NullPointerException.NPE is only encountered for some of the Frames in the Video.

    ...
    while (true) {
      Log.d("JAVA_CV", "Counting . . . " + count);
      Frame original_frame = ffg.grab();
       if (original_frame == null) {

                       Log.d("JAVA_CV", "original_frame is NULL at" + count);
                       break;
                   } else {
                       Log.d("JAVA_CV", "original_frame is NOT_NULL at" + count);
                       if (converter == null) {
                           Log.d("JAVA_CV", "converter is null at position" +count);
                           continue;

                       }
                       opencv_core.IplImage frame1 = null;
                       if (original_frame != null) {
                           frame1 = converter.convertToIplImage(original_frame);
                       } else {
                           continue;
                       }

                       if (frame1 == null) {
                           Log.d("JAVA_CV", "frame1 is NULL at" + count);
                       } else {

                           if (!frame1.isNull() && original_frame.image != null) {


                               int width = frame1.width();
                               int height = frame1.height();
                               int channel = frame1.nChannels();
                               opencv_core.IplImage frame2 = opencv_core.IplImage.create(width, height, opencv_core.IPL_DEPTH_8U, channel);
                               if (frame2 == null)
                                   continue;
                               opencv_core.cvCopy(frame1, frame2);
                               opencv_core.IplImage frame3 = opencv_core.IplImage.create(width, height, opencv_core.IPL_DEPTH_8U, 1);
                               if (frame3 == null)
                                   continue;
                               opencv_imgproc.cvCvtColor(frame2, frame3, opencv_imgproc.CV_BGRA2GRAY);

                               Log.d("JAVA_CV", "frame1 is NOT_NULL at" + count + " Height " + frame1.height());
                               Frame resultFrame = converter.convert(frame3);
                               if (resultFrame == null)
                                   continue;
                               recorder.record(resultFrame);
                               frame1.release();
                               frame2.release();
                               frame3.release();
                               original_frame = null;
                           } else {
                               break;
                           }
                       }
                   }
                   count++;
               }
    ...

    The Exception stack is here :

    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ java.lang.NullPointerException: This pointer address is NULL.
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at org.bytedeco.javacpp.opencv_core$IplImage.width(Native Method)
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at org.bytedeco.javacv.OpenCVFrameConverter.isEqual(OpenCVFrameConverter.java:75)
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at org.bytedeco.javacv.OpenCVFrameConverter.convertToIplImage(OpenCVFrameConverter.java:85)
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at org.bytedeco.javacv.OpenCVFrameConverter$ToIplImage.convert(OpenCVFrameConverter.java:41)
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at com.appxperts.opencvfirstapp.MainActivitySecond.kaamdg(MainActivitySecond.java:161)
    06-20 12:00:57.664  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at com.appxperts.opencvfirstapp.MainActivitySecond$1.onClick(MainActivitySecond.java:62)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.view.View.performClick(View.java:4463)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.view.View$PerformClick.run(View.java:18789)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:808)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:103)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.os.Looper.loop(Looper.java:193)`enter code here`
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5299)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
    06-20 12:00:57.665  30245-30245/com.appxperts.opencvfirstapp W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
  • How to install JavaCV on Android and use FrameGrabber

    9 octobre 2016, par Mark

    Could someone tell me where I’m doing wrong ? These are the steps that I have followed :

    1. Downloaded the adt-bundle-windows from android developer website
    2. Created a new project and a libs/armeabi folder
    3. Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.3-android-arm.zip, and ffmpeg-1.0-android-arm.zip directly into the newly created "libs/armeabi" folder, without creating any new subdirectories.

      (A part that I don’t understand is "Extract all the *.so files from javacv-android-arm.jar", I simply inserted the javacv-android-arm.jar file inside libs/armeabi folder)

    4. Navigated to Project > Properties > Java Build Path > Libraries and click "Add JARs...".
    5. Selected both javacpp.jar and javacv.jar from the newly created "libs" folder.

    After that I have downloaded OpenCV2.4.3 from here and ffmpeg from here and extracted the files on my C :/ root.
    Finally after setting my system path...,

    C:\opencv\build\x64\vc10\bin;C:\ffmpeg-64\bin;C:\Program Files\Java\jdk1.7.0_10\bin

    ...if I try to use simply FrameGrabber in my Android application...

    import com.googlecode.javacv.FFmpegFrameGrabber;
    import com.googlecode.javacpp.Loader;
    import com.googlecode.javacv.*;
    import com.googlecode.javacv.cpp.*;
    import static com.googlecode.javacv.cpp.opencv_core.*;
    import static com.googlecode.javacv.cpp.opencv_imgproc.*;
    import static com.googlecode.javacv.cpp.opencv_calib3d.*;
    import static com.googlecode.javacv.cpp.opencv_objdetect.*;

    import android.os.Bundle;
    import android.app.Activity;
    import android.view.Menu;

    public class MainActivity extends Activity {

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

           FFmpegFrameGrabber i = new FFmpegFrameGrabber("/mnt/sdcard/SinglePerson.avi");
       }

    ...I get the following errors :

    01-29 17:59:26.976: E/AndroidRuntime(30656): FATAL EXCEPTION: main
    01-29 17:59:26.976: E/AndroidRuntime(30656): java.lang.NoClassDefFoundError: com.googlecode.javacv.FFmpegFrameGrabber
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.example.xxxxxxxxx.MainActivity.onCreate(MainActivity.java:23)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.Activity.performCreate(Activity.java:4465)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.os.Handler.dispatchMessage(Handler.java:99)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.os.Looper.loop(Looper.java:137)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at android.app.ActivityThread.main(ActivityThread.java:4424)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at java.lang.reflect.Method.invokeNative(Native Method)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at java.lang.reflect.Method.invoke(Method.java:511)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    01-29 17:59:26.976: E/AndroidRuntime(30656):    at dalvik.system.NativeStart.main(Native Method)

    Someone can help me please ?