Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (42)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (4506)

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

  • Split a movie into 1000+ shots using PyAV in a single pass ?

    3 mai 2019, par Andrew Klaassen

    I need to split a 44 minute MP4 into 1000 shots (i.e. separate MP4s) with ffmpeg. I want to do it quickly (i.e. in a single pass rather than 1000 passes), I need perfect frame accuracy, and I need to do it in Windows.

    The Windows command-line length limit is stopping me from doing this, and I’m wondering if someone could show me an example of how to do this using a library like PyAV or Avpy. (Libraries like ffmpeg-python and ffmpy won’t help, since they simply construct an ffmpeg command line and run it, leading to the same Windows command-line length issue that I already have.)

    After much testing and gnashing of teeth, I’ve learned that the only way to get perfect frame accuracy from ffmpeg, 100% of the time, is to use the "select" filter. ("-ss" in the newest versions of ffmpeg is frame accurate 99% of the time ; unfortunately, that’s not good enough for this application.)

    There are two ways to use "select" for this. There’s the slow way, which I’m doing now, and which requires having ffmpeg open the file 1000 times :

    for (start, end, name) in shots:
       audio_start = start / frame_rate
       audio_end = end + 1 / frame_rate
       cmd = [
           path_to_ffmpeg,
           '-y',
           '-i', input_movie,
           '-vf', r'select=between(n\,%s\,%s),setpts=PTS-STARTPTS' % (start, end),
           '-af', 'atrim=%s:%s,asetpts=PTS-STARTPTS' % (audio_start, audio_end),
           '-c:v', 'libx264',
           '-c:a', 'aac',
           '-write_tmcd', '0',
           '-g', '1',
           '-r', str(frame_rate),
           name + '.mp4',
           '-af', 'atrim=%s:%s' % (audio_start, audio_end),
           name + '.wav',
       ]
       subprocess.call(cmd)

    And there’s the fast way, which causes the Windows command line to explode when there are too many shots. The long command line leads to a failure to run :

    cmd = [
       path_to_ffmpeg,
       '-y',
       '-i',
       input_movie,
    ]
    for (start, end, name) in shots:
       audio_start = start / frame_rate
       audio_end = end + 1 / frame_rate
       cmd.extend([
           '-vf', r'select=between(n\,%s\,%s),setpts=PTS-STARTPTS' % (start, end),
           '-af', 'atrim=%s:%s,asetpts=PTS-STARTPTS' % (audio_start, audio_end),
           '-c:v', 'libx264',
           '-c:a', 'aac',
           '-write_tmcd', '0',
           '-g', '1',
           '-r', str(frame_rate),
           name + '.mp4',
           '-af', 'atrim=%s:%s' % (audio_start, audio_end),
           name + '.wav',
       ]
    subprocess.call(cmd)

    I’ve looked through the documentation of PyAV and Avpy, but I haven’t been able to figure out whether the second form of my function is something I could do there, or how I’d go about doing it. If it is possible, would someone be able to write a function equivalent to my second function, using either library ?

  • Node.js seek wav audio file with ffmpeg

    3 mai 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.