Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (70)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

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

Sur d’autres sites (8578)

  • Java Xuggler Metadata List of Chapters MP4/M4V Video

    27 juin 2017, par MrSax

    I’m trying to use Xuggler like FFMPEG Metadata Wrapper (I just need the list of Chapters of MP4/M4V Video).

    So far I have not been able to find a solution.
    Can anyone help me ?

    I was only able to get the following information :

       final String filename = "...path...";
       IContainer container = IContainer.make();
       int result = container.open(filename, IContainer.Type.READ, null);
       if (result < 0)
           throw new RuntimeException("Failed to open media file");
       int numStreams = container.getNumStreams();
       long duration = container.getDuration();
       long fileSize = container.getFileSize();
       long bitRate = container.getBitRate();
       System.out.println("Number of streams: " + numStreams);
       System.out.println("Duration (ms): " + duration);
       System.out.println("File Size (bytes): " + fileSize);
       System.out.println("Bit Rate: " + bitRate);
       for (int i = 0; i < numStreams; i++) {
           IStream stream = container.getStream(i);
           IStreamCoder coder = stream.getStreamCoder();
           System.out.println("*** Start of Stream Info ***");
           System.out.printf("stream %d: ", i);
           System.out.printf("type: %s; ", coder.getCodecType());
           System.out.printf("codec: %s; ", coder.getCodecID());
           System.out.printf("duration: %s; ", stream.getDuration());
           System.out.printf("start time: %s; ", container.getStartTime());
           System.out.printf("timebase: %d/%d; ", stream.getTimeBase().getNumerator(),
                   stream.getTimeBase().getDenominator());
           System.out.printf("coder tb: %d/%d; ", coder.getTimeBase().getNumerator(),
                   coder.getTimeBase().getDenominator());
           System.out.println();
           if (coder.getCodecType() == ICodec.Type.CODEC_TYPE_AUDIO) {
               System.out.printf("sample rate: %d; ", coder.getSampleRate());
               System.out.printf("channels: %d; ", coder.getChannels());
               System.out.printf("format: %s", coder.getSampleFormat());
           } else if (coder.getCodecType() == ICodec.Type.CODEC_TYPE_VIDEO) {
               System.out.printf("width: %d; ", coder.getWidth());
               System.out.printf("height: %d; ", coder.getHeight());
               System.out.printf("format: %s; ", coder.getPixelType());
               System.out.printf("frame-rate: %5.2f; ", coder.getFrameRate().getDouble());
           }
           System.out.println();
           System.out.println("*** End of Stream Info ***");

    UPDATE 07.06.2017
    I just tried it with VLCJ, but still I can not get the list of chapters.

       File file = new File("ia_ISL_13_r720P.m4v");

       NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "vlc64/");
       Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);

       MediaPlayerFactory mpf = new MediaPlayerFactory();
       EmbeddedMediaPlayer emp = mpf.newEmbeddedMediaPlayer();

       MediaMeta mediaMeta = mpf.getMediaMeta(file.getAbsolutePath(), true);
       MediaMetaData asMediaMetaData = mediaMeta.asMediaMetaData();
       System.out.println(asMediaMetaData.getAlbum());
       System.out.println(asMediaMetaData.getArtist());
       System.out.println(asMediaMetaData.getTitle());

       emp.prepareMedia(file.getAbsolutePath());
       emp.play();
       emp.nextChapter(); // -> GO NEXT CHAPTER - SUCCESS

       List> allChapterDescriptions = emp.getAllChapterDescriptions();

       for (List<string> list : allChapterDescriptions) {
           for (String string : list) {
               System.out.println(string);
           }
       }
    </string>
  • Android ffmpeg. Linker command failed with exit code 1

    8 juin 2017, par Wilsom Sanders

    I’m trying to build ffmpeg static libraries and link them to an android project in order to implement a video player. Goal is to make a player capable of receiving video file from various sources similar to p2p file sharing networks. (target api is 21 level which is 1 level short from supposed official solution with MediaSource)

    I managed to compile ffmpeg from this repo (all the code used as-is) but later i got stuck on a linking problem. Whenever I try to compile I get list of ffmpeg methods called in my code and a short eloquent message :

    Linker command failed with exit code 1

    I have no clue how to pass -v flag to the linker in android studio. Would be great if somebody hinted me that.

    I use android studio, build with gradle and cmake.

    There’s my files :
    build.gradle (Project)

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
       repositories {
           jcenter()
       }
       dependencies {
           classpath 'com.android.tools.build:gradle:2.3.1'

           // NOTE: Do not place your application dependencies here; they belong
           // in the individual module build.gradle files
       }
    }

    allprojects {
       repositories {
           jcenter()
       }
    }

    task clean(type: Delete) {
       delete rootProject.buildDir
    }

    build.gradle (Module)

    apply plugin: 'com.android.application'

       android {
           compileSdkVersion 25
           buildToolsVersion "25.0.3"
           productFlavors {
               x86 {
                   ndk {
                       abiFilter "x86"
                   }
               }
               arm {
                   ndk {
                       abiFilters "armeabi-v7a"
                   }
               }
               armv7 {
                   ndk {
                       abiFilters "armeabi-v7a"
                   }
               }
           }
           defaultConfig {
               applicationId "com.example.ledo.ndkapplication"
               minSdkVersion 22
               targetSdkVersion 25
               versionCode 1
               versionName "1.0"
               testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
               externalNativeBuild {
                   cmake {
                       cppFlags "-std=c++11 -frtti -fexceptions"
                       arguments '-DANDROID_PLATFORM=android-16'
                   }
               }
           }
           buildTypes {
               release {
                   minifyEnabled false
                   proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
               }
           }
           externalNativeBuild {
               cmake {
                   path "CMakeLists.txt"
               }
           }
           splits {
               abi {
                   enable true
                   reset()
                   include 'x86', 'armeabi-v7a'
                   universalApk true
               }
           }
       }

       dependencies {
           compile fileTree(dir: 'libs', include: ['*.jar'])
           androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
               exclude group: 'com.android.support', module: 'support-annotations'
           })
           compile 'com.android.support:appcompat-v7:25.3.1'
           compile 'com.android.support.constraint:constraint-layout:1.0.2'
           compile 'com.android.support:design:25.3.1'
           compile 'com.writingminds:FFmpegAndroid:0.3.2'
           testCompile 'junit:junit:4.12'
       }

    CMakeLists.txt

    # For more information about using CMake with Android Studio, read the
    # documentation: https://d.android.com/studio/projects/add-native-code.html

    # Sets the minimum version of CMake required to build the native library.

    cmake_minimum_required(VERSION 2.8)

    # Creates and names a library, sets it as either STATIC
    # or SHARED, and provides the relative paths to its source code.
    # You can define multiple libraries, and CMake builds them for you.
    # Gradle automatically packages shared libraries with your APK.

    add_library( # Sets the name of the library.
                native-lib

                # Sets the library as a shared library.
                SHARED

                # Provides a relative path to your source file(s).
                src/main/cpp/native-lib.cpp
                src/main/cpp/NativePlayer.h
                src/main/cpp/NativePlayer.cpp)

    # Searches for a specified prebuilt library and stores the path as a
    # variable. Because CMake includes system libraries in the search path by
    # default, you only need to specify the name of the public NDK library
    # you want to add. CMake verifies that the library exists before
    # completing its build.

    find_library( # Sets the name of the path variable.
                 log-lib

                 # Specifies the name of the NDK library that
                 # you want CMake to locate.
                 log )
    find_library(png-lib png)

    # Specifies libraries CMake should link to your target library. You
    # can link multiple libraries, such as libraries you define in this
    # build script, prebuilt third-party libraries, or system libraries.

    #avcodec
    #avfilter
    #avformat
    #avutil
    #swresample
    #swscale

    #${ANDROID_ABI}

    message(${ANDROID_ABI})
    set(FFMPEG_ROOT_DIR src/main/libs/ffmpeg/${ANDROID_ABI})

    add_library(avcodec STATIC IMPORTED)
    add_library(avformat STATIC IMPORTED)
    add_library(avfilter STATIC IMPORTED)
    add_library(avutil STATIC IMPORTED)
    add_library(swresample STATIC IMPORTED)
    add_library(swscale STATIC IMPORTED)

    #SET_TARGET_PROPERTIES(avcodec PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libavcodec.a)
    #SET_TARGET_PROPERTIES(avfilter PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libavfilter.a)
    #SET_TARGET_PROPERTIES(avformat PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libavformat.a)
    #SET_TARGET_PROPERTIES(avutil PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libavutil.a)
    #SET_TARGET_PROPERTIES(swresample PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libswresample.a)
    #SET_TARGET_PROPERTIES(swscale PROPERTIES LINKER_LANGUAGE C)
    set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib/libswscale.a)

    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/include )
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/${FFMPEG_ROOT_DIR}/lib )
    target_link_libraries( # Specifies the target library.
                          native-lib

                          # Links the target library to the log library
                          # included in the NDK.
                          ${log-lib}
                          avcodec
                          avformat
                          #avfilter
                          #swresample
                          #swscale
                          #avutil
                          GLESv2)

    I have .a files in following locations :
    %PROJECT_DIR%/app/src/libs/ffmpeg/armeabi-v7a
    %PROJECT_DIR%/app/src/libs/ffmpeg/armeabi-v7a-neon
    %PROJECT_DIR%/app/src/libs/ffmpeg/x86

    It doesn’t look to me that linker misses files themselves. (I get different out put if I misplace them.)

  • Create video with list of image url and mp3 file using ffmpeg for php

    12 juin 2017, par Darshan ambaliya

    i am creating sideshow with the use of ffmpeg install on my Linux system and when i am try to create slideshow with the list of command then its ok but when i am try to create with long duration mp3 file it will generate video without images here the list of different commands which are working and not wokring

    can you please and let me know what i am missing so you can guide me.

    ffmpeg -r 1/5 -f concat  -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i /var/www/html/ffmpe/test.txt -i /var/www/html/ffmpe/2.mp3 -c:v libx264 -c:a copy -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" /var/www/html/ffmpe/1.mp4

    //working with 47 seconds songs

    ffmpeg -r 1/5 -f concat  -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i /var/www/html/ffmpe/test.txt -i /var/www/html/ffmpe/1.mp3 -c:v libx264 -c:a copy -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" /var/www/html/ffmpe/1.mp4

    same command not working with 1.mp3 which is 4 minute and 30 seconds duration

    Here are both commands with differnet mp3 files so can you please check and let me know where i am going wrong .

    test.txt file contains the image urls