Recherche avancée

Médias (91)

Autres articles (96)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

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

Sur d’autres sites (8642)

  • Anomalie #3185 : Problème avec les hooks de SVN sur la zone

    18 mars 2014, par Sylvain Lesage

    Sylvain Lesage a écrit :

    OK c’est mis à jour. Merci

    http://zone.spip.org/trac/spip-zone/changeset/81171/_plugins_/tickets/trunk

  • mp4 video file generated using ffmpeg, play on desktop but doesn't play on device

    9 mai 2014, par Nikesh

    I am generating a video that converts images into .mp4 video file. Every thing works fine. File is also generated as mp4 but the file doesn’t run on android device, says cannot play video.

    Please find the attached sample code which convert single jpeg file into video (.mp4)

    Please help me to resolve this issue. Thanks.

    JNIEXPORT void JNICALL Java_roman10_ffmpegtst_VideoBrowser_videoExample(JNIEnv *pEnv, jobject pObj, char* imagefile,char* videoFile)
    {
    avcodec_init();
    av_register_all();
    avcodec_register_all();

    AVCodecContext          *pOCtx= NULL;
    AVCodec                 *pOCodex = NULL;
    LOGE(10,"Start videoExample");
    pOCodex = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);

    if (!pOCodex) {
       LOGE(10,"Cannot find encoder %s", pOCodex);
       exit(1);
    }

    pOCtx= avcodec_alloc_context3(pOCodex);

    uint8_t *outbuf;
    int i, out_size;

    pOCtx->bit_rate = 400000;
    pOCtx->width = 640;
    pOCtx->height = 480;
    AVRational rational = {1,25};
    pOCtx->time_base= rational;
    pOCtx->gop_size = 10; /* emit one intra frame every ten frames */
    pOCtx->max_b_frames=1;
    pOCtx->pix_fmt = AV_PIX_FMT_YUV420P;

    LOGE(10,"Start avcodec_open2");
    int ret = avcodec_open2(pOCtx,pOCodex,NULL);
    if(ret < 0)
    {
        return;
    }
    LOGE(10,"End avcodec_open2");
    AVFormatContext         *pIFormatCtx = NULL;
    ret = avformat_open_input(&pIFormatCtx, imagefile, NULL, NULL);
    if(ret < 0)
    {
       //Cant't open jpg file
       return;
    }
    av_dump_format(pIFormatCtx, 0, imagefile, 0);

    AVCodecContext          *pICodecCtx;  //output codec context
    pICodecCtx = pIFormatCtx->streams[0]->codec;
    /*pICodecCtx->width = 640;
    pICodecCtx->height = 480;
    pICodecCtx->pix_fmt = PIX_FMT_YUV420P;*/


    AVCodec *pICodec = avcodec_find_decoder(pICodecCtx->codec_id); //output codec
    // Open codec
    ret = avcodec_open2(pICodecCtx, pICodec,NULL);
    if(ret < 0)
    {
       //Can't find the decoder
       return;
    }

    AVFrame *pIFrame = avcodec_alloc_frame();
    if (!pIFrame)
    {
       //Can't alloc the input frame
       return ;
    }


    int bufSize = avpicture_get_size(AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);
    uint8_t *buffer = (uint8_t *) av_malloc(bufSize * sizeof(uint8_t));

    avpicture_fill((AVPicture *) pIFrame, buffer, AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);

    FILE *outputFile;

    outputFile = fopen(videoFile, "w+");
    if (!outputFile) {
       LOGE(10,"could not open ");
       exit(1);
    }

    int outbuf_size = 100000;
    outbuf = (uint8_t*)malloc(outbuf_size);

    AVPacket packet;
    int frameFinished;
    int framesNumber = 0;
    while (av_read_frame(pIFormatCtx, &packet) >= 0)
    {
       if(packet.stream_index != 0)
           continue;

       ret = avcodec_decode_video2(pICodecCtx, pIFrame, &frameFinished, &packet);
       if (ret > 0)
       {
           pIFrame->quality = 4;

           for(i=0;i<25;i++) {
               fflush(stdout);
               /* encode the image */
               out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, pIFrame);
               fwrite(outbuf, 1, out_size, outputFile);
           }
       }
    }

    /* get the delayed frames */
    for(; out_size; i++) {
       fflush(stdout);
       out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, NULL);
       fwrite(outbuf, 1, out_size, outputFile);
    }

    /* add sequence end code to have a real mpeg file */
    outbuf[0] = 0x00;
    outbuf[1] = 0x00;
    outbuf[2] = 0x01;
    outbuf[3] = 0xb7;
    fwrite(outbuf, 1, 4, outputFile);
    fclose(outputFile);
    free(outbuf);

    avcodec_close(pOCtx);
    av_free(pOCtx);
    av_free(pIFrame);
    }
  • Unable to play RTSP URL with ffplay but able to play it with VLC

    15 février 2018, par Dims

    I am trying to see my IP camera with VLC and see it with VLC with address

    rtsp://192.168.1.168

    Unfortunately, when I enter the same address into ffplay

    ffplay rtsp://192.168.1.168

    I get multiple errors like

    UDP timeout, retrying with TCP 0B f=0/0
    method PAUSE failed: 455 Method Not Valid In This State

    why and how to overcome ?