Recherche avancée

Médias (91)

Autres articles (98)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (8734)

  • how to fill AvFrame pixel by pixel

    18 mai 2017, par masoud khanlo

    i try to encode opengl output to a mp4 file using ffmpeg but when i want to simply fill AvFrame with pixel colors with this code snippet :

    for (y = 0; y < c->height; y++) {
    for (x = 0; x < c->width; x++) {
       int offset = 3 * (x + y * c->width);

       if (x > 2* c->width / 3 && x width )
       {
           frame->data[0][offset + 0] = 0; // B
           frame->data[0][offset + 1] = 0; // G
           frame->data[0][offset + 2] = 255; // R
       }
       else if(x < 2 * c->width / 3 && x > c->width / 3) {
           frame->data[0][offset + 0] = 0; // B
           frame->data[0][offset + 1] = 255; // G
           frame->data[0][offset + 2] = 0; // R
       }
       else {
           frame->data[0][offset + 0] = 255; // B
           frame->data[0][offset + 1] = 0; // G
           frame->data[0][offset + 2] = 0; // R
       }
    }

    then i have this video output :

    enter image description here

    and i had this options for ffmpeg :

    codec : libx264rgb
    & pix_fmt : AV_PIX_FMT_BGR24

    in fact i expect something like this video output :

    enter image description here

    i’m also new in ffmpeg and i realy dont know advanced stuffs about video encoding ,so anybody knows what is problem ?

  • Ffmpeg libav with multiple inputs crashes when cleaning memory

    2 mars 2021, par Expressingx

    I'm streaming multiple cameras with ffmpeg libav

    


    for (int i = 0; i < CameraList.Count; i++)
            {
                var camera = CameraList[i];
                    AVDictionary* optionalOpts;
                    if (!string.IsNullOrEmpty(camera.InputResolution))
                        ffmpeg.av_dict_set(&optionalOpts, "video_size", camera.InputResolution, 0);

                    ffmpeg.av_dict_copy(&optionalOpts, options, 0);

                    AVInputFormat* inputFormat = null;

                    if (!string.IsNullOrEmpty(camera.Format))
                    {
                        inputFormat = ffmpeg.av_find_input_format(camera.Format);
                        if (inputFormat == null)
                            // exception
                    }

                    if (ffmpeg.avformat_open_input(&pInputFmtCtx, camera.Url, inputFormat, &optionalOpts) != 0)
                    {
                        if (ffmpeg.avformat_open_input(&pInputFmtCtx, camera.Url, inputFormat, &options) != 0)
                            //exception
                    }
            }


    


    Every camera is streamed to own file, having its own output AVFormatContext. Everything is working fine till the recording is ended and the memory has to be freed. And the problem is here

    


    if (InputFormatContext != null)
            {
                fixed (AVFormatContext** p = &InputFormatContext)
                    ffmpeg.avformat_close_input(p);

                InputFormatContext = null;
            }


    


    If I use only 1 camera everything is fine, but if they are two the application crashes. And I don't know why.

    


  • Reading RTMP streams using FFMPEG returns AVERROR_EOF randomly

    9 octobre 2013, par user2628781

    I am using FFMpeg to receive RTMP streams. This logic is placed in a custom video player I am building.

    I managed to successfully connect to the RTMP stream and display the video correctly. However, after a period in time, the stream terminates prematurely with an AVERROR_EOF when I perform av_read_frame().

    This indicates to me that the file has ended so my demux, video and audio threads terminates thinking that the video has ended.
    However, the video playback hasn't yet reached its end (in the case of a file streamed through rtmp) or from a live stream (which runs forever). The EOFs are received very randomly so it may run for say 7 min before this occurs or after 3 mins.

    Is this a characteristic behaviour of RTMP or am I doing something incorrectly ?
    I am also having a similar problem with Http Live Streams using FFMpeg.

    A small snippet of the code is provided below :

    AVPacket packet;
    //start timeout timer and timeout
    __interrupt_timer.start();

    int ret = av_read_frame(format_context, &packet); //0: ok, <0: error/end


    //invalidate the timer
    __interrupt_timer.invalidate();

    if (ret != 0) {
       if (ret == AVERROR_EOF) { //end of file. FIXME: why no eof if replaying by seek(0)?            
           if (!eof) {
               eof = true;
               started_ = false;
               pkt->data = QByteArray(); //flush
               pkt->markEnd();
               qDebug("End of file. %s %d", __FUNCTION__, __LINE__);
               emit finished();
               return true;
           }
           pkt->data = QByteArray(); //flush
           //return true;
           return false; //frames after eof are eof frames
       } else if (ret == AVERROR_INVALIDDATA) {
           qWarning("AVERROR_INVALIDDATA");
       } else if (ret == AVERROR(EAGAIN)) {
           return true;
       }
       qWarning("[AVDemuxer] error: %s", av_err2str(ret));
       return false;
    }