Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (80)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (4856)

  • ffmpeg Could not find input stream [closed]

    17 avril 2013, par Peter Walker

    I've seen lot's of post on streaming video feeds to ffserver but still haven't found what I wanted.

    I use not only on the mp4 file but avi and other formats as well.

       ffmpeg -i test5.mp4 http://localhost:8090/feed1.ffm

    I keep finding this error.

       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#39;test5.mp4&#39;:
       Metadata:
              major_brand     : isom
              minor_version   : 512
              compatible_brands: isomiso2mp41
              encoder         : Lavf53.21.1
       Duration: 00:05:00.00, start: 0.000000, bitrate: 278 kb/s
       Stream #0.0(und): Video: mpeg4 (Simple Profile), yuv420p, 640x320 [PAR 1:1 DAR     2:1], 277 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
       Incompatible sample format &#39;(null)&#39; for codec &#39;mp2&#39;, auto-selecting format &#39;s16&#39;
       Last message repeated 1 times
       Output #0, ffm, to &#39;http://localhost:8090/feed1.ffm&#39;:
       Stream #0.0: Video: [0][0][0][0] / 0x0000, yuv420p, q=0-0, 1000k tbn
       Stream #0.1: Video: mpeg1video, (null), 32622x226393720, q=2-31, pass 1, pass 2,     226393 kb/s, 1000k tbn
       Stream #0.2: Audio: mp2, 22050 Hz, 1 channels, s16, 226391 kb/s
       Stream #0.3: Video: msmpeg4, yuv420p, 352x240, q=2-31, 226391 kb/s, 1000k tbn, 15  tbc
       Could not find input stream matching output stream #0.2
       *** glibc detected *** ffmpeg: free(): invalid pointer: 0x0000000000a53d00 ***
       ======= Backtrace: =========
       /lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7f6e0d4af626]
       /usr/lib/x86_64-linux-gnu/libavformat.so.53(avformat_free_context+0xb0)    [0x7f6e0f2c9c70]
       ffmpeg[0x4089bf]
       ffmpeg[0x40a52f]
       ffmpeg[0x407a04]
       /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f6e0d45276d]

    The config file I used for the ffserver is

       Port 8090
       RTSPPort 7654
       BindAddress 0.0.0.0
       MaxHTTPConnections 2000
       MaxClients 1000
       MaxBandwidth 500000
       CustomLog -
       NoDaemon
       <feed>
               File /tmp/feed1.ffm
               FileMaxSize 5M
       #       NoAudio
       </feed>

       <stream>
               Feed feed1.ffm
               Format rtp
       #       NoAudio
               VideoFrameRate 30
       </stream>

    Can anyone help me figure out some something or something to look for ?
    I tried googling but almost everyone uses video feeds instead or it just works well for them.
    Any clue or direction/suggestion would help. Thank you so much in advance.

  • Grab partial .mp4 video from onlline source

    28 juillet 2016, par Flemingjp

    I want to be able to grab a partial mp4 file from an online source so I can produce quick thumbnails.

    My idea was to pull a patial mp4 file from a http request using the header

    Range: 'bytes=1000-'

    However when I parse the data it doesn’t have the mp4 container therefore is corrupt. In Firefox it handles this easily as seeking to an unloaded part of the video is very quick.

    How can I pull partial mp4 clips ? For example from here I could get a clip that is 0:28-0:30

  • FFMpeg encoded video will only play in FFPlay

    8 novembre 2013, par mohM

    I've been debugging my program for a couple of weeks now with the output video only showing a blank screen (was testing with VLC, WMP and WMPClassic). I happened to try using FFPlay and lo and behold the video works perfectly. I've read that this is usually caused by an incorrect pixel format, and that switching to PIX_FMT_YUV420P will make it work universally...but I'm already using that pixel format in the encoding process. Is there anything else that is causing this ?

    AVCodec* codec;
    AVCodecContext* c = NULL;
    uint8_t* outbuf;
    int i, out_size, outbuf_size;

    avcodec_register_all();

    printf("Video encoding\n");

    // Find the mpeg1 video encoder
    codec = avcodec_find_encoder(CODEC_ID_H264);
    if (!codec) {
       fprintf(stderr, "Codec not found\n");
       exit(1);
    }
    else printf("H264 codec found\n");

    c = avcodec_alloc_context3(codec);

    c->bit_rate = 400000;
    c->width = 1920;                                        // resolution must be a multiple of two (1280x720),(1900x1080),(720x480)
    c->height = 1200;
    c->time_base.num = 1;                                   // framerate numerator
    c->time_base.den = 25;                                  // framerate denominator
    c->gop_size = 10;                                       // emit one intra frame every ten frames
    c->max_b_frames = 1;                                    // maximum number of b-frames between non b-frames
    //c->keyint_min = 1;                                        // minimum GOP size
    //c->i_quant_factor = (float)0.71;                      // qscale factor between P and I frames
    //c->b_frame_strategy = 20;
    //c->qcompress = (float)0.6;
    //c->qmin = 20;                                         // minimum quantizer
    //c->qmax = 51;                                         // maximum quantizer
    //c->max_qdiff = 4;                                     // maximum quantizer difference between frames
    //c->refs = 4;                                          // number of reference frames
    //c->trellis = 1;                                           // trellis RD Quantization
    c->pix_fmt = PIX_FMT_YUV420P;
    c->codec_id = CODEC_ID_H264;
    //c->codec_type = AVMEDIA_TYPE_VIDEO;

    // Open the encoder
    if (avcodec_open2(c, codec,NULL) &lt; 0) {
       fprintf(stderr, "Could not open codec\n");
       exit(1);
    }
    else printf("H264 codec opened\n");

    outbuf_size = 100000 + c->width*c->height*(32>>3);//*(32>>3);           // alloc image and output buffer
    outbuf = static_cast(malloc(outbuf_size));
    printf("Setting buffer size to: %d\n",outbuf_size);

    FILE* f = fopen("example.mpg","wb");
    if(!f) printf("x  -  Cannot open video file for writing\n");
    else printf("Opened video file for writing\n");

    // encode 5 seconds of video
    for(i=0;iwidth, c->height);
       uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes*sizeof(uint8_t));

       AVFrame* inpic = avcodec_alloc_frame();
       AVFrame* outpic = avcodec_alloc_frame();

       outpic->pts = (int64_t)((float)i * (1000.0/((float)(c->time_base.den))) * 90);
       avpicture_fill((AVPicture*)inpic, (uint8_t*)pPixels, PIX_FMT_RGB32, c->width, c->height);                   // Fill picture with image
       avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, c->width, c->height);
       av_image_alloc(outpic->data, outpic->linesize, c->width, c->height, c->pix_fmt, 1);

       inpic->data[0] += inpic->linesize[0]*(screenHeight-1);                                                      // Flipping frame
       inpic->linesize[0] = -inpic->linesize[0];                                                                   // Flipping frame

       struct SwsContext* fooContext = sws_getContext(screenWidth, screenHeight, PIX_FMT_RGB32, c->width, c->height, PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL);
       sws_scale(fooContext, inpic->data, inpic->linesize, 0, c->height, outpic->data, outpic->linesize);

       // encode the image
       out_size = avcodec_encode_video(c, outbuf, outbuf_size, outpic);
       printf("Encoding frame %3d (size=%5d)\n", i, out_size);
       fwrite(outbuf, 1, out_size, f);
       delete [] pPixels;
       av_free(outbuffer);    
       av_free(inpic);
       av_free(outpic);
    }

    // get the delayed frames
    for(; out_size; i++) {
       fflush(stdout);

       out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
       printf("Writing frame %3d (size=%5d)\n", i, out_size);
       fwrite(outbuf, 1, out_size, f);
    }

    // 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, f);
    fclose(f);

    avcodec_close(c);
    free(outbuf);
    av_free(c);
    printf("Closed codec and Freed\n");