Recherche avancée

Médias (91)

Autres articles (68)

  • 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 ;

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

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (10505)

  • Revision 4305dd4778 : Avoid calls to get_coef_band(). Use value already computed value to save of cal

    9 mai 2013, par Paul Wilkins

    Changed Paths :
     Modify /vp9/decoder/vp9_detokenize.c



    Avoid calls to get_coef_band().

    Use value already computed value to save of calls

    Change-Id : I42836698e59c116416ccd75395bebdd11dd609fb

  • FFmpeg : avcodec_open2 returns "Permission denied" (-13)

    24 avril 2019, par maxest

    I wanted to open an encoder, H264, C++, Android. This :

    encoderH264 = avcodec_find_encoder(AV_CODEC_ID_H264);

    works. This one :

    codecContext = avcodec_alloc_context3(encoderH264);

    also works. But I get error "Permission denied" (-13) on that :

    avcodec_open2(codecContext, encoderH264, NULL);

    I’d suppose that my FFmpeg lib does support H264 encoding as avcodec_find_encoder returns valid value (when I used some other FFmpeg lib this function returned null).

    Any ideas ?

  • avio_open() function returns -138

    8 avril 2024, par checkright

    When I use ffmpeg4.4.1 to push rtmp to the desktop, the program returns -138 when running avio_open().I use dshow's screen-capture-recorder on the input side. My purpose is to capture the desktop in real time and use rtmp to push the stream.

    


        avdevice_register_all();
    avformat_network_init();

    AVFormatContext* pFmtCtx_In = nullptr;
    AVFormatContext* pFmtCtx_Out = nullptr;
    AVInputFormat*   pInFmt  = nullptr;
    AVDictionary* options = nullptr;
    int nVideoIndex          = -1;
    int              ret     = 0;

    AVCodecParameters* pCodecParam = nullptr;
    AVCodecContext   * pCodecCtx   = nullptr;
    AVCodec          * pCodec      = nullptr;

    AVFrame* pFrame    = av_frame_alloc();
    AVFrame* pFrameRGB = av_frame_alloc();
    AVPacket* pkt      = nullptr;

    pFrame    = av_frame_alloc();
    pFrameRGB = av_frame_alloc();
    pkt       = nullptr;
    img_convert_ctx = nullptr;

    pFmtCtx_In = avformat_alloc_context();
    if(!pFmtCtx_In)
    {
        qDebug() << "create AVFormatContext failed." ;
        return;
    }

    QString urlString = QString("video=screen-capture-recorder");
    const char* rtmpAddress = "rtmp://192.168.0.136:8554/myapp/test";
    
    if(1){
        pInFmt = const_cast(av_find_input_format("dshow"));
        ret = avformat_open_input(&pFmtCtx_In, urlString.toStdString().c_str(), pInFmt, nullptr);
    }else{
        pInFmt = const_cast(av_find_input_format("gdigrab"));
        av_dict_set(&options, "video_device_index", "1", 0);  
        av_dict_set(&options, "offset_x", "1920", 0);
        av_dict_set(&options, "offset_y", "0", 0);
        av_dict_set(&options, "draw_mouse", "1", 0);
        av_dict_set(&options, "video_size", "1920x1080", 0);
        ret = avformat_open_input(&pFmtCtx_In, "desktop", pInFmt, &options);
    }

    if(!pInFmt)
    {
        qDebug() << "find AVInputFormat failed." ;
        return;
    }

    if(ret < 0)
    {
        qDebug() << "open camera failed."<nb_streams; i++){
        if(pFmtCtx_In->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO){
            nVideoIndex = i;
            continue;
        }
    }

    if(nVideoIndex == -1){
        qDebug() << "cannot find video stream." ;
        return;
    }


    pCodecParam = pFmtCtx_In->streams[nVideoIndex]->codecpar;
    pCodec = avcodec_find_decoder(pCodecParam->codec_id);
    if(!pCodec)
    {
        qDebug() << "cannot find codec." ;
        return;
    }

    ret = avformat_alloc_output_context2(&pFmtCtx_Out, NULL, "flv", rtmpAddress);
    //    ret = avformat_alloc_output_context2(&pFmtCtx_Out, NULL, "rtsp", rtmpAddress);
    if (ret < 0) {
        qDebug() << "cannot avformat_alloc_output_context2." ;
        return ;
    }

    for (int i = 0; i < pFmtCtx_In->nb_streams; i++) {
        AVStream *outStream = avformat_new_stream(pFmtCtx_Out, pFmtCtx_In->streams[i]->codec->codec);
        if (!outStream) {
            qDebug() << "cannot outStream." ;

            return ;
        }

        ret = avcodec_parameters_copy(outStream->codecpar, pFmtCtx_In->streams[i]->codecpar);
        if (ret < 0) {
             qDebug() << "cannot avcodec_parameters_copy." ;
            return ;
        }
        outStream->codec->codec_tag = 0;
    }
  
    av_dump_format(pFmtCtx_Out, 0, rtmpAddress, 1);

    ret = avio_open(&pFmtCtx_Out->pb, rtmpAddress, AVIO_FLAG_WRITE);
    if (ret < 0) {
        qDebug() << "cannot avio_open." <code>

    


    An error occurs here.According to the data, the problem occurs at the input end, and the input end can display the desktop normally. How can I make it run successfully ? How do I need to modify the above code ?