Recherche avancée

Médias (91)

Autres articles (34)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

Sur d’autres sites (4540)

  • ffserver "dimensions not set" when loading stream

    29 mai 2013, par GreenGiant

    I am live streaming a webcam from my raspberry pi using avconv (ffmpeg "replacement")

    avconv -f video4linux2 -v debug -r 5 -s 176x144 -i /dev/video0 -vcodec mjpeg http://192.168.0.3:8090/feed1.ffm

    to my local network OSX machine (for testing) running ffserver

    Port 8090
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000
    CustomLog -
    NoDaemon

    <feed>
      File feed1.ffm
      FileMaxSize 20M
      ACL allow 192.168.0.10
    </feed>

    <stream>
      Feed feed1.ffm
      Format mjpeg
      NoAudio
      VideoQMin 1
      VideoQMax 10
      VideoSize 176x144
      VideoFrameRate 5
    </stream>

    When I start avconv it appears to be streaming to ffserver fine :

    Output #0, ffm, to &#39;http://192.168.0.3:8090/feed1.ffm&#39;:
     Metadata:
       encoder         : Lavf55.0.1
       Stream #0.0, 0, 1/1000000: Video: mjpeg, yuvj420p, 320x240, 1/5, q=2-31, 200 kb/s, 1000k tbn, 5 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
    Press ctrl-c to stop encoding
    frame=  108 fps= 18 q=21.7 size=     688kB time=21.60 bitrate= 260.9kbits/s

    And the ffserver status page shows the stream

    ffserver status

    However when I load http://localhost:8090/test.mjpeg in VLC it doesn't play and ffserver spits out :

    Sat May 25 17:25:34 2013 dimensions not set
    Sat May 25 17:25:34 2013 Error writing output header
    Sat May 25 17:25:34 2013 127.0.0.1 - - [GET] "/test.mjpeg HTTP/1.1" 200 66

    I've tried so many different configurations and settings, I'm at a loss to what is causing that error !

    Thank you

  • How to seek by msec with ffmpeg ?

    26 mai 2014, par Srv19

    I am trying to seek in video by milliseconds with ffmpeg. I have been trying to use code from this question, which uses avformat_seek_file (i use it with -1 for stream number and AVSEEK_FLAG_ANY flag).

    After that is called, i try to read next frames, that is :

    if (av_read_frame(fmt_ctx, &amp;pkt) >= 0)
    {
       int ret = 0;

       if (pkt.stream_index == video_stream_idx) {
           /* decode video frame */
           ret = avcodec_decode_video2(video_dec_ctx, frame, got_frame, &amp;pkt);
           if (ret &lt; 0) {
               fprintf(stderr, "Error decoding video frame\n");
               return ret;
           }
    //do something with frame
    }

    However, the frame->pts of retrieved frame always holds the time of the frame that was immediatly after last frame that was read before seeking.

    Edit : In spite of frame->pts forming unbroken sequence, seeking does occur. For some bizarre reason next frame i read is the first one. In fact, after i run :

      int got_frame = 0;
      do
      if (av_read_frame(fmt_ctx, &amp;pkt) >= 0) {
          decode_packet_ro(&amp;got_frame, 0);
          av_free_packet(&amp;pkt);
      }
      else
      {
          read_cache = true;
          pkt.data = NULL;
          pkt.size = 0;
          break;
      }
      while(!got_frame || this->frame->pts*av_q2d(video_dec_ctx->time_base) * 1000 &lt; tsms);

    next frame i read is always the first one.

  • Get frame time in ffmpeg

    30 mai 2013, par Srv19

    I am trying to make a little video player that has seek bar (with ffmpeg, of course). For that i need function that will, using data from frame and/or packet, get me current time in the video that should be set in seek slider.

    It should work like this :

    my_time = get_cur_time()
    seek(my_time + 10)
    assert(my_time+10 == get_cur_time())
    seek(my_time - 10)
    assert(my_time-10 == get_cur_time())

    I do understand thatffmpeg does not support precise seeking, so equality here means "something reasonably cloae).

    What code have i used for this thus far :

    frame_time = frame->pts*av_q2d(video_dec_ctx->time_base) * 1000;

    where frame is AVFrame and video_dec_ctx is AVCodecContext.

    And for seeking :

      int fn = ffmpeg::av_rescale(tsms,fmt_ctx->streams[video_stream->index]->time_base.den,
                                  fmt_ctx->streams[video_stream->index]->time_base.num);
      int frame = fn/1000;

      printf("\t avformat_seek_file to %d\n",frame);
      int flags = AVSEEK_FLAG_FRAME;
      if (frame &lt; this->frame->pts)
          flags |= AVSEEK_FLAG_BACKWARD;
      if(ffmpeg::av_seek_frame(fmt_ctx,video_stream->index,frame,flags))
      {
          printf("\nFailed to seek for time %d",frame);
         return false;
      }

      avcodec_flush_buffers(video_dec_ctx);
      int got_frame = 0;
      do
      if (av_read_frame(fmt_ctx, &amp;pkt) >= 0) {
          decode_packet_ro(&amp;got_frame, 0);
          av_free_packet(&amp;pkt);
      }
      else
      {
          read_cache = true;
          pkt.data = NULL;
          pkt.size = 0;
          break;
      }
      while(!(got_frame &amp;&amp; this->frame->pts >= frame));

    The code does forward seeking passably, but after any attempt of backward seeking my second assertion fails. After seeking to previous position, my method of getting time does not return position less that one before seeking. That causes my seek slider to work grossly incorrectly.