Recherche avancée

Médias (0)

Mot : - Tags -/inscription3

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (93)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (12009)

  • Revert "avformat/hlsenc : compute video_keyframe_size after write keyframe"

    1er mai 2021, par Steven Liu
    Revert "avformat/hlsenc : compute video_keyframe_size after write keyframe"
    

    This reverts commit b5ca8f2c66954614d81579082025f580efc0cffc.

    This commit will make new problem about tickets : 9193,9205
    It flush data into file with init file context together,
    and it can get keyframe size, maybe need more method to get keyframe
    size.

    Signed-off-by : Steven Liu <liuqi05@kuaishou.com>

    • [DH] libavformat/hlsenc.c
  • "Critical error detected c0000374" when running av_packet_unref or av_frame_unref

    15 mai 2021, par Shivang Sharma

    I am trying to read and decode frames which is happening nicely but when its reaching part of un-referencing frame or packet using av_packet_unref and av_frame_unref it is giving error during second frame or third frame sometimes .

    &#xA;

    Error (Copied from visual studio output window) :

    &#xA;

    Critical error detected c0000374&#xA;Libav.exe has triggered a breakpoint&#xA;

    &#xA;

    Here is some code of reading and decoding which is giving error :

    &#xA;

    void Decoder::streamNextFrame(int type = 0)&#xA;{&#xA;    while (av_read_frame(this->fileFormatCtx, this->latestpacket) >= 0) {&#xA;        if (this->audioDecoder->activeAudioStream != nullptr) {&#xA;            if (this->latestpacket->stream_index == this->audioDecoder->activeAudioStream->index) {&#xA;                avcodec_send_packet(this->audioDecoder->activeStreamDecoder, this->latestpacket);&#xA;                err = avcodec_receive_frame(this->audioDecoder->activeStreamDecoder, this->decodedFrame);&#xA;                if (err == AVERROR(EAGAIN)) {&#xA;                    av_frame_unref(this->decodedFrame);&#xA;                    av_packet_unref(this->latestpacket);&#xA;                    continue;&#xA;                }&#xA;&#xA;                {&#xA;                    int currentIndex = (int)this->audioFrames->size();&#xA;                    this->audioFrames->resize((int)this->audioFrames->size() &#x2B; 1);&#xA;                    int nb = 0;&#xA;                    this->audioFrames->at(currentIndex).pts = (int)this->decodedFrame->pts;&#xA;                    if (this->audioDecoder->activeStreamDecoder->sample_fmt != AV_SAMPLE_FMT_S16) {&#xA;                        nb = 2048 * this->audioDecoder->activeStreamDecoder->channels;&#xA;                        printf("%i\n", nb);&#xA;                        this->audioFrames->at(currentIndex).data.resize(nb);&#xA;                        if (!swr_is_initialized(swr)) {&#xA;&#xA;                            swr_alloc_set_opts(swr, this->audioDecoder->activeStreamDecoder->channel_layout, AV_SAMPLE_FMT_S16, this->audioDecoder->activeStreamDecoder->sample_rate, this->audioDecoder->activeStreamDecoder->channel_layout, this->audioDecoder->activeStreamDecoder->sample_fmt, this->audioDecoder->activeStreamDecoder->sample_rate, 0, nullptr);&#xA;                            swr_init(swr);&#xA;                        }&#xA;&#xA;                        uint8_t* buffer = this->audioFrames->at(currentIndex).data.data();&#xA;                        swr_convert(swr, &amp;buffer, nb, (const uint8_t**)this->decodedFrame->extended_data, this->decodedFrame->nb_samples);&#xA;                    }&#xA;                    else {&#xA;                        nb = this->decodedFrame->nb_samples * this->audioDecoder->activeStreamDecoder->channels;&#xA;                        this->audioFrames->at(currentIndex).data = std::vector(*this->decodedFrame->extended_data, *this->decodedFrame->extended_data &#x2B; (uint8_t)nb);&#xA;                    }&#xA;&#xA;                    this->audioFrames->at(currentIndex).buffersize = nb;&#xA;                }&#xA;&#xA;                if (err == AVERROR_EOF) {&#xA;                    this->audioDecoder->streamEnded = true;&#xA;                    av_frame_unref(this->decodedFrame);&#xA;                    av_packet_unref(this->latestpacket);&#xA;                    break;&#xA;                }&#xA;                else if (err >= 0) {&#xA;                    this->audioDecoder->streamEnded = false;&#xA;                }&#xA;&#xA;                if (type != 0) {&#xA;                    av_packet_unref(this->latestpacket);&#xA;                    av_frame_unref(this->decodedFrame);&#xA;                    break;&#xA;                }&#xA;                av_packet_unref(this->latestpacket);&#xA;                av_frame_unref(this->decodedFrame);&#xA;            }&#xA;        }&#xA;        else {&#xA;            printf("No active audio stream is set\n");&#xA;            if(type!=0)&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;}&#xA;

    &#xA;

    I have removed some of code which was concerning the video and was not giving problem I think.

    &#xA;

    Some Information about above code :

    &#xA;

    this->audioFrames is a pointer to vector with following type.&#xA;std::vector<audioframeformat>* "AudioFrameFormat" is struct defined as following&#xA;&#xA;struct AudioFrameFormat {&#xA;        std::vector data = {};&#xA;        int pts = 0;&#xA;        int buffersize = 0;&#xA;    };&#xA;&#xA;&#xA;swr is a private class member allocated in constructor&#xA;</audioframeformat>

    &#xA;

    Call Stack looks like :

    &#xA;

    enter image description here

    &#xA;

    I am getting from call stack is that I am not taking care of my heap memory.

    &#xA;

    Can someone please explain where problem is and, why some times it run till third frame and some time till second frame of the audio stream ?

    &#xA;

    And please tell how can I improve this code.

    &#xA;

  • ffmpeg : "Impossible to convert between the formats" when using NVIDIA GPU hardware acceleration

    24 mai 2021, par MorenoGentili

    I'm using ffmpeg from the command line on Windows 10 and I wanted to gave GPU acceleration a try to improve execution times. A simple cut command like this works fine and its execution time is reduced by 60-70%. Awesome.

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -ss 00:00:10 -i in.mp4 -c:v h264_nvenc out.mp4&#xA;

    &#xA;

    Now I tried to use the -filter_complex flag to overlay, fade and translate a png image over a video. The working non-GPU enhanced command is this one :

    &#xA;

    ffmpeg -i in.mp4 -loop 1 -t 75 -i overlay.png -filter_complex "[1:v]fade=t=in:st=30:d=0.3:alpha=1,fade=t=out:st=35.7:d=0.3:alpha=1[png1];[0:v][png1]overlay=x=&#x27;if(gte(t,30), (t-30)*10, NAN)&#x27;" -movflags &#x2B;faststart out.mp4&#xA;

    &#xA;

    Then, I added the GPU-related flags to the command like this.

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i in.mp4 -loop 1 -t 75 -i overlay.png -filter_complex "[1:v]fade=t=in:st=30:d=0.3:alpha=1,fade=t=out:st=35.7:d=0.3:alpha=1[png1];[0:v][png1]overlay=x=&#x27;if(gte(t,30), 60-tanh((t-30)*30/5)*60, NAN)&#x27;" -movflags &#x2B;faststart -c:v h264_nvenc out.mp4&#xA;

    &#xA;

    But it won't work. I get this error.

    &#xA;

    Impossible to convert between the formats supported by the filter &#x27;graph 0 input from stream 0:0&#x27; and the filter &#x27;auto_scaler_0&#x27;&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;Error while processing the decoded data for stream #0:0&#xA;

    &#xA;

    I don't even know what it means. Can I actually run ANY ffmpeg command on the GPU with GPU acceleration ? I've found some information about the hwupload_cuda flag but I'm not sure if I should use it and how. My attempts have failed so far.

    &#xA;

    Any advice on how I should modify the command to make it work on the GPU ?

    &#xA;