Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (44)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6163)

  • Linker command failed with exit code 1 when building ffmpeg static libraries

    19 juillet 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.)

  • cant find out how to make auto exit with ffmpeg in visual studio

    27 juillet 2017, par Beni Blinches

    I have a process which is a song that is playing audio from youtube using ffmpeg, and I want the song to stop when its done. I have this function

    private Process CreateStream(string path)
    {
       Program.current_s = new Process();
       Program.current_s.Exited += new EventHandler(WhenSongEnds);
       Program.current_s.StartInfo = new ProcessStartInfo
       {
           FileName = "cmd.exe",
           Arguments = $"/C youtube-dl.exe -o - {path} | ffmpeg -i pipe:0 -ac 2 -f s16le -ar 48000 pipe:1",
           UseShellExecute = false,
           RedirectStandardOutput = true,
           CreateNoWindow = true

       };
       Console.WriteLine("                     ffmpeg is ready");
       Program.current_s.Start();
       return Program.current_s;
    }

    I tried to use autoexit and ffplay. But, I cant get it right, because I’m quite unfamiliar with the software

  • Different results for exit conditions in process call

    31 août 2017, par Martin KS

    As a small part of a project, I’m calling ffmpeg to convert a video - I worked from an old example that used some of the output to create a progress bar, which was hanging. Code below :

    [initiation code common to both examples]
       Dim inputFile, outputFile As String, myProcess As New Process
       Dim psiProcInfo As New ProcessStartInfo, ffreader As StreamReader


       inputFile = "C:\Users\mklefass\Downloads\Video 2017-08-16 21.01.39.mov"
       outputFile = "C:\Users\mklefass\Downloads\tmp2\Output"

       psiProcInfo.FileName = Application.StartupPath + "\ffmpeg.exe"  'Location Of FFMPEG.EXE
       psiProcInfo.Arguments = " -i " & Chr(34) & inputFile & Chr(34) & " -vf fps=5 " & Chr(34) & outputFile & "%d.jpg" & Chr(34)                              'start ffmpeg with command strFFCMD string
       psiProcInfo.UseShellExecute = False                             'use the shell execute command we always want no
       psiProcInfo.WindowStyle = ProcessWindowStyle.Hidden             'hide the ffmpeg process window
       psiProcInfo.RedirectStandardError = True                        'Redirect the error out so we can read it
       psiProcInfo.RedirectStandardOutput = True                       'Redirect the standard out so we can read it
       psiProcInfo.CreateNoWindow = True

    [bit that changes]
    myProcess.Start()
    ffreader = myProcess.StandardError
    Do
       Try
           If Not myProcess.HasExited Then
               'Debug.WriteLine(ffreader.ReadLine)
           End If
       Catch
           If Not myProcess.HasExited Then
               MsgBox("Something went wrong")
           End If
       End Try
    Loop Until myProcess.HasExited
    MsgBox("done")

    I then found another example that just called the executable and then continued when it was done - as below :

    [same initialisation]
    Debug.WriteLine("Starting...")
    myProcess.Start()
    strOutput = myProcess.StandardError.ReadToEnd
    myProcess.WaitForExit()
    myProcess.Close()

    Debug.Write(strOutput)
    MsgBox("done")

    The second approach worked perfectly... What’s different about the "exit state" that Process.HasExited and Process.WaitForExit look for ?