Recherche avancée

Médias (0)

Mot : - Tags -/utilisateurs

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

Autres articles (111)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

  • How to stream video with Play 2 framework

    28 avril 2015, par davidshen84

    I want to use Play 2 framework to develop a simple video stream function on my website. The videos are in mp4 format.

    I used the Enumerator, and the method discussed at this post. In the client side, I use the <video></video> tag to play my video. I tested my application on 3 latest browsers, but none of them can play my video :

    • Chrome : display a empty player
    • IE : it tries to download the video like a file...i guess it is IE
    • Firefox : display a message saying the video is corrupted

    However, if I download the video file, it can be played in the player. I am not sure whether it is because my video codec does not support streaming, or it’s my code has problem.

    ffmpeg -i input.mp4 :

     built with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec
    --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger
    --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
    --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 35.101 / 56. 35.101
     libavformat    56. 31.100 / 56. 31.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 14.100 /  5. 14.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\input.mp4':
     Metadata:
       major_brand     : isom
       minor_version   :
    512
       compatible_brands:
    isomiso2mp41
       encoder         : Lavf56.31.10
    0
     Duration:
    00:00:14.4
    0
    , start:
    0.000000
    , bitrate:
    890 kb/s
       Stream #0:
    0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 160x120 [SAR 1:1 DAR 4:3], 889 kb/s,
    25 fps,
    25 tbr,
    12800 tbn,
    30k tbc
    (default)
       Metadata:
         handler_name    :
    VideoHandler
    At least one output file must be specified
  • ffmpeg extract video unable to play

    30 juin 2021, par Khánh Phạm Đình

    I use ffmpeg to stream video and show up the camera's frame to window in the same time according to current code :

    &#xA;

    file record_video_and_showup.sh

    &#xA;

    ffmpeg -f v4l2 -framerate 30 -i $1  -c:v libx264 -preset superfast -crf 18 -pix_fmt yuv420p  -c:a libmp3lame -ac 2 -ar 44100 -b:a 128k -f tee  -map 0:v "$2|[f=nut]pipe:" | ffplay -an pipe:&#xA;

    &#xA;

    to record video and show up :

    &#xA;

    ./record_video_and_showup.sh /dev/video0 test.mp4&#xA;

    &#xA;

    finally, we get file test.mp4 but can't play it on app such as vlc. When we open it on google chrome, it can run but the start and end time were incorrect.

    &#xA;

    Can anyone help me ?

    &#xA;

  • How to decode audiostream to play with AudioUnits ?

    4 décembre 2015, par sadhi

    I have a PCM ulaw stream that I receive and I want to play this on iOS. To play audio in my app I made an AudioUnit implementation, but since it requires linear PCM I must decode it first. For this I use ffmpeg with the following code :

           AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_PCM_MULAW);

           self.audio_codec_context = avcodec_alloc_context3(codec);
           self.audio_codec_context->codec_type = AVMEDIA_TYPE_AUDIO;
           self.audio_codec_context->sample_fmt = *codec->sample_fmts;
           self.audio_codec_context->sample_rate = 48000;
           self.audio_codec_context->channels    = 1;
           //open codec
           int result = avcodec_open2(self.audio_codec_context, codec,NULL);            

           //this should hold the raw data
           AVFrame * audioFrm = av_frame_alloc();

           AVPacket pkt;
           av_init_packet(&amp;pkt);
           pkt.data = (unsigned char*)buf;
           pkt.size = ret;
           pkt.flags = AV_PKT_FLAG_KEY;

           int got_packet;
           result = avcodec_decode_audio4(self.audio_codec_context, audioFrm, &amp;got_packet, &amp;pkt);

           AVPacket encodedPkt;
           av_init_packet(&amp;encodedPkt);
           encodedPkt.size = 0;
           encodedPkt.data = NULL;

           if (audioFrm != NULL) {
               self.audio_codec_context = NULL;
               AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE);

               self.audio_codec_context = avcodec_alloc_context3(codec);
               self.audio_codec_context->codec_type = AVMEDIA_TYPE_AUDIO;
               self.audio_codec_context->sample_fmt = *codec->sample_fmts;
               self.audio_codec_context->bit_rate = 64000;
               self.audio_codec_context->sample_rate = 48000;
               self.audio_codec_context->channels    = 1;


               int result = avcodec_open2(self.audio_codec_context, codec,NULL);
               if (result &lt; 0) {
                   NSLog(@"avcodec_open2 returned %i", result);
               }


               result = avcodec_encode_audio2(self.audio_codec_context, &amp;encodedPkt, audioFrm, &amp;got_packet);

               if (result &lt; 0) {
                   NSLog(@"avcodec_encode_audio2 returned %s", av_err2str (result));
                   continue;
               }
           }

    For some reason no matter what I do the audio that comes out at the end is all noise.
    So my question is : How should I decode my audiostrean to play it with AudioUnits ?