Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (63)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

Sur d’autres sites (9342)

  • ffplay does not exit in forked child

    6 septembre 2019, par user12030145

    ffplay  -autoexit does not exit in a forked child

    I need to pipe my application (stdout) to ffplay (stdin). I do this by forking ffplay as a child and using -i pipe:0 as argument.

    #include
    #include
    #include <sys></sys>types.h>
    #include <sys></sys>wait.h>

    int main(int argc, const char** argv)
    {
    int tube[2];
    int c;
    FILE* f = fopen(argv[1], "rb");
    pid_t pid;
    if (argc &lt; 2) return -1;
    if (pipe(tube))  {
       perror("Pipe");
       return -1;
     }

    // main process cats a .mlp file to stdout, sent to a child ffplay stdin through a pipe
    char* const arg[] = {"-i", "pipe:0", "-f", "mlp", "-nodisp", "-autoexit", NULL};
    switch (pid = fork())    {
               case -1:
                   fprintf(stderr,"%s\n", "Could not launch ffplay");
                   break;

               case 0:
                   close(tube[1]);
                   dup2(tube[0], STDIN_FILENO);
                   execv("/usr/bin/ffplay", arg);
                   fprintf(stderr, "%s\n", "Runtime failure in ffplay child process");
                   return -2;

               default:
                   close(tube[0]);
                   dup2(tube[1], STDOUT_FILENO);
           }

    // Here the main process code sending the .mlp file to stdout...

    while ((c = fgetc(f)) != EOF) putchar(c);

    waitpid(pid, NULL, 0);
    fclose(f);

    // main never returns
    return 0;
    }

    The issue is that in this context, ffplay -autoexit never exits (GNU-Linux platform). In a main process, ffplay -autoexit always exits at the end of a media file.
    Is there a pure C workaround without using system, popen or scripting ?
    Is this a feature or a bug of ffplay (I cannot tell) ?

  • MSVC fatal error LNK1120 : 1 unresolved externals with FFMPEG libs

    16 août 2019, par Jared

    I am trying to utilize the ffmpeg libraries in a program of my own and am having trouble linking them. Specifically, In my a basic program I am receiving fatal error LNK1120: 1 unresolved externals errors. The program is :

    #include <iostream>
    #include <libswresample></libswresample>swresample.h>

    int main()
    {
       std::cout &lt;&lt; "Hello World!\n";
       struct SwrContext* swr_ctx = swr_alloc();
       if (!swr_ctx) {
           std::cout &lt;&lt; "Could not allocate resampler context";
       }
    }
    </iostream>

    I downloaded prebuild libraries from https://ffmpeg.zeranoe.com/builds/, specifically the Windows x64 dev package which includes the .def/.lib as well as .dll files.

    I originally tried (and intend to ultimately use) cmake to generate the MSVC sln files. The cmake file is :

    cmake_minimum_required(VERSION 3.5)

    project(ffmpeg_jni)

    # Find the JNI bits
    find_package(JNI)

    # Search for the ffmpeg libraries
    set(ffmpeg_include_hint "ffmpeg-dev/include")
    set(ffmpeg_lib_hint "ffmpeg-dev/lib")

    find_path(SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h PATHS ${ffmpeg_include_hint})
    find_library(SWRESAMPLE_LIBRARY swresample PATHS ${ffmpeg_lib_hint})
    add_library(swresample SHARED IMPORTED)
    set_target_properties(swresample PROPERTIES
       IMPORTED_LOCATION "${SWRESAMPLE_LIBRARY}"
       IMPORTED_IMPLIB "${SWRESAMPLE_LIBRARY}"
       INTERFACE_INCLUDE_DIRECTORIES "${SWRESAMPLE_INCLUDE_DIR}"
    )

    # Setup basic include dirs
    set(includeDIRS
           src/main/cpp
           ${JAVA_INCLUDE_PATH})

    # Setup windows specific includes
    set(includeDIRS
           ${includeDIRS}
           ${JAVA_INCLUDE_PATH}/Win32)

    include_directories(${includeDIRS})

    set(WRAPPER_SRC
           src/main/cpp/logging.c
           src/main/cpp/logging.h
           src/main/cpp/main.cpp)

    add_library(ffmpeg_jni SHARED ${WRAPPER_SRC})
    target_link_libraries(ffmpeg_jni PRIVATE swresample)

    The generated solution compiles and has proper access to the include files (Visual Studio can even take me to the declarations). The issue comes in the linking phase of the build where I receive :

    error LNK2019 : unresolved external symbol "struct SwrContext * __cdecl
    swr_alloc(void)" (?swr_alloc@@YAPEAUSwrContext@@XZ) referenced in
    function main

    Thinking that I perhaps had something wrong in cmake since I am still pretty new with it I tried making a simple demo as a pure visual studio project following what I have found in countless online demos for adding an external library to a project. Specifically this included :

    • Adding the directory containing the header files to Properties->C/C++->General->Additional Include Directories
    • Adding the directory containing the .lib files to Properties->Linker->General->Additional Library Directories (Note that the cmake path did not do this but instead added the lib file via a relative path)
    • Adding the .lib file to Properties->Linker->Input->Additional Dependencies

    At this point any searching efforts I undertake show me different people doing the same things which tells me I’ve been looking at this too long to find the answer myself and its something trivial that I’m missing/not understanding.

  • How to accurately match an image to a video frame and exit with ffmpeg

    10 avril 2020, par Hans J

    In Bash,&#xA;I am trying to match an image to a frame in ffmpeg. I also want to exit the ffmpeg process when the match is found. Here is a (simplified version) of the code currently :

    &#xA;&#xA;

    ffmpeg --hide_banner -ss 0 -to 60 \&#xA;-i "video.mp4" -i "image.jpg" -filter_complex \&#xA;"blend=difference, blackframe" -f null - null 2>log.txt &amp;&#xA;pid=$!&#xA;trap "kill $pid 2>/dev/null" EXIT&#xA;while kill -0 $pid 2>/dev/null; do&#xA;     # (grep command to monitor log file)&#xA;     # if grep finds blackframe match, return blackframe time&#xA;done&#xA;

    &#xA;&#xA;

    To my understanding, if the video actually contains a blackframe I will get a false-positive. How can I effectively mitigate this ?

    &#xA;&#xA;

    While this is unnecessary to answer the question, I would like to exit the ffmpeg process without having to use grep to constantly monitor the log file, instead using pure ffmpeg

    &#xA;&#xA;

    Edit : I say this because while I understand the blend filter is computing the difference, I am getting a false positive on a blackframe in my video and I don't know why.

    &#xA;&#xA;

    Edit : A possible solution to this issue is to not use blackframe at all, but psnr (Peak Signal to Noise Ratio) but normal usage is by comparing two videos frame by frame, and I don't know how to effectively use it with an image as input.

    &#xA;