Recherche avancée

Médias (91)

Autres articles (81)

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

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (10849)

  • FFMPEG video playback stops using Custom I/O callback

    4 octobre 2017, par Red Dragon

    I’m using a read function callback for reading data from a video file and I setup a AVIO context and pass the read function pointer to it.
    Then I make a call to avformat_open_input() with empty string as file name. In the read callback once the end of the file is reached, I start reading the file again.(This is just an intermediate step. In the final application, one thread will write video data into a global FIFO and in the read callback I will read data from the FIFO. ) On desktop PC this the video plays fine for long hours without any issue. But on one of embedded platform, the video stops playing around the 1 hour mark. I have being trying to find out as what could be going wrong, but I can’t seem to find the problem. The FFMPEG version used is same for Desktop and embedded platform. The code base is from https://github.com/mpenkov/ffmpeg-tutorial/blob/master/tutorial07.c . I have modified it by removing the "avio_open2" and creating AVIO context and providing a read call back.

    I put some debug prints in the read callback and just before av_read_frame. When the video playback stops, neither the read callback nor the av_read_frame is called. The application is not crashed, it is still active. I looked into the source of FFMPEG on how the read callback is invoked and the return value is used. The number bytes read is returned by the read callback. If the read callback returns 0, from then on, the read callback will not be invoked. So in my read callback, I make sure that I have always some data to write to the buffer.

    How does the read callback and av_read_frame() work together ? I came across comments in the net about av_read_frame pre buffering the data. Since it is a continous playback, am I supposed to set any flags to indicate infinite loop playback ?

  • Video conversion with ffmpeg to target Android and iOS mobile devices

    17 novembre 2017, par Lee Brindley

    I’m building a react native app for both Android and IOS, the back-end API is written with NodeJS.

    Users may upload video from their phones, once uploaded the user and their friends will be able to view the video - so the videos need to be stored in a format which is playable on both Android & IOS.

    My question relates to the conversion of video, uploaded by the user. I developed a similar app a couple of years ago ; I used the repo node-fluent-ffmpeg which provides a nice API to interact with FFmpeg.

    In the previous project (which was a web app), I converted the uploaded videos into two files, one .mp4 and one .webm - if a user uploaded an mp4, then I would skip the mp4 step, likewise if they uploaded a .webm.

    This was kind of slow. Now I’ve come across the same requirement years later, after some research I think I was wrong to convert the videos to the last project.

    I’ve read that I can simply use FFmpeg to change the container format of the videos, which is a much faster process than converting them from scratch.

    The video conversion code I used last time went something along the lines of :

    var convertVideo = function (source, format, output, success, failure, progress) {

       var converter = ffmpeg(source);

       var audioCodec = "libvorbis";

       if (format.indexOf("mp4") != -1) {
           audioCodec = "aac";
       }

       converter.format(format)
           .withVideoBitrate(1024)
           .withAudioCodec(audioCodec)
           .on('end', success)
           .on('progress', progress)
           .on('error', failure);

       converter.save(output);
    };

    Usage :

    Convert to mp4 :

    convertVideo("PATH_TO_VIDEO", "mp4", "foo.mp4", () => {console.log("success");});

    Convert to webm :

    convertVideo("PATH_TO_VIDEO", "webm", "foo.webm", () => {console.log("success");});

    Can anyone point out a code smell here regarding the performance of this operation ? Is this code doing a lot more than it should achieve cross-platform compatibility between IOS and Android ?

    Might be worth mentioning that support for older OS versions is not such a big deal in this project.

  • Video Conversion ? with ffmpeg

    10 août 2017, par Lee Brindley

    I’m building a react native app for both Android and IOS, the back-end API is written with NodeJS.

    Users may upload video from their phones, once uploaded the user and their friends will be able to view the video - so the videos need to be stored in a format which is playable on both Android & IOS.

    My question relates to the conversion of video, uploaded by the user. I have developed a similar app a couple of years ago, I used the repo node-fluent-ffmpeg which provides a nice API to interact with ffmpeg.

    In the previous project (which was a web app), I converted the uploaded videos into two files, one .mp4 and one .webm - if a user uploaded a mp4, then I would skip the mp4 step, likewise if they uploaded a .webm.

    This was kind of slow. Now i’ve come across the same requirement years later, after some research I think I was wrong to convert the videos in the last project.

    I’ve read that I can simply use ffmpeg to change the container format of the videos, which is a much faster process than converting them from scratch.

    The video conversion code I used last time went something along the lines of :

    var convertVideo = function (source, format, output, success, failure, progress) {

       var converter = ffmpeg(source);

       var audioCodec = "libvorbis";

       if (format.indexOf("mp4") != -1) {
           audioCodec = "aac";
       }

       converter.format(format)
           .withVideoBitrate(1024)
           .withAudioCodec(audioCodec)
           .on('end', success)
           .on('progress', progress)
           .on('error', failure);

       converter.save(output);
    };

    Usage :

    Convert to mp4 :

    convertVideo("PATH_TO_VIDEO", "mp4", "foo.mp4", () => {console.log("success");});

    Convert to webm :

    convertVideo("PATH_TO_VIDEO", "webm", "foo.webm", () => {console.log("success");});

    Can anyone point out a code smell here regarding performance of this operation ? Is this code doing a lot more than it should to achieve cross platform compatibility between IOS and Android ?

    Might be worth mentioning that support for older OS versions is not such a big deal in this project.