Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (70)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (12185)

  • Revision 33515 : Erreur dans la requête

    4 décembre 2009, par kent1@… — Log

    Erreur dans la requête

  • Can't initialize "h264_mediacodec" for hw accelerated decoding, FFMPEG, Android

    27 mars 2024, par Ramil Galin

    I am trying to create hw accelerated decoding on Android through JNI and following this example but, unfortunately, avcodec_get_hw_config returns nullptr.

    


    I have also tried using avcodec_find_decoder_by_name("h264_mediacodec"), also returns nullptr.

    


    I built ffmpeg (version 4.4) using this script with the flags :

    


    --enable-jni \
--enable-mediacodec \
--enable-decoder=h264_mediacodec \
--enable-hwaccel=h264_mediacodec \


    


    When configuring build I saw in logs WARNING: Option --enable-hwaccel=h264_mediacodec did not match anything, which is actually strange. FFMPEG 4.4 should support hw accelerated decoding using mediacodec.

    


    Edit : (providing minimal reproducible example)

    


    In the JNI method I init input context of decoder and init decoder :

    


        void Decoder::initInputContext(&#xA;        const std::string&amp; source,&#xA;        AVDictionary* options&#xA;    ) { // open input, and allocate format context&#xA;        if (&#xA;            avformat_open_input(&#xA;                &amp;m_inputFormatContext,&#xA;                source.c_str(),&#xA;                NULL,&#xA;                options ? &amp;options : nullptr&#xA;            ) &lt; 0&#xA;        ) {&#xA;            throw FFmpegException(&#xA;                fmt::format("Decoder: Could not open source {}", source)&#xA;            );&#xA;        }&#xA; &#xA;        // retrieve stream information&#xA;        if (avformat_find_stream_info(m_inputFormatContext, NULL) &lt; 0) {&#xA;            throw FFmpegException(&#xA;                "Decoder: Could not find stream information"&#xA;            );&#xA;        }&#xA;&#xA;        // get audio and video streams&#xA;        for (size_t i = 0; i &lt; m_inputFormatContext->nb_streams; i&#x2B;&#x2B;) {&#xA;            AVStream* inStream = m_inputFormatContext->streams[i];&#xA;            AVCodecParameters* inCodecpar = inStream->codecpar;&#xA;            if (&#xA;                inCodecpar->codec_type != AVMEDIA_TYPE_AUDIO &amp;&amp;&#xA;                inCodecpar->codec_type != AVMEDIA_TYPE_VIDEO&#xA;            ) {&#xA;                continue;&#xA;            }&#xA;&#xA;            if (inCodecpar->codec_type == AVMEDIA_TYPE_VIDEO) {&#xA;                m_videoStreamIdx = i;&#xA;                m_videoStream = inStream;&#xA;&#xA;                m_codecParams.videoCodecId = m_videoStream->codecpar->codec_id;&#xA;                m_codecParams.fps = static_cast<int>(av_q2d(m_videoStream->r_frame_rate) &#x2B; 0.5);&#xA;                m_codecParams.clockrate = m_videoStream->time_base.den;&#xA;&#xA;                spdlog::debug(&#xA;                    "Decoder: fps: {}, clockrate: {}",&#xA;                    m_codecParams.fps,&#xA;                    m_codecParams.clockrate&#xA;                )&#xA;                ;&#xA;            }&#xA;&#xA;            if (inCodecpar->codec_type == AVMEDIA_TYPE_AUDIO) {&#xA;                m_audioStreamIdx = i;&#xA;                m_audioStream = inStream;&#xA;&#xA;                m_codecParams.audioCodecId = m_audioStream->codecpar->codec_id;&#xA;                m_codecParams.audioSamplerate = m_audioStream->codecpar->sample_rate;&#xA;                m_codecParams.audioChannels = m_audioStream->codecpar->channels;&#xA;                m_codecParams.audioProfile = m_audioStream->codecpar->profile;&#xA;&#xA;                spdlog::debug(&#xA;                    "Decoder: audio samplerate: {}, audio channels: {}, x: {}",&#xA;                    m_codecParams.audioSamplerate,&#xA;                    m_codecParams.audioChannels,&#xA;                    m_audioStream->codecpar->channels&#xA;                )&#xA;                ;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    void Decoder::initDecoder() {&#xA;        AVCodecParameters* videoStreamCodecParams = m_videoStream->codecpar;&#xA;&#xA;        m_swsContext = sws_getContext(&#xA;                videoStreamCodecParams->width, videoStreamCodecParams->height, m_pixFormat,&#xA;                videoStreamCodecParams->width, videoStreamCodecParams->height, m_targetPixFormat,&#xA;                SWS_BICUBIC, nullptr, nullptr, nullptr);&#xA;&#xA;        // find best video stream info and decoder&#xA;        int ret = av_find_best_stream(m_inputFormatContext, AVMEDIA_TYPE_VIDEO, -1, -1, &amp;m_decoder, 0);&#xA;        if (ret &lt; 0) {&#xA;            throw FFmpegException(&#xA;                    "Decoder: Cannot find a video stream in the input file"&#xA;            );&#xA;        }&#xA;&#xA;        if (!m_decoder) {&#xA;            throw FFmpegException(&#xA;                    "Decoder: Can&#x27;t find decoder"&#xA;            );&#xA;        }&#xA;&#xA;        // search for supported HW decoder configuration&#xA;        for (size_t i = 0;; i&#x2B;&#x2B;) {&#xA;            const AVCodecHWConfig* config = avcodec_get_hw_config(m_decoder, i);&#xA;            if (!config) {&#xA;                spdlog::error(&#xA;                    "Decoder {} does not support device type {}. "&#xA;                    "Will use SW decoder...",&#xA;                    m_decoder->name,&#xA;                    av_hwdevice_get_type_name(m_deviceType)&#xA;                );&#xA;                break;&#xA;            }&#xA;&#xA;            if (&#xA;                config->methods &amp; AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX &amp;&amp;&#xA;                config->device_type == m_deviceType&#xA;            ) {&#xA;                // set up pixel format for HW decoder&#xA;                g_hwPixFmt = config->pix_fmt;&#xA;                m_hwDecoderSupported = true;&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;</int>

    &#xA;

    And I have AVHWDeviceType m_deviceType{AV_HWDEVICE_TYPE_MEDIACODEC};

    &#xA;

    avcodec_get_hw_config returns nullptr.

    &#xA;

    Any help is appreciated.

    &#xA;

  • Availability of WebM (VP8) Video Hardware IP Designs

    10 janvier 2011, par noreply@blogger.com (John Luther)

    Hello from the frigid city of Oulu, in the far north of Finland. Our WebM hardware development team, formerly part of On2 Technologies, is now up-to-speed and working hard on a number of video efforts for WebM.

    • VP8 (the video codec used in WebM) hardware decoder IP is available from Google for semiconductor companies who want to support high-quality WebM playback in their chipsets.
    • The Oulu team will release the first VP8 video hardware encoder IP in the first quarter of 2011. We have the IP running in an FPGA environment, and rigorous testing is underway. Once all features have been tested and implemented, the encoder will be launched as well.

    WebM video hardware IPs are implemented and delivered as RTL (VHDL/Verilog) source code, which is a register-level hardware description language for creating digital circuit designs. The code is based on the Hantro brand video IP from On2, which has been successfully deployed by numerous chipset companies around the world. Our designs support VP8 up to 1080p resolution and can run 30 or 60fps, depending on the foundry process and hardware clock frequency.

    The WebM/VP8 hardware decoder implementation has already been licensed to over twenty partners and is proven in silicon. We expect the first commercial chips to integrate our VP8 decoder IP to be available in the first quarter of 2011. For example, Chinese semiconductor maker Rockchip last week demonstrated full WebM hardware playback on their new RK29xx series processor at CES in Las Vegas (video below).


    Note : To view the video in WebM format, ensure that you’ve enrolled in the YouTube HTML5 trial and are using a WebM-compatible browser. You can also view the video on YouTube.

    Hardware implementations of the VP8 encoder also bring exciting possibilities for WebM in portable devices. Not only can hardware-accelerated devices play high-quality WebM content, but hardware encoding also enables high-resolution, real-time video communications apps on the same devices. For example, when VP8 video encoding is fully off-loaded to a hardware accelerator, you can run 720p or even 1080p video conferencing at full framerate on a portable device with minimal battery use.

    The WebM hardware video IP team will be focusing on further developing the VP8 hardware designs while also helping our semiconductor partners to implement WebM video compression in their chipsets. If you have any questions, please visit our Hardware page.

    Happy New Year to the WebM community !

    Jani Huoponen, Product Manager
    Aki Kuusela, Engineering Manager