Recherche avancée

Médias (91)

Autres articles (111)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (9968)

  • html5 video wont play ANY mp4 encodes on ipad

    12 mars 2019, par nickg

    Im trying to embed a mp4 on a page with the HTML5 video tag. Everything works fine on Desktop but nothing will work on an iPad Version 9.3.4.
    I have the mime types in an .htaccess file. I’ve tried various encodes with handbrake, Miro and FFmpeg conversions.

    Even sample videos like at w3schools and videojs don’t play.
    The video will play if i actually sync it to the iPad, but nothing works over the web. An older iPad actually plays mp4s through the HTML5 video player.
    I’m ready to throw this POS iPad through a window.

    <video autoplay="false" width="320" height="240" controls="true">
     <source src="http://webnamehere.com/video/bunny.mp4" type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;">

    Your browser does not support the video tag.
    </source></video>

    Has anyone found a way to fix this ? Is there ANY encoding that this thing will actually play ? Thank you in advance for any help.

  • FFmpeg.swr_convert : audio to raw 16 bit pcm, to be used with xna SoundEffect. Audio cuts out when i convert

    21 mars 2019, par Robert Russell

    I want to resample mkv(vp8/ogg) and also raw 4 bit adpcm to raw 16bit pcm byte[] to be loaded into SoundEffect from xna library. So I can play it out while I’m using other code to display the frames (the video side is working).
    I can read a 16 bit wav file and play it. But when I goto resample something it doesn’t play 100%. One file is 3 mins and 15 secs. I only get 13 sec and 739 ms before it quits playing. I have been learning to do this by finding code samples in c++ and correcting it to work in c# using ffmpeg.autogen.

    the below is my best attempt at resampling.

               int nb_samples = Frame->nb_samples;
                       int output_nb_samples = nb_samples;
                       int nb_channels = ffmpeg.av_get_channel_layout_nb_channels(ffmpeg.AV_CH_LAYOUT_STEREO);
                       int bytes_per_sample = ffmpeg.av_get_bytes_per_sample(AVSampleFormat.AV_SAMPLE_FMT_S16) * nb_channels;
                       int bufsize = ffmpeg.av_samples_get_buffer_size(null, nb_channels, nb_samples,
                                                                AVSampleFormat.AV_SAMPLE_FMT_S16, 1);

                       byte*[] b = Frame->data;
                       fixed (byte** input = b)
                       {
                           byte* output = null;
                           ffmpeg.av_samples_alloc(&amp;output, null,
                               nb_channels,
                               nb_samples,
                               (AVSampleFormat)Frame->format, 0);//

                           // Buffer input

                           Ret = ffmpeg.swr_convert(Swr, &amp;output, output_nb_samples / 2, input, nb_samples);
                           CheckRet();
                           WritetoMs(output, 0, Ret * bytes_per_sample);
                           output_nb_samples -= Ret;

                           // Drain buffer
                           while ((Ret = ffmpeg.swr_convert(Swr, &amp;output, output_nb_samples, null, 0)) > 0)
                           {
                               CheckRet();
                               WritetoMs(output, 0, Ret * bytes_per_sample);
                               output_nb_samples -= Ret;
                           }
                       }

    I changed that all to this but it cuts off sooner.

     Channels = ffmpeg.av_get_channel_layout_nb_channels(OutFrame->channel_layout);
                       int nb_channels = ffmpeg.av_get_channel_layout_nb_channels(ffmpeg.AV_CH_LAYOUT_STEREO);
                       int bytes_per_sample = ffmpeg.av_get_bytes_per_sample(AVSampleFormat.AV_SAMPLE_FMT_S16) * nb_channels;

                       if((Ret = ffmpeg.swr_convert_frame(Swr, OutFrame, Frame))>=0)
                           WritetoMs(*OutFrame->extended_data, 0, OutFrame->nb_samples * bytes_per_sample);
                       CheckRet();

    Both code use a function to set Swr it runs one time after the first frame is decoded.

           private void PrepareResampler()
       {
           ffmpeg.av_frame_copy_props(OutFrame, Frame);
           OutFrame->channel_layout = ffmpeg.AV_CH_LAYOUT_STEREO;
           OutFrame->format = (int)AVSampleFormat.AV_SAMPLE_FMT_S16;
           OutFrame->sample_rate = Frame->sample_rate;
           OutFrame->channels = 2;
           Swr = ffmpeg.swr_alloc();
           if (Swr == null)
               throw new Exception("SWR = Null");
           Ret = ffmpeg.swr_config_frame(Swr, OutFrame, Frame);
           CheckRet();
           Ret = ffmpeg.swr_init(Swr);
           CheckRet();
           Ret = ffmpeg.swr_is_initialized(Swr);
           CheckRet();
       }

    This is where I take the output and put it in the sound effect

    private void ReadAll()
       {

           using (Ms = new MemoryStream())
           {
               while (true)
               {
                   Ret = ffmpeg.av_read_frame(Format, Packet);
                   if (Ret == ffmpeg.AVERROR_EOF)
                       break;
                   CheckRet();
                   Decode();
               }
               if (Ms.Length > 0)
               {
                   se = new SoundEffect(Ms.ToArray(), 0, (int)Ms.Length, OutFrame->sample_rate, (AudioChannels)Channels, 0, 0);
                   //se.Duration; Stream->duration;


                   see = se.CreateInstance();
                   see.Play();
               }
           }
       }
  • How to detect a surge of activity in a video ?

    22 mars 2019, par Alain Collins

    I’d like to automatically detect a surge of activity in a video, e.g. basketball jump shot, hockey face-off, sprinters starting, etc., preferably using ffmpeg.

    In these instances, there’s some motion as the players assume their positions, followed by a pause as they wait for the ref to throw the ball or drop the puck, followed by a lot of motion as all players begin to react. It’s also typical that the camera will be still during this period and begin moving as the ball or puck changes position.

    I’ve tried using the ’select’ filter select='gt(scene,0.4)', but that seems to be more concerned with scene changes (i.e., more dramatic changes) even with low thresholds.

    I also tried exporting the scene information and examining it manually, but couldn’t find a clear pattern that correlated with motion in the video.

    UPDATE : I ran a mestimate on the video. Processing took a long time, but there was definitely a change in activity before and at point of interest. Is there a way to export this information to a file, or otherwise detect the amount of motion seen my mestimate ?