Recherche avancée

Médias (91)

Autres articles (97)

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

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

Sur d’autres sites (11427)

  • Adding prebuild static library to android studio

    24 mars 2017, par David Barishev

    I have build ffmpeg libraries statically for x86 android using a custom configuration.Now i wanted to add them in my android project.

    Im using ffmpeg 3.2.git, android studio 2.3.

    I created a folder named distribution which had my binaries, located the root of my project.
    Here is a file tree :

    |__distribution
    | |__avcodec
    | | |__include
    | | | |__avcodec.h
    | | |__lib
    | | | |__x86
    | | | | |__libavcodec.a
    | |__avfilter
    | | |__include
    | | | |__avfilter.h
    | | |__lib
    | | | |__x86
    | | | | |__libavfilter.a
    | |__avformat
    | | |__include
    | | | |__avformat.h
    | | |__lib
    | | | |__x86
    | | | | |__libavformat.a
    | |__avutil
    | | |__include
    | | | |__avutil.h
    | | |__lib
    | | | |__x86
    | | | | |__libavutil.a
    | |__swresample
    | | |__include
    | | | |__swresample.h
    | | |__lib
    | | | |__x86
    | | | | |__libswresample.a

    I edited my cmake to include the libraries :

    add_library(
            native-lib
            SHARED
            src/main/cpp/native-lib.cpp )

    set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)

    add_library(lib_avcodec STATIC IMPORTED)
    set_target_properties(lib_avcodec PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/avcodec/lib/${ANDROID_ABI}/libavcodec.a)

    add_library(lib_avfilter STATIC IMPORTED)
    set_target_properties(lib_avfilter PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/avfilter/lib/${ANDROID_ABI}/libavfilter.a)

    add_library(lib_avformat STATIC IMPORTED)
    set_target_properties(lib_avformat PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/avformat/lib/${ANDROID_ABI}/libavformat.a)

    add_library(lib_avutil STATIC IMPORTED)
    set_target_properties(lib_avutil PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/avutil/lib/${ANDROID_ABI}/libavutil.a)

    add_library(lib_swresample STATIC IMPORTED)
    set_target_properties(lib_swresample PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/swresample/lib/${ANDROID_ABI}/libswresample.a)



    include_directories(
                              ${distribution_DIR}/avcodec/include
                              ${distribution_DIR}/avfilter/include
                              ${distribution_DIR}/avformat/include
                              ${distribution_DIR}/avutil/include
                              ${distribution_DIR}/swresample/include)


    target_link_libraries(
                          native-lib

                          lib_avcodec
                          lib_avfilter
                          lib_avformat
                          lib_avutil
                          lib_swresample
                           )

    I also restricted the build to only x86, in my app build.gradle :

    ndk {
               // Specifies the ABI configurations of your native
               // libraries Gradle should build and package with your APK.
               abiFilters 'x86'
       }

    The project gradle sync worked successfully.
    I edited my cpp file to try to use the libraries, and i noticed something weird,i couldn’t reference the headers with the library beforehand, only the header name itself (eg. #include "libavformat/avformat.h" doesn’t work, #include "avformat.h" works).
    I suspect this is because of the headers reference, that they are not tied to a library.
    How can i fix it ?

    Also this makes the project build fail, since in the static libraries headers, there is a reference to other part of the library (eg avformat includes avcodec),but they reference it with the library name beforehand, and as i have said earlier, it doesn’t work.

    Here is the relevant build log part :

    ../../../../../distribution/avformat/include\avformat.h:319:10: fatal error: 'libavcodec/avcodec.h' file not found
     #include "libavcodec/avcodec.h"
              ^
  • Trying to merge two videos from my photo roll with Flutter ffmpeg without success

    4 avril 2023, par Stéphane de Luca

    My goal is to merge too video I pick from my photo roll.
My code starts as follows :

    


    // videos[0] contains: "content://media/external/video/media/2779"
 final v1 = await videos[0].getMediaUrl();
    if (v1 == null) return;
    final v1Path = await LecleFlutterAbsolutePath.getAbsolutePath(uri: v1);


    


    But printing v1Pathgive a path with jpeg extension :
/data/user/0/com.example.shokaze/cache/OutputFile_1669939088711.jpeg' which I though would have bear mp4` as it is a video.

    


    Why is it so ?

    


    Another question I have is how can I make a relevant path so that the ffmpeg video appears in my roll after its creation ? Should I do the following and provide outputPathto the code ?

    


    The command it executes is :
-i /data/user/0/com.example.shokaze/cache/OutputFile_1669940421875.jpeg -i /data/user/0/com.example.shokaze/cache/OutputFile_1669940428723.jpeg -filter_complex '[0:0][1:0]concat=n=2:v=1:a=0[out]' -map '[out]' /data/user/0/com.example.shokaze/app_flutter/output.mp4

    


    And I get an error :
I/flutter (30190): error 1

    


    My code is as follows :

    


        String output = "content://media/external/video/media/output";
    final outputPath = await LecleFlutterAbsolutePath.getAbsolutePath(uri: output);
    if (outputPath == null) return;


    


    The full code is as follows :

    


    // Makes the final video by merging all videos from the mixing table
  void makeFinalVideo() async {
    if (videos.length < 2) return;

    final v1 = await videos[0].getMediaUrl();
    if (v1 == null) return;
    final v1Path = await LecleFlutterAbsolutePath.getAbsolutePath(uri: v1);
    if (v1Path == null) return;
    //String v1 = "";
    final v2 = await videos[1].getMediaUrl();
    if (v2 == null) return;
    final v2Path = await LecleFlutterAbsolutePath.getAbsolutePath(uri: v2);
    if (v2Path == null) return;
    String output = "content://media/external/video/media/output";
    final outputPath = "";
    // await LecleFlutterAbsolutePath.getAbsolutePath(uri: output);
    // if (outputPath == null) return;

    Video.merge(v1Path, v2Path, outputPath);
  }



class Video {
  /// Merges the video [v1] with [v2] as [output] video located in app doc path
  static void merge(String v1, String v2, String output) async {
    final appDocDir = await getApplicationDocumentsDirectory();

    //final appDir = await syspaths.getApplicationDocumentsDirectory();
    String rawDocumentPath = appDocDir.path;
    final outputPath = '$rawDocumentPath/output.mp4';

    final command =
        '-i $v1 -i $v2 -filter_complex \'[0:0][1:0]concat=n=2:v=1:a=0[out]\' -map \'[out]\' $outputPath';
    //await execute(command);
    try {
      final r = await FFmpegKit.execute(command);

      //.then((rc) => print("FFmpeg process exited with rc $rc"));
      print("Result: $r");
    } catch (e) {
      print("Exception: $e");
    }
  }
}


    


  • What do these two parts of libavcodec/h263data.h do exactly ?

    5 avril 2013, par Chris Lindgren

    Below are two segments of code from the FFMPEG library, specifically located here : libavcodec/h263data.h (http://ffmpeg.org/doxygen/0.6/h263data_8h-source.html).

    I would like to know more about how these two segments operate in the larger context of the codec library. Below, after these examples, I describe my understanding thus far and provide two clearer questions that I would like answers on.

    Thank you for any help !

    EXAMPLE 1

    00035 /* intra MCBPC, mb_type = (intra), then (intraq) */
    00036 const uint8_t ff_h263_intra_MCBPC_code[9] = { 1, 1, 2, 3, 1, 1, 2, 3, 1 };
    00037 const uint8_t ff_h263_intra_MCBPC_bits[9] = { 1, 3, 3, 3, 4, 6, 6, 6, 9 };

    AND EXAMPLE 2

    00039 /* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */
    00040 /* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */
    00041 const uint8_t ff_h263_inter_MCBPC_code[28] = {
    00042     1, 3, 2, 5,
    00043     3, 4, 3, 3,
    00044     3, 7, 6, 5,
    00045     4, 4, 3, 2,
    00046     2, 5, 4, 5,
    00047     1, 0, 0, 0, /* Stuffing */
    00048     2, 12, 14, 15,
    00049 };

    I understand that we're looking at a small part of the larger library of compression algorithms that affect orthogonal schemes, which predict the “correct,” or more aptly put, "original" inter- or intra-motion vectors, which are represented here in the names "ff_h263_inter_MCBPC_code," "ff_h263_intra_MCBPC_code," and "ff_h263_intra_MCBPC_bits."

    I know that the names in these two blocks of code demarcate the following :

    1. const refers to the declaration of a read only variable that can still be used outside of its scope like any other variable. The difference, stated in another way, is that the values in this array cannot be changed by any methods called outside of itself.

    2. uint8_t is an unsigned integer with a length of 8 bits that is part of a C99 standard, which is called "fixed width integer types." This particular type, an “exact width integer,” computes a range of signed or unsigned bits with a minimum value of 0 and a maximum value of 8, (i.e., the 8x8 macroblocks), which guarantees this number of bits across platforms, whether, let's say, 32-bit or 64-bit operating systems. (I researched this bit here : “Fixed width integer types” http://en.wikipedia.org/wiki/Stdint.h#stdint.h)

    3. MCBPC refers to Macroblock Type & Coded Block Pattern for Chrominance, but I don't fully understand the exact role of these particular arrays are in the scheme of the file and libavcodec. I understand more conceptually, than I do the details/number values defined in these examples.

    So, considering this, here's what I would like to know more about :

    1. Is my understanding, thus far, off in any way ?

    2. Can someone help breakdown what each code segment does ? more specifically, what do these number values signify/do in each case ?

    3. What does "Stuffing" mean ?

    Thank you, again, for any help in this matter !