Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (48)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (9466)

  • How can I tell ffmpeg to start to write on file as soon as it detects some motion ?

    29 mai 2017, par krvl

    A little background. I am recording a stream from a camera (using rtsp protocol) and I’d like to save on the disk not the whole input stream but only some excerpts after a motion is detected.
    The "basic" command I’m using is something like :

    ffmpeg -i rtsp://{my_camera_address}/ -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov -acodec aac -vcodec h264 output.mp4

    I recently add the -movflags option to achieve a sort of realtime, that is I can read the video file while is’t been written by ffmpeg.
    A user suggested in this question to add a filter to ffmpeg command in order to grab only the frames where a motion is detected, they used this option :

    -vf select=gt(scene\,0.05),setpts=N/(25*TB)

    But it has some incompatibility with the -vcodec copy option, although this is not a big issue.

    My question is : is it possibile to use the filter (or another option) just to trigger the file writing ? For example, I save a 5 minutes video after a motion-detection is triggered.

  • avformat_open_input fails only with a custom IO context

    2 juin 2017, par Tim

    Running into an odd issue with avformat_open_input, it is failing with :

    Invalid data found when processing input

    But this only happens when I attempt to read the file using a custom AVIOContext.

    My custom code is as follows (error checking omitted for clarity) :

    auto fmtCtx = avformat_alloc_context();
    auto ioBufferSize = 32768;
    auto ioBuffer = (unsigned char *)av_malloc(ioBufferSize);
    auto ioCtx = avio_alloc_context(ioBuffer,
                                   ioBufferSize,
                                   0,
                                   reinterpret_cast<void>(this),
                                   &amp;imageIORead,
                                   NULL,
                                   &amp;imageIOSeek));

    fmtCtx -> pb = ioCtx;
    fmtCtx -> flags |= AVFMT_FLAG_CUSTOM_IO;

    int err = avformat_open_input(&amp;fmtCtx, NULL, NULL, NULL);
    </void>

    imageIOSeek is never called, but properly handles the whence parameter including the AVSEEK_SIZE option. My file data is already loaded in memory, so imageIORead is trivial (returning 0 at EOF) :

    int imageIORead(void *opaque, uint8_t *buf, int buf_size) {
       Image *d = (Image *)buf;
       int rc = std::min(buf_size, static_cast<int>(d->data.size() - d->pos));

       memcpy(buf, d->data.data() + d->pos, rc);
       d->pos += rc;
       return rc;
    }
    </int>

    The data being read is loaded from a file on disk :

    /tmp/25.jpeg

    The following code is able to open and extract the image correctly :

    auto fmtCtx = avformat_alloc_context();
    int err = avformat_open_input(&amp;fmtCtx, "/tmp/25.jpeg", NULL, NULL);

    The project is using a minified version of libavformat including only the formats we need. I don’t believe this is the cause of the problem since the file can be open and handled properly when the path is specified. I haven’t seen any configure options specifically targeting support for custom IO contexts.

    This is the image in question : 25.jpeg

  • OpenCV won't capture frames from a RTMP source, while FFmpeg does

    13 juin 2017, par user2957378

    my goal is to capture a frame from a rtmp stream every second, and process it using OpenCV. I’m using FFmpeg version N-71899-g6ef3426 and OpenCV 2.4.9 with the Java interface (but I’m first experimenting with Python).
    For the moment, I can only take the simple and dirty solution, which is to capture images using FFmpeg, store them in disk, and then read those images from my OpenCV program. This is the FFmpeg command I’m using :

    ffmpeg -i "rtmp://antena3fms35livefs.fplive.net:1935/antena3fms35live-live/stream-lasexta_1 live=1" -r 1 capImage%03d.jpg

    This is currently working for me, at least with this concrete rtmp source. Then I would need to read those images from my OpenCV program in a proper way. I have not actually implemented this part, because I’m trying to find a better solution.

    I think the ideal way would be to capture the rtmp frames directly from OpenCV, but I cannot find the way to do it. This is the code in Python I’m using :

    cv2.namedWindow("camCapture", cv2.CV_WINDOW_AUTOSIZE)
    cap = cv2.VideoCapture()
    cap.open('"rtmp://antena3fms35livefs.fplive.net:1935/antena3fms35live-live/stream-lasexta_1 live=1"')
    if not cap.open:
       print "Not open"
    while (True):
       err,img = cap.read()
       if img and img.shape != (0,0):
           cv2.imwrite("img1", img)
           cv2.imshow("camCapture", img)
       if err:
           print err
           break
       cv2.waitKey(30)

    Instead of read() function, I’m also trying with grab() and retrieve() functions without any good result. The read() function is being executed every time, but no "img" or "err" is received.
    Is there any other way to do it ? or maybe there is no way to get frames directly from OpenCV 2.4.9 from a stream like this ?

    I’ve read OpenCV uses FFmpeg to do this kind of tasks, but as you can see, in my case FFmpeg is able to get frames from the stream while OpenCV is not.

    In the case I could not find the way to get the frames directly from OpenCV, my next idea is to pipe somehow, FFmpeg output to OpenCV, which seems harder to implement.

    Any idea,
    thank you !

    UPDATE 1 :
    I’m in Windows 8.1. Since I was running the python script from Eclipse PyDev, this time I run it from cmd instead, and I’m getting the following warning :

    warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545)

    This warning means, as far as I could read, that either the file-path is wrong, or either the codec is not supported. Now, the question is the same. Is OpenCV not capable of getting the frames from this source ?