Recherche avancée

Médias (91)

Autres articles (60)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (4584)

  • How to build FFMPEG lib with android ndk

    27 janvier 2017, par S. Le Galloudec

    I introduce my problem : I’m a student working on a project asked by a company to my school.
    My part is to develop an android application (i have to use c++) who can make an authentication, ask to an api wich camera the client can watch, then display in real time the stream of the IP camera (using RTSP protocol)

    To be honnest i’m pretty lost. I’ve found the library FFMPEG, wich looks like useful to my project. If i got it right, the library can display a stream from a camera. So i built the library for my project, and then i tried to include it in my program.

    I did it the same way i did to include the library curl that i already use.

    But when i try to run my program, i got this message :

    FAILURE : Build failed with an exception.

    • What went wrong :
      Execution failed for task ’:app:externalNativeBuildDebug’.
      Build command failed.
      Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
      [1/1] Linking CXX shared library ../obj/x86/liblecteur.so
      FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
      /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/src/main/cpp/lecteur.cpp:19 : error : undefined reference to ’avcodec_configuration’
      clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
      ninja : build stopped : subcommand failed.

      Try :
      Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.

    And i know that the problem comes from my cmakelist, or from my tree. But i don’t see the mistake, so if you could help me. Here is my cmakelist :

    cmake_minimum_required(VERSION 3.4.1)

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


    add_library(lib-curl STATIC IMPORTED)

    add_library(ffmpeg SHARED IMPORTED)

    set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)

    set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)




    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")


    add_library( # Sets the name of the library.
            downloader
            SHARED
            src/main/cpp/downloader.cpp
             #src/main/cpp/downloader.h
             )


    add_library( # Sets the name of the library.
            getrequest
            SHARED
            src/main/cpp/getrequest.cpp
             #src/main/cpp/getrequest.h
             )

    add_library( # Sets the name of the library.
            lecteur
            SHARED
            src/main/cpp/lecteur.cpp
             #src/main/cpp/lecteur.h
             )

    target_include_directories(downloader PRIVATE
                          ${distribution_DIR}/curl/include)

    target_include_directories(getrequest PRIVATE
                          ${distribution_DIR}/curl/include)

    target_include_directories(lecteur PRIVATE
                          ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)


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

             log )

    target_link_libraries( # Specifies the target library.
                      downloader
                      lib-curl
                      z
                      ${log-lib}
                      )

    target_link_libraries( # Specifies the target library.
                      getrequest
                      lib-curl
                      z
                      ${log-lib}
                      )

    target_link_libraries( # Specifies the target library.
                      lecteur
                      ffmpeg
                      z
                      ${log-lib}
                      )

    If you want to understand how i made my cmake, and what looks like my program you can check here : https://github.com/samylegalloudec/android-ndk-ffmepg

    Hope i was clear

    Best regards

    Edit n°1 :

    I think i’ve made a mistake in my cmakelist.txt so i fixed it (i guess) this way :

    cmake_minimum_required(VERSION 3.4.1)

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


    add_library(lib-curl STATIC IMPORTED)



    set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)

    add_library(ffmpeg-codec STATIC IMPORTED)
    set_target_properties(ffmpeg-codec PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)

    add_library(ffmpeg-device STATIC IMPORTED)
    set_target_properties(ffmpeg-device PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)

    add_library(ffmpeg-filter STATIC IMPORTED)
    set_target_properties(ffmpeg-filter PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)

    add_library(ffmpeg-format STATIC IMPORTED)
    set_target_properties(ffmpeg-format PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)

    add_library(ffmpeg-util STATIC IMPORTED)
    set_target_properties(ffmpeg-util PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)

    add_library(ffmpeg-postproc STATIC IMPORTED)
    set_target_properties(ffmpeg-postproc PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)

    add_library(ffmpeg-sample STATIC IMPORTED)
    set_target_properties(ffmpeg-sample PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)

    add_library(ffmpeg-scale STATIC IMPORTED)
    set_target_properties(ffmpeg-scale PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)




    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")


    add_library( # Sets the name of the library.
            downloader
            SHARED
            src/main/cpp/downloader.cpp
             #src/main/cpp/downloader.h
             )


    add_library( # Sets the name of the library.
            getrequest
            SHARED
            src/main/cpp/getrequest.cpp
             #src/main/cpp/getrequest.h
             )

    add_library( # Sets the name of the library.
            lecteur
            SHARED
            src/main/cpp/lecteur.cpp
             #src/main/cpp/lecteur.h
             )

    target_include_directories(downloader PRIVATE
                          ${distribution_DIR}/curl/include)

    target_include_directories(getrequest PRIVATE
                          ${distribution_DIR}/curl/include)

    target_include_directories(lecteur PRIVATE
                          ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)


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

             log )

    target_link_libraries( # Specifies the target library.
                      downloader
                      lib-curl
                      z
                      ${log-lib}
                      )

    target_link_libraries( # Specifies the target library.
                      getrequest
                      lib-curl
                      z
                      ${log-lib}
                      )

    target_link_libraries( # Specifies the target library.
                      lecteur
                      ffmpeg-codec
                      ffmpeg-device
                      ffmpeg-filter
                      ffmpeg-format
                      ffmpeg-util
                      ffmpeg-postproc
                      ffmpeg-sample
                      ffmpeg-scale
                      z
                      ${log-lib}
                      )

    Now i have another message :

    FAILURE : Build failed with an exception.

    • What went wrong :
      Execution failed for task ’:app:externalNativeBuildDebug’.
      Build command failed.
      Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
      [1/1] Linking CXX shared library ../obj/x86/liblecteur.so
      FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libavcodec.a ../../../../../distribution/ffmpeg/x86/lib/libavdevice.a ../../../../../distribution/ffmpeg/x86/lib/libavfilter.a ../../../../../distribution/ffmpeg/x86/lib/libavformat.a ../../../../../distribution/ffmpeg/x86/lib/libavutil.a ../../../../../distribution/ffmpeg/x86/lib/libpostproc.a ../../../../../distribution/ffmpeg/x86/lib/libswresample.a ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
      /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : warning : shared library text segment is not shareable
      /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : error : treating warnings as errors
      clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
      ninja : build stopped : subcommand failed.

    • Try :
      Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.

  • Cant install ffmpeg on my centos 6.8 [migrated]

    6 février 2017, par Cain Nuke

    Hi,

    I am trying to install ffmpeg with this command :

    yum install ffmpeg ffmpeg-devel

    but I get this error

    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Determining fastest mirrors
    Error: Cannot find a valid baseurl for repo: base
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
    Eg. Invalid release/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt

    Why is that ?

    Thank you.

  • Grand Unified Theory of Compact Disc

    1er février 2013, par Multimedia Mike — General

    This is something I started writing about a decade ago (and I almost certainly have some of it wrong), back when compact discs still had a fair amount of relevance. Back around 2002, after a few years investigating multimedia technology, I took an interest in compact discs of all sorts. Even though there may seem to be a wide range of CD types, I generally found that they’re all fundamentally the same. I thought I would finally publishing something, incomplete though it may be.

    Physical Perspective
    There are a lot of ways to look at a compact disc. First, there’s the physical format, where a laser detects where pits/grooves have disturbed the smooth surface (a.k.a. lands). A lot of technical descriptions claim that these lands and pits on a CD correspond to ones and zeros. That’s not actually true, but you have to decide what level of abstraction you care about, and that abstraction is good enough if you only care about the discs from a software perspective.

    Grand Unified Theory (Software Perspective)
    Looking at a disc from a software perspective, I have generally found it useful to view a CD as a combination of a 2 main components :

    • table of contents (TOC)
    • a long string of sectors, each of which is 2352 bytes long

    I like to believe that’s pretty much all there is to it. All of the information on a CD is stored as a string of sectors that might be chopped up into a series of anywhere from 1-99 individual tracks. The exact sector locations where these individual tracks begin are defined in the TOC.

    Audio CDs (CD-DA / Red Book)
    The initial purpose for the compact disc was to store digital audio. The strange sector size of 2352 bytes is an artifact of this original charter. “CD quality audio”, as any multimedia nerd knows, is formally defined as stereo PCM samples that are each 16 bits wide and played at a frequency of 44100 Hz.

    (44100 audio frames / 1 second) * (2 samples / audio frame) * 
      (16 bits / 1 sample) * (1 byte / 8 bits) = 176,400 bytes / second
    (176,400 bytes / 1 second) / (2352 bytes / 1 sector) = 75
    

    75 is the number of sectors required to store a single second of CD-quality audio. A single sector stores 1/75th of a second, or a ‘frame’ of audio (though I think ‘frame’ gets tossed around at all levels when describing CD formats).

    The term “red book” is thrown around in relation to audio CDs. There is a series of rainbow books that define various optical disc standards and the red book describes audio CDs.

    Basic Data CD-ROMs (Mode 1 / Yellow Book)
    Somewhere along the line, someone decided that general digital information could be stored on these discs. Hence, the CD-ROM was born. The standard model above still applies– TOC and string of 2352-byte sectors. However, it’s generally only useful to have a single track on a CD-ROM. Thus, the TOC only lists a single track. That single track can easily span the entire disc (something that would be unusual for a typical audio CD).

    While the model is mostly the same, the most notable difference between and audio CD and a plain CD-ROM is that, while each sector is 2352 bytes long, only 2048 bytes are used to store actual data payload. The remaining bytes are used for synchronization and additional error detection/correction.

    At least, the foregoing is true for mode 1 / form 1 CD-ROMs (which are the most common). “Mode 1″ CD-ROMs are defined by a publication called the yellow book. There is also mode 1 / form 2. This forgoes the additional error detection and correction afforded by form 1 and dedicates 2336 of the 2352 sector bytes to the data payload.

    CD-ROM XA (Mode 2 / Green Book)
    From a software perspective, these are similar to mode 1 CD-ROMs. There are also 2 forms here. The first form gives a 2048-byte data payload while the second form yields a 2324-byte data payload.

    Video CD (VCD / White Book)
    These are CD-ROM XA discs that carry MPEG-1 video and audio data.

    Photo CD (Beige Book)
    This is something I have never personally dealt with. But it’s supposed to conform to the CD-ROM XA standard and probably fits into my model. It seems to date back to early in the CD-ROM era when CDs were particularly cost prohibitive.

    Multisession CDs (Blue Book)
    Okay, I admit that this confuses me a bit. Multisession discs allow a user to burn multiple sessions to a single recordable disc. I.e., burn a lump of data, then burn another lump at a later time, and the final result will look like all the lumps were recorded as the same big lump. I remember this being incredibly useful and cost effective back when recordable CDs cost around US$10 each (vs. being able to buy a spindle of 100 CD-Rs for US$10 or less now). Studying the cdrom.h file for the Linux OS, I found a system call named CDROMMULTISESSION that returns the sector address of the start of the last session. If I were to hypothesize about how to make this fit into my model, I might guess that the TOC has some hint that the disc was recorded in multisession (which needs to be decided up front) and the CDROMMULTISESSION call is made to find the last session. Or it could be that a disc read initialization operation always leads off with the CDROMMULTISESSION query in order to determine this.

    I suppose I could figure out how to create a multisession disc with modern software, or possibly dig up a multisession disc from 15+ years ago, and then figure out how it should be read.

    CD-i
    This type puzzles my as well. I do have some CD-i discs and I thought that I could read them just fine (the last time I looked, which was many years ago). But my research for this blog post has me thinking that I might not have been seeing the entire picture when I first studied my CD-i samples. I was able to see some of the data, but sources indicate that only proper CD-i hardware is able to see all of the data on the disc (apparently, the TOC doesn’t show all of the sectors on disc).

    Hybrid CDs (Data + Audio)
    At some point, it became a notable selling point for an audio CD to have a data track with bonus features. Even more common (particularly in the early era of CD-ROMs) were computer and console games that used the first track of a disc for all the game code and assets and the remaining tracks for beautifully rendered game audio that could also be enjoyed outside the game. Same model : TOC points to the various tracks and also makes notes about which ones are data and which are audio.

    There seems to be 2 distinct things described above. One type is the mixed mode CD which generally has the data in the first track and the audio in tracks 2..n. Then there is the enhanced CD, which apparently used multisession recording and put the data at the end. I think that the reasoning for this is that most audio CD player hardware would only read tracks from the first session and would have no way to see the data track. This was a positive thing. By contrast, when placing a mixed-mode CD into an audio player, the data track would be rendered as nonsense noise.

    Subchannels
    There’s at least one small detail that my model ignores : subchannels. CDs can encode bits of data in subchannels in sectors. This is used for things like CD-Text and CD-G. I may need to revisit this.

    In Summary
    There’s still a lot of ground to cover, like how those sectors might be formatted to show something useful (e.g., filesystems), and how the model applies to other types of optical discs. Sounds like something for another post.