Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (71)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (13058)

  • FFMpegCore .Net cuts off the fist few ( 1.5) seconds of audio

    28 mai 2024, par Tim

    I want to use FFMpegCore to convert some audio files to raw pcm. I noticed that this always cuts off 1.5 seconds of my audio from the start. I check my input stream, saved it to HD all good. If use it from cli with the same arguments everything seem fine. I tried -ss 0, no luck. This behavior is observed with .wav (RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz), same issue with different sample rate. I tested mp3 works fine.

    


    public async Task<memorystream> ConvertToPcmStreamAsync(Stream inputStream)&#xA;{&#xA;    var outputStream = new MemoryStream();&#xA;    &#xA;    var audioInput = new StreamPipeSource(inputStream);&#xA;    var audioOutput = new StreamPipeSink(outputStream);&#xA;&#xA;    await FFMpegArguments&#xA;        .FromPipeInput(audioInput)&#xA;        .OutputToPipe(audioOutput, options => options&#xA;            .WithCustomArgument("-ss 0 -f s16le -acodec pcm_s16le -ac 1"))&#xA;        .ProcessAsynchronously();&#xA;&#xA;    // Reset the position of the memory stream to the beginning&#xA;    outputStream.Position = 0;&#xA;&#xA;    return outputStream;&#xA;}&#xA;</memorystream>

    &#xA;

  • avformat/aacdec : enable probesize-sized resyncs mid-stream

    27 septembre 2021, par Jan Ekström
    avformat/aacdec : enable probesize-sized resyncs mid-stream
    

    Before adts_aac_resync would always bail out after probesize amount
    of bytes had been progressed from the start of the input.

    Now just query the current position when entering resync, and at most
    advance probesize amount of data from that start position.

    Fixes #9433

    • [DH] libavformat/aacdec.c
  • ffprobe (ffmpeg) seek in audio wave file

    26 avril 2019, par loretoparisi

    I’m using ffprobe to seek to position on mp3 files, and it works ok. This is how I do in my ffprobe node.js wrapper :

    seek = function (fpath, seconds) {
         var self = this;
         return new Promise((resolve, reject) => {
           //ffprobe -i /myfile.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20%+#1
           var loglevel = self.logger.isDebug() ? 'debug' : 'panic';
           const args = [
             '-hide_banner',
             '-loglevel', loglevel,
             '-show_frames',//Display information about each frame
             '-show_entries', 'frame=pkt_pos',// Display only information about byte position
             '-of', 'default=noprint_wrappers=1:nokey=1',//Don't want to print the key and the section header and footer
             '-read_intervals', seconds + '%+#1', //Read only 1 packet after seeking to position 01:23
             '-print_format', 'json',
             '-v', 'quiet',
             '-i', fpath
           ];
           const opts = {
             cwd: self._options.tempDir
           };
           const cb = (error, stdout) => {
             if (error)
               return reject(error);
             try {
               const outputObj = JSON.parse(stdout);
               return resolve(outputObj);
             } catch (ex) {
               self.logger.error("seek failed %s", ex);
               return reject(ex);
             }
           };
           cp.execFile('ffprobe', args, opts, cb)
             .on('error', reject);
         });
       }//seek

    So to seek to a specified startTime position in seconds you do

    seek(path,startTime)

    and then you will get the equivalent in bytes looking at the packet of the first frames in frames like :

    position  = function() {
         if(this.raw.frames) {
           if(this.raw.frames.length>0) {// get first stream ref
             if(this.raw.frames[0].pkt_pos) {// get first stream ref
               return this.raw.frames[0].pkt_pos;
             }
           }
         }
         return '';
       }//position

    So, when doing seek on a mp3 file it works ok and the range query is

    rangeBytes bytes=80685-8000685 {
     "url": "",
     "path": "",
     "raw": {
       "frames": [
         {
           "pkt_pos": "80685"
         }
       ]
     }
    } {
     "url": "",
     "path": "",
     "raw": {
       "frames": [
         {
           "pkt_pos": "8000685"
         }
       ]
     }
    }

    the problem is that when I use this on a wave file, the resulting range query for the wave file :

    rangeBytes bytes=768058-76800058 {
     "url": "",
     "path": "",
     "raw": {
       "frames": [
         {
           "pkt_pos": "768058"
         }
       ]
     }
    } {
     "url": "",
     "path": "",
     "raw": {
       "frames": [
         {
           "pkt_pos": "76800058"
         }
       ]
     }
    }

    will not work in the standard HTML5 audio player.

    NOTE
    The ffprobe command line command that I’m using with the wrapper above was :

    ffprobe -i /myfile.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20%+#1

    my guess is if this applies to both mp3 and wave files.