Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (111)

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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (11889)

  • OpenCV3.3.1 fails to read a video

    1er janvier 2018, par Kasparov92

    Here is the code I use

    file_name = 'movie.avi'
    cap = cv2.VideoCapture(file_name)

    success, frame = cap.read()

    i = 0

    while success:
       i +=1
       success, frame = cap.read()

    print "Frames successfully read:", i

    And I am getting this error :

    Unable to stop the stream: Inappropriate ioctl for device

    (python:139873): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
       Frames successfully read: 0

    On this particular video, it fails to read ! I tried the same code on other videos and they work fine. I also tried the same piece of code with another laptop (same operating system : Ubuntu 16.04) and it works.

    Is it a codec issue ? if so why other videos could be loaded and read successfully ?

    EDIT 1 :

    I recompiled opencv using -DWITH_LIBV4L=ON after sudo apt-get install libv4l-dev and Now I am getting this error :

    Failed to query video capabilities: Inappropriate ioctl for device
    libv4l2: error getting capabilities: Inappropriate ioctl for device
    VIDEOIO ERROR: V4L: device /root/datasets/UCF-101/TableTennisShot/v_TableTennisShot_g22_c02.avi: Unable to query number of channels

    (python:173084): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
  • Why AVCodecContext extradata is NULL ?

    21 janvier 2016, par user3215358

    I am trying to decode h264 video using ffmpeg and stagefright library. I’m using this example.

    The example shows how to decode mp4 files, but i want to decode only h264 video.

    Here is piece of my code..

       AVFormatSource::AVFormatSource(const char *videoPath)
       {
           av_register_all();

           mDataSource = avformat_alloc_context();
           avformat_open_input(&mDataSource, videoPath, NULL, NULL);
           for (int i = 0; i < mDataSource->nb_streams; i++)
           {
               if (mDataSource->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
               {
                   mVideoIndex = i;
                   break;
               }
           }
           mVideoTrack = mDataSource->streams[mVideoIndex]->codec;

           size_t bufferSize = (mVideoTrack->width * mVideoTrack->height * 3) / 2;
           mGroup.add_buffer(new MediaBuffer(bufferSize));
           mFormat = new MetaData;

           switch (mVideoTrack->codec_id == CODEC_ID_H264)
           {
               mConverter = av_bitstream_filter_init("h264_mp4toannexb");
               mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
               if (mVideoTrack->extradata[0] == 1) //SIGSEGV Here
               {
                   mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_AVC);
                   mFormat->setData(kKeyAVCC, kTypeAVCC, mVideoTrack->extradata,
                                    mVideoTrack->extradata_size);
               }
            }

           mFormat->setInt32(kKeyWidth, mVideoTrack->width);
           mFormat->setInt32(kKeyHeight, mVideoTrack->height);
       }

    mVideoTrack->extradata is NULL. What i’m doing wrong ?? My question is, what should be in mVideoTrack->extradata for kKeyAVCC ??

    Please help me, I need Your help.
    Thanks in advance.

  • Why does ffmpeg stop recording at midnight ?

    22 septembre 2019, par peter

    I have a shellscript like this under Kubuntu 19.10,

    #!/bin/bash

    while true
    do
       FILE=/media/petermc/Security5/Camera2/Camera2_.mp4  
       FILE=${FILE%.*}`date +%Y-%m-%d_%H-%M-%S-%N`.${FILE#*.}
       echo $FILE

       ffmpeg -rtsp_transport tcp -t 00:15:00 -i rtsp://*user*:*password*@192.168.1.60:554/ch02/0 -c copy -map 0 $FILE
    done

    It records files like this,

    Camera2_2019-09-21_23-36-57-874602376.mp4
    Camera2_2019-09-21_23-51-57-876639147.mp4

    Basically recording 15 minutes at a time from the RTSP feed, then starting a new file.

    However it stops working at midnight, the last few lines from the log file are this,

    frame= 3987 fps= 13 q=-1.0 size=  117760kB time=00:05:06.51 bitrate=3147.3kbits/s speed=1.01x    
    frame= 3994 fps= 13 q=-1.0 size=  118016kB time=00:05:07.07 bitrate=3148.4kbits/s speed=1.01x    
    frame= 4001 fps= 13 q=-1.0 size=  118016kB time=00:05:07.59 bitrate=3143.1kbits/s speed=1.01x    
    frame= 4008 fps= 13 q=-1.0 size=  118272kB time=00:05:08.11 bitrate=3144.6kbits/s speed=1.01x

    So there doesn’t seem to be any error, it stops recording at 5 minutes into the last file with no error.

    Another piece of information is that I have 6 cameras, and 4 stopped recording, the ones connected to a DVR. I have a couple of IP cameras and they kept recording.

    What could be the cause of this ? Plus, what else could I do to work around this or diagnose this ?

    UPDATE :

    I believe the issue is because the DVR has a maintenance setup to restart once at week at midnight. If this is what happened, is there any way I can configure ffmpeg to restart if it has lost the stream ?