Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (67)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

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

  • ffmpeg program written in C, cannot open my camera in macOS Catalina 10.15.7

    27 mai 2022, par marco0631
    #include 
#include 
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"

AVFormatContext* openCamera(void) {
    avdevice_register_all();
    AVFormatContext *ctx = avformat_alloc_context();
    AVInputFormat *ifmt = av_find_input_format("avfoundation");
    if (ifmt != NULL) {
        AVDictionary *opts = NULL;
        av_dict_set(&opts, "video_size", "1280x720", 0);
        av_dict_set(&opts, "framerate", "30", 0);
        av_dict_set(&opts, "pixel_format", "uyvy422", 0);
        
        int ret = avformat_open_input(&ctx, "0", ifmt, &opts);
        if (ret != 0) {
            printf("no");
            avformat_free_context(ctx);
            return NULL;
        }
    }
    return ctx;
}

int main(int argc, const char *argv[]) {
    openCamera();
}



    


    My code run on Xcode. After I have added the plist file, the running program camera opens for about half a second and then closes. and console output

    


    2022-02-22 00:39:19.372178&#x2B;0800 ffmpeg-tool[5977:195724] [plugin] AddInstanceForFactory: No factory registered for id <cfuuid 0x10640cf60="0x10640cf60"> F8BB1C28-BAE8-11D6-9C31-00039315CD46&#xA;2022-02-22 00:39:19.434783&#x2B;0800 ffmpeg-tool[5977:195724]  HALC_ShellDriverPlugIn::Open: Can&#x27;t get a pointer to the Open routine&#xA;2022-02-22 00:39:19.435262&#x2B;0800 ffmpeg-tool[5977:195724]  HALC_ShellDriverPlugIn::Open: Can&#x27;t get a pointer to the Open routine&#xA;2022-02-22 00:39:19.501780&#x2B;0800 ffmpeg-tool[5977:195724] [plugin] AddInstanceForFactory: No factory registered for id <cfuuid 0x10640f860="0x10640f860"> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A&#xA;2022-02-22 00:39:19.605797&#x2B;0800 ffmpeg-tool[5977:195724] Metal API Validation Enabled&#xA;2022-02-22 00:39:21.701071&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:917:CMIODeviceStopStream the System is exiting&#xA;2022-02-22 00:39:21.701268&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:1332:CMIOStreamCopyBufferQueue the System is exiting&#xA;2022-02-22 00:39:21.701538&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:333:CMIOObjectGetPropertyData the System is exiting&#xA;2022-02-22 00:39:21.701767&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0&#xA;2022-02-22 00:39:21.702472&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:333:CMIOObjectGetPropertyData the System is exiting&#xA;2022-02-22 00:39:21.702662&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0&#xA;Program ended with exit code: 0&#xA;</cfuuid></cfuuid>

    &#xA;

    How can I solve this problem ?

    &#xA;

  • FFmpeg can't read a video stream, but VLC reads it fine

    21 mai 2022, par J.Doe

    I have a video stream that I can access using VLC, but can't access with ffmpeg. This used to work before I moved onto using a new computer (but with same camera).

    &#xA;

    This is the ffprobe command (made up IP addr) :

    &#xA;

    ffprobe -hide_banner -rtsp_transport tcp "rtsp://root:pass@12.34.567.890:80/axis-media/media.amp?event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/."

    &#xA;

    It returns

    &#xA;

    rtsp://root:pass@12.34.567.890:80/axis-media/media.amp: Invalid data found when processing input&#xA;

    &#xA;

    I've not found very much on this problem :

    &#xA;

      &#xA;
    • I've tried turning it off and on again
    • &#xA;

    • I looked through this github issue but there were no solutions
    • &#xA;

    • I know it supports TCP since it's the same command as when it worked last time.
    • &#xA;

    &#xA;

    Any ideas how I can get ffmpeg to read the stream ?

    &#xA;

    Edit : Output of -report below, I'm afraid it's not very helpful :

    &#xA;

    ffprobe started on 2022-05-21 at 06:27:54&#xA;Report written to "ffprobe-20220521-062754.log"&#xA;Log level: 48&#xA;Command line:&#xA;ffprobe -hide_banner -report -rtsp_transport tcp &#xA;"rtsp://root:pass@IPADDR:80/axis-media/media.amp? &#xA;event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/."&#xA;[tcp @ 0000023967a2f8c0] No default whitelist set&#xA;[tcp @ 0000023967a2f8c0] Original list of addresses:&#xA;[tcp @ 0000023967a2f8c0] Address IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Interleaved list of addresses:&#xA;[tcp @ 0000023967a2f8c0] Address IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Starting connection attempt to IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Successfully connected to IPADDR port 80&#xA;rtsp://root:pass@IPADDR:80/axis-media/media.amp?event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/.: Invalid data found when processing input&#xA;

    &#xA;

  • "Undefined referance to function" while linking ffmpeg [duplicate]

    19 mai 2022, par user19068953

    I'm trying to link ffmpeg on ubuntu, i downloaded ffmpeg source and added to my lib/ffmpeg library then ran ./configure, i created a cmake on my project directory and one inside ffmpeg dir. The cmake compiles just fine but when i run make it just gives me an error saying Undefined referance to avformat_alloc_context(), it says this for all functions but the structs, typedefs and defines compile just fine. Here are my files :

    &#xA;

    ./cmake :

    &#xA;

    cmake_minimum_required(VERSION 3.14)&#xA;&#xA;set(CMAKE_CXX_STANDARD 14)&#xA;set(CMAKE_CXX_STANDARD_REQUIRED ON)&#xA;project(Interview C CXX)&#xA;&#xA;add_definitions(-DGL_SILENCE_DEPRECATION)&#xA;&#xA;SET(EXECUTABLE_OUTPUT_PATH ${dir}/bin )&#xA;set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )&#xA;&#xA;file(GLOB_RECURSE SOURCE_FILES &#xA;    ${CMAKE_SOURCE_DIR}/src/*.c&#xA;    ${CMAKE_SOURCE_DIR}/src/*.cpp&#xA;    # last resort&#xA;    ${CMAKE_SOURCE_DIR}/lib/ffmpeg/*/*.c&#xA;)&#xA;    &#xA;# Add header files&#xA;file(GLOB_RECURSE HEADER_FILES &#xA;    ${CMAKE_SOURCE_DIR}/src/*.h&#xA;    ${CMAKE_SOURCE_DIR}/src/*.hpp&#xA;    # last resort&#xA;    ${CMAKE_SOURCE_DIR}/lib/ffmpeg/*/*.h&#xA;)&#xA;&#xA;list(APPEND SOURCES&#xA;    src/main.cpp&#xA;    src/vipch.h&#xA;    src/VideDecoder.cpp&#xA;    src/VideoDecoder.h&#xA;    src/Application.cpp&#xA;    src/Application.h&#xA;    src/OpenGLRender.cpp&#xA;    src/OpenGLRender.h&#xA;    src/Layer.h&#xA;    src/Layer.cpp&#xA;&#xA;    # last resort&#xA;    lib/ffmppeg/*/*.h&#xA;    lib/ffmppeg/*/*.c&#xA;)&#xA;add_executable(Interview src/main.cpp)&#xA;&#xA;# ffmpeg linking -----------------------------------------------&#xA;&#xA;&#xA;add_library(ffmpeg STATIC IMPORTED)&#xA;add_subdirectory(lib/ffmpeg)&#xA;&#xA;target_include_directories(Interview PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/ffmpeg)&#xA;&#xA;link_directories(${CMAKE_SOURCE_DIR}/lib)&#xA;&#xA;set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")&#xA;

    &#xA;

    The cmake files are a bit messy since i am trying to figure this out.&#xA;./lib/ffmpeg/cmake :

    &#xA;

    cmake_minimum_required(VERSION 3.14)&#xA;project(ffmpeg)&#xA;&#xA;list(APPEND SOURCES&#xA;    libavformat/avformat.h&#xA;    libavformat/avformat.c&#xA;)&#xA;&#xA;file(GLOB_RECURSE SOURCE_FILES &#xA;    ${CMAKE_SOURCE_DIR}/*/*.c&#xA;)   &#xA;# Add header files&#xA;file(GLOB_RECURSE HEADER_FILES &#xA;    ${CMAKE_SOURCE_DIR}/*/*.h&#xA;)&#xA;&#xA;include_directories(${CMAKE_SOURCE_DIR}/libavformat)&#xA;link_directories(${CMAKE_SOURCE_DIR}/libavformat)&#xA;

    &#xA;

    and my main file that i run my test src/main.cpp :

    &#xA;

      extern "C"{&#xA;    #include <libavformat></libavformat>avformat.h>&#xA;}&#xA;&#xA;#include <iostream>&#xA;int main(int argc, char* argv[]) {&#xA;    AVFormatContext* context; &#xA;    context = avformat_alloc_context();&#xA;    std::cout &lt;&lt; context &lt;&lt; std::endl;&#xA;}&#xA;</iostream>

    &#xA;

    Again, no problem when using type's like AVFormatContext and defines but when i use a function like avformat_alloc_context it gives of this error (the source files are inside ffmpeg, i can inspect them with ctrl right-click on VSCode) :

    &#xA;

     /usr/bin/ld: CMakeFiles/Interview.dir/src/main.cpp.o: in function main&#x27;: main.cpp: &#xA;   (.text&#x2B;0x4e): undefined reference to avformat_alloc_context&#x27; collect2: error: ld returned 1 &#xA;   exit status make[2]: *** [CMakeFiles/Interview.dir/build.make:84: bin/Interview] Error 1 &#xA;   make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/Interview.dir/all] Error 2 make: *** &#xA;   [Makefile:84: all] Error 2&#xA;

    &#xA;

    Edit :&#xA;I edited the cmake file but now im getting a different error :

    &#xA;

    find_path(AVCODEC_INCLUDE_DIR NAMES "avformat.h" PATHS &#xA;${CMAKE_CURRENT_SOURCE_DIR}/lib/ffmpeg/libavformat)&#xA;find_library(AVCODEC_LIBRARY avformat)&#xA;&#xA;link_directories(${CMAKE_SOURCE_DIR}/lib)&#xA;&#xA;add_executable(Interview src/main.cpp)&#xA;&#xA;target_include_directories(Interview PRIVATE ${AVCODEC_INCLUDE_DIR})&#xA;target_link_libraries(Interview PRIVATE avformat)&#xA;&#xA;add_library(ffmpeg STATIC IMPORTED)&#xA;add_subdirectory(lib/ffmpeg)&#xA;&#xA;target_include_directories(Interview PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/ffmpeg)&#xA;&#xA;set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")&#xA;

    &#xA;

    Note : AVCODEC_LIBRARY returns notfound cmake error but just using avcodec in target_link_libraries somehow doesn't result in a cmake error, however when i run make like this it gives this error :

    &#xA;

    usr/bin/ld: cannot find -lavformat collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/Interview.dir/build.make:84: bin/Interview] Error 1 make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/Interview.dir/all] Error 2 make: *** [Makefile:84: all] Error 2&#xA;

    &#xA;