Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (99)

  • 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 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

Sur d’autres sites (12822)

  • JavaCV : avformat_open_input() hangs (not network, but with custom AVIOContext)

    14 octobre 2015, par Yun Tao Hai

    I’m using a custom AVIOContext to bridge FFMpeg with java IO. The function avformat_open_input() never returns. I have searched the web for similar problems, all of which were caused by faulty network or wrong server configurations. However, I’m not using network at all, as you can see in the following little program :

    package com.example;

    import org.bytedeco.javacpp.*;
    import java.io.File;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import static org.bytedeco.javacpp.avcodec.*;
    import static org.bytedeco.javacpp.avformat.*;
    import static org.bytedeco.javacpp.avutil.*;
    import static org.bytedeco.javacpp.avdevice.*;
    import static org.bytedeco.javacpp.avformat.AVFormatContext.*;

    public class Test {

       public static void main(String[] args) throws Exception {
           File dir = new File(System.getProperty("user.home"), "Desktop");
           File file = new File(dir, "sample.3gp");
           final RandomAccessFile raf = new RandomAccessFile(file, "r");

           Loader.load(avcodec.class);
           Loader.load(avformat.class);
           Loader.load(avutil.class);
           Loader.load(avdevice.class);
           Loader.load(swscale.class);
           Loader.load(swresample.class);

           avcodec_register_all();
           av_register_all();
           avformat_network_init();
           avdevice_register_all();

           Read_packet_Pointer_BytePointer_int reader = new Read_packet_Pointer_BytePointer_int() {
               @Override
               public int call(Pointer pointer, BytePointer buf, int bufSize) {
                   try {
                       byte[] data = new byte[bufSize]; // this is inefficient, just use as a quick example
                       int read = raf.read(data);

                       if (read <= 0) {
                           System.out.println("EOF found.");
                           return AVERROR_EOF;
                       }

                       System.out.println("Successfully read " + read + " bytes of data.");
                       buf.position(0);
                       buf.put(data, 0, read);
                       return read;
                   } catch (Exception ex) {
                       ex.printStackTrace();
                       return -1;
                   }
               }
           };

           Seek_Pointer_long_int seeker = new Seek_Pointer_long_int() {
               @Override
               public long call(Pointer pointer, long offset, int whence) {
                   try {
                       raf.seek(offset);
                       System.out.println("Successfully seeked to position " + offset + ".");
                       return offset;
                   } catch (IOException ex) {
                       return -1;
                   }
               }
           };

           int inputBufferSize = 32768;
           BytePointer inputBuffer = new BytePointer(av_malloc(inputBufferSize));
           AVIOContext ioContext = avio_alloc_context(inputBuffer, inputBufferSize, 1, null, reader, null, seeker);
           AVInputFormat format = av_find_input_format("3gp");
           AVFormatContext formatContext = avformat_alloc_context();
           formatContext.iformat(format);
           formatContext.flags(formatContext.flags() | AVFMT_FLAG_CUSTOM_IO);
           formatContext.pb(ioContext);

           // This never returns. And I can never get result.
           int result = avformat_open_input(formatContext, "", format, null);

           // all clean-up code omitted for simplicity
       }

    }

    And below is my sample console output :

    Successfully read 32768 bytes of data.
    Successfully read 32768 bytes of data.
    Successfully read 32768 bytes of data.
    Successfully read 32768 bytes of data.
    Successfully read 32768 bytes of data.
    Successfully read 7240 bytes of data.
    EOF found.

    I’ve checked the sum of bytes, which corresponds to the file size ; EOF is also hit, meaning the file is completely read. Actually I am a bit skeptical as why avformat_open_input() would even read the entire file and still without returning ? There must be something wrong with what I am doing. Can any expert shed some lights or point me to the right direction ? I’m new to javacv and ffmpeg and especially to programming with Buffers and stuff. Any help, suggestion or criticism is welcome. Thanks in advance.

  • Cannot include FFmpegMediaPlayer lib in my android project

    20 août 2015, par Lucabro

    I’ve to include in my Android studio project a lib for managing audio streams from urls. I’m tying to use this, but when I try to run the app and it reach the point where have to instantiate a FFmpegMediaPlayer object, it crush with the error

    31444-31444/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
       java.lang.ExceptionInInitializerError

    These the steps I’ve done to integrate the lib in my project :

    • I’ve copied all .so, gdb.setup and gdbserver files from demo project and put them into my jniLibs replicating the exact folder structure
    • I’ve copied fmp.jar from demo my libs forlder
    • I’ve changed all paths in gdb.setup files accordingly with my project folder structure
    • synch with gradle

    I’m not an expert of Android specially for tasks like this, am I missing something important ? If you need it I can give a test app

    Thankyou

    Edit 1

    This is the complete error

    08-19 10:20:42.066  31444-31444/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
       java.lang.ExceptionInInitializerError
               at com.example.lucabrognara.radiostreamprova.RadioActivity.onCreate(RadioActivity.java:126)
               at android.app.Activity.performCreate(Activity.java:5206)
               at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
               at android.app.ActivityThread.access$700(ActivityThread.java:140)
               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
               at android.os.Handler.dispatchMessage(Handler.java:99)
               at android.os.Looper.loop(Looper.java:137)
               at android.app.ActivityThread.main(ActivityThread.java:4921)
               at java.lang.reflect.Method.invokeNative(Native Method)
               at java.lang.reflect.Method.invoke(Method.java:511)
               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
               at dalvik.system.NativeStart.main(Native Method)
        Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]:  1836 could not load needed library 'libswresample.so' for 'libavcodec.so' (load_library[1094]: Library 'libswresample.so' not found)
               at java.lang.Runtime.load(Runtime.java:340)
               at java.lang.System.load(System.java:521)
               at wseemann.media.FFmpegMediaPlayer.<clinit>(FFmpegMediaPlayer.java:604)
                at com.example.lucabrognara.radiostreamprova.RadioActivity.onCreate(RadioActivity.java:126)
                at android.app.Activity.performCreate(Activity.java:5206)
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
                at android.app.ActivityThread.access$700(ActivityThread.java:140)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
                at android.os.Handler.dispatchMessage(Handler.java:99)
                at android.os.Looper.loop(Looper.java:137)
                at android.app.ActivityThread.main(ActivityThread.java:4921)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:511)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
                at dalvik.system.NativeStart.main(Native Method)
    </clinit>
  • Extracting image frames from mjpeg given 'frame byte offset' and 'frame size' [on hold]

    2 septembre 2015, par Sonia

    I’m looking for code or pointers to funtions or library that I can use to extract image frames from motion jpeg file. In my case, for each image frame, I know the starting byte offset and the size of the frame (size is not always equal for each frame). Given these data, how can I extract each image frames from mjpeg file.

    I have checked the OpenCV library, I can’t find the detail about giving these two inputs to extract frames. Also, I can’t find it in FFmpeg as well. But, I’m not an expert in these two. I hope anyone could give me pointers to this. It can be just a tool or sourcecode (I use C/C++ and MATLAB but I’m open to other language - just to learn how to do it)

    Thank you very much.