Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

  • avcodec/ffv1enc : Heuristic to select fixed in float multipliers

    24 mars, par Michael Niedermayer
    avcodec/ffv1enc : Heuristic to select fixed in float multipliers
    

    Sponsored-by : Sovereign Tech Fund
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/ffv1enc.c
  • Hardware accelerated decoding with FFmpeg falls back to software decoding

    9 février 2024, par iexav

    So I have followed the FFmpeg example for hardware accelerated decoding exactly as it is (I am referring to this example).

    &#xA;

    https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c#L76&#xA;

    &#xA;

    But I still seem to be decoding with the software decoder. When I open the task manager on windows the GPU isn't getting used. Before I make a call to av_hwframe_transfer_data() I check whether the frame is in the relevant hw_pix_fmt format and it is. Everything works, no errors, nothing, except the GPU is doing nothing. Now as an example I tried decoding a video that uses vp9 as a codec. If I specify the hardware accelerated codec I want by name it actually does work.

    &#xA;

    vidCodec=avcodec_find_decoder_by_name("vp9_cuvid"); &#xA;

    &#xA;

    When I do this and look at the task manager I can see that the CPU does much less work and my GPU actually does Video Decode work. Having to specify the hardware accelerated decoder for every single video I am decoding is ridiculous though.

    &#xA;

    Edit : as per user4581301's answer, here are the pieces of relevant code. (It's actually in java because I am using the java FFmpeg wrapper but it's basically just making a bunch of calls to FFmpeg functions.)

    &#xA;

    &#xA; ArrayList<string> deviceTypes = new ArrayList&lt;>();&#xA; int type = AV_HWDEVICE_TYPE_NONE;&#xA;                    while ((type = av_hwdevice_iterate_types(type)) != AV_HWDEVICE_TYPE_NONE) {&#xA;                        BytePointer p = av_hwdevice_get_type_name(type);&#xA;&#xA;                        deviceTypes.add(CString(p));&#xA;                    }&#xA;                    boolean flag=false;&#xA;&#xA;                    for(int j=0;j* Allocate a codec context for the decoder */&#xA;                if ((video_c = avcodec_alloc_context3(vidCodec)) == null) {&#xA;                    throw new Exception("avcodec_alloc_context3() error: Could not allocate video decoding context.");&#xA;                }&#xA;&#xA;&#xA;                /* copy the stream parameters from the muxer */&#xA;&#xA;                if ((ret = avcodec_parameters_to_context(video_c, video_st.codecpar())) &lt; 0) {&#xA;                    releaseUnsafe();&#xA;                    throw new Exception("avcodec_parameters_to_context() error " &#x2B; ret &#x2B; ": Could not copy the video stream parameters.");&#xA;                }&#xA;              &#xA;&#xA;                    video_c.get_format(AvFormatGetter.getInstance());&#xA;                    AVBufferRef hardwareDeviceContext =av_hwdevice_ctx_alloc(type);&#xA;&#xA;                    if ((ret = av_hwdevice_ctx_create(hardwareDeviceContext, type,(String) null, null, 0)) &lt; 0) {&#xA;                        System.err.println("Failed to create specified HW device. error " &#x2B; ret);&#xA;&#xA;                    }else{&#xA;                        video_c.hw_device_ctx(av_buffer_ref(hardwareDeviceContext));&#xA;&#xA;                    }&#xA;    &#xA;&#xA;&#xA;                &#xA;//The function that gets called for get_format&#xA;@Override&#xA; public int call(AVCodecContext context, IntPointer format) {&#xA;            int p;&#xA;&#xA;&#xA;            for (int i=0;;i&#x2B;&#x2B;) {&#xA;                if ((p=format.get(i)) == hw_pix_fmt) {&#xA;                    return p;&#xA;                }&#xA;                if(p==-1){&#xA;                    break;&#xA;                }&#xA;            }&#xA;&#xA;            System.out.println(hw_pix_fmt &#x2B;" is not found in the codec context");&#xA;            // Error&#xA;&#xA;            return AV_PIX_FMT_NONE;&#xA;        }&#xA;    &#xA;//The method that&#x27;s used for decoding video frames&#xA;  public Optional<boolean> decodeVideoFrame(AVPacket pkt, boolean readPacket, boolean keyFrames) throws Exception {&#xA;&#xA;        int ret;&#xA;        // Decode video frame&#xA;        if (readPacket) {&#xA;            ret = avcodec_send_packet(video_c, pkt);&#xA;          &#xA;            if (ret &lt; 0) {&#xA;                System.out.println("error during decoding");&#xA;                return Optional.empty();&#xA;            }&#xA;&#xA;            if (pkt.data() == null &amp;&amp; pkt.size() == 0) {&#xA;                pkt.stream_index(-1);&#xA;            }&#xA;           &#xA;        }&#xA;&#xA;        // Did we get a video frame?&#xA;        while (true) {&#xA;            ret = avcodec_receive_frame(video_c, picture_hw);&#xA;&#xA;            if (ret == AVERROR_EAGAIN() || ret == AVERROR_EOF()) {&#xA;                if (pkt.data() == null &amp;&amp; pkt.size() == 0) {&#xA;                    return Optional.empty();&#xA;                } else {&#xA;&#xA;                    return Optional.of(true);&#xA;&#xA;                }&#xA;            } else if (ret &lt; 0) {&#xA;&#xA;                // Ignore errors to emulate the behavior of the old API&#xA;                // throw new Exception("avcodec_receive_frame() error " &#x2B; ret &#x2B; ": Error during video decoding.");&#xA;                return Optional.of(true);&#xA;&#xA;            }&#xA;&#xA;            if (!keyFrames || picture.pict_type() == AV_PICTURE_TYPE_I) {&#xA;              &#xA;                if(picture_hw.format()==hw_pix_fmt){&#xA;                    if (av_hwframe_transfer_data(&#xA;                            picture, // The frame that will contain the usable data.&#xA;                            picture_hw, // Frame returned by avcodec_receive_frame()&#xA;                            0) &lt; 0) {&#xA;                        throw new Exception("Could not transfer data from gpu to cpu. ");&#xA;&#xA;                    }&#xA;                }&#xA;               //... The rest of the method here&#xA;                return Optional.of(false);&#xA;&#xA;            }&#xA;        }&#xA;    }&#xA;</boolean></string>

    &#xA;

  • avutil/log : added av_log_format_line2 which returns buffer length

    27 avril 2016, par Andreas Weis
    avutil/log : added av_log_format_line2 which returns buffer length
    

    The new function behaves the same as av_log_format_line, but also forwards
    the return value from the underlying snprintf call. This will allow
    callers to accurately determine the size requirements for the line buffer.

    Signed-off-by : Andreas Weis <github@ghulbus-inc.de>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] doc/APIchanges
    • [DH] libavutil/log.c
    • [DH] libavutil/log.h
    • [DH] libavutil/version.h