Recherche avancée

Médias (91)

Autres articles (69)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5864)

  • Evolution #2923 (Fermé) : Remplacement d’un document et date du document

    12 mai 2013, par cedric -

    si c’est la date du document que tu veux afficher (et pas sa date de publication) il faut simplement afficher
    [(#VAL{Y-m-d H:i:s}|date{#FICHIER|filemtime}|affdate)]
    Ça n’a pas vraiment de sens de stocker en base une date identique à celle du fichier sur le disque.

    Alternativement, la solution par plugin me semble le mieux, car cela correspond ici à un usage non générique de la date.

  • Convert video with FFMPEG Library in android

    27 septembre 2012, par Sanat Pandey

    I have a problem that I received a video foile from the server which can not be played throgh video view from the app I am making. I don't know what the actaul problem is because all videos are played through same video view but the video received from the server side is not played. So, I think that I have to integrate FFMPEG in our android app, so I can play every video at a runtime conversion. For this I have read much more about FFMPEG Library integration with android through many sites as :

    http://www.roman10.net/how-to-build-android-applications-based-on-ffmpeg-by-an-example/

    Downloaded some projects from GitHUb (https://github.com/appunite/AndroidFFmpeg) but unable to succeed for building the Library through NDK. Some thing I missed and I am working on Windows machine, probably this might be a problem. I want the exact solution regarding this, means step by step solution for building the android project with FFMPEG Library. If you have some useful suggestion then please share with me.

    Thanks in advance.

  • How to reconnect using avformat_open_input without having to alloc the decoder again ?

    26 septembre 2012, par Jona

    Currently, I have a code based on ffplay to stream live content.

    One thing I'm looking to do is be able to reconnect upon loosing a connection without having to shutdown the whole decoding process.

    To me the solution is alloc the decoder myself once and keep using it across reconnections. I can't seem to figure out how to setup a decoder without having to depend on the AVFormatContext. Right now my code is failing when trying to use my own allocated AVCodecContext to decode. But it doesn't fail if I use the AVCodecContext given by AVFormatContext.

    This is part of my initial code :

    // attempt to find more information about the codec
    // also it will open the codecs needed.
    fferror = avformat_find_stream_info(ic, NULL);
    if (0 > fferror)
    {
       // TODO verify type of error to better map it to our errors
       error = ERROR_FAIL_TO_CONNECT;
       LOGE("download() -> avformat_find_stream_info failed! fferror:%d, error:%d", fferror, error);
       goto fail;
    }

    AVCodec *dec;
    // select the audio stream
    int ret = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0);
    if (0 > ret) {
       error = ERROR_UNEXPECTED_ERROR;
       LOGE("download() -> av_find_best_stream failed! ret:%d, error:%d", ret, error);
       goto fail;
    }

    LOGI("download() -> STREAM: nb_streams:%d", ic->nb_streams);
    LOGI("download() -> STREAM: audio format:%s", ic->iformat->name);
    LOGI("download() -> STREAM: audio bitrate:%d", ic->bit_rate);


    // save the audio stream index and source
    is->audio_stream_index = ret;
    is->audio_st = ic->streams[is->audio_stream_index];
    is->audio_buf_size = 0;
    is->audio_buf_index = 0;

    is->audio_st->discard = AVDISCARD_DEFAULT;

    if(ic->pb) {
       ic->pb->eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end
    }

    if (show_status) {
           av_dump_format(ic, 0, is->filename, 0);
       }

    // open codec
       error = open_decoder(is->audio_st->codec, dec);
       if (ERROR_NO_ERROR != error) {
           LOGE("receive_thread() -> open_decoder failed! error:%d", error);
           goto fail;
       }

    And this is the funtion that initializes the decoder.

    static int open_decoder (AVCodecContext *avctx, AVCodec *codec)
    {
       int fferror         = 0;
       AVCodecContext *c   = NULL;

       if (smDecoder.open) {
           LOGW("open_decoder() -> decoder is already open!");
           return ERROR_NO_ERROR;
       }

       // find the decoder
       if (!codec)
       {
           codec = avcodec_find_decoder(avctx->codec_id);
           if (!codec)
           {
               LOGE("open_decoder() -> avcodec_find_decoder failed!");
               return ERROR_UNEXPECTED_ERROR;
           }
       }

       // allocate the decoder av context
       c = avcodec_alloc_context3(codec);
       if (NULL == c) {
           LOGE("open_decoder() -> avcodec_alloc_context3 failed! Out of memory?");
           return ERROR_UNEXPECTED_ERROR;
       }

       // check if the type of codec we support
       if (AVMEDIA_TYPE_AUDIO != c->codec_type)
       {
           LOGE("open_decoder() -> codec_type not supported! codec_type:%d",c->codec_type);
           return ERROR_UNEXPECTED_ERROR;
       }

       // set the proper channels if not properly set
       if (c->channels > 0) {
           c->request_channels = FFMIN(2, c->channels);
       } else {
           c->request_channels = 2;
       }

       c->debug_mv = 0;
       c->debug = 0;
       c->workaround_bugs = workaround_bugs;
       c->idct_algo= idct;
       if(fast) c->flags2 |= CODEC_FLAG2_FAST;
       c->error_concealment= error_concealment;
       c->thread_count = thread_count;

       // open the decoder
       fferror = avcodec_open2(avctx, codec, NULL);
       if (fferror < 0)
       {
           LOGE("open_decoder() -> avcodec_open2 failed! fferror:%d", fferror);
           return ERROR_UNEXPECTED_ERROR;
       }

       // clean up our reusable packet
       memset(&smDecoder.audio_pkt, 0, sizeof(smDecoder.audio_pkt));

       smDecoder.open = 1;
       smDecoder.codec = codec;
       smDecoder.avctx = c;

       return ERROR_NO_ERROR;
    }