Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (111)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (9861)

  • Sound in videos is full of static

    15 octobre 2017, par Shawn Blakesley

    I’m trying to play sound from an FFMpegFrameGrabber by getting the Frame and sending the audio samples to a SourceDataLine. Here’s what I have so far :

    Creating the SourceDataLine :

    int channels = _grabber.getAudioChannels();
    int format = _grabber.getSampleFormat();
    AudioFormat fmt = new AudioFormat(_grabber.getSampleRate(), format, channels, true, true);
    _sourceDataLine=(SourceDataLine)AudioSystem.getLine(new DataLine.Info(SourceDataLine.class, fmt));
    _sourceDataLine.open(fmt);
    _sourceDataLine.start();

    Attempting to play sound (images are handled in the else block) :

    org.bytedeco.javacv.Frame f = _grabber.grabFrame();

    if (f.samples != null && f.samples.length > 0)
    {
       byte[] bytes = new byte[4096];
       for (Buffer buffer : f.samples)
       {
           FloatBuffer floatBuffer = (FloatBuffer) buffer;
           ByteBuffer byteBuffer = ByteBuffer.allocate(floatBuffer.capacity() * 4);
           byteBuffer.asFloatBuffer().put(floatBuffer);
           byteBuffer.rewind();
           byteBuffer.get(bytes);
           _sourceDataLine.write(bytes, 0, bytes.length);
       }
    }

    (Note : I tried a few different versions of this and they all have static. The versions I tried included combining the buffers into one large buffer, only trying to play one sample instead of each channel, and changing the audio format to many different permutations.)

    The problem is the sound is full of static, and almost completely unintelligible. This is my first time doing any audio programming, so I’m sure I’m doing something completely ridiculous.

    I appreciate any help. Thank you.

    EDIT

    In response to Radiodef, I tried a number of AudioFormats, and I couldn’t find one that worked for PCM_FLOAT. I found an example that used this :

    fmt = new AudioFormat(AudioFormat.Encoding.PCM_FLOAT, _grabber.getSampleRate(), format, channels, channels, _grabber.getSampleRate(), true);

    Note : I tried a few different values for the framesize from examples : channels * format / 8, channels * 8 with a hardcoded samplerate of 64, channels * 4 with a hardcoded samplerate of 32, and any combinations of those

    But it give me this exception :

    java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_FLOAT 44100.0 Hz, 8 bit, stereo, 2 bytes/frame,  is supported.
       at javax.sound.sampled.AudioSystem.getLine(Unknown Source)
       at com.enplug.player.video.Video.<init>(Video.java:52) &lt;- where I get the SourceDataLine
       ...
    </init>

    EDIT 2

    Sorry for the delay. I appreciate all the help Radiodef.

    Here is some output from the FFMpegGrabber that is automatically output.

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Shawn\AppData\Roaming\Enplug Display\Download\Resource\c7cb496d-96ea-4be8-a238-5ffd50955a3e.mp4':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       creation_time   : 2014-10-02 07:14:38
     Duration: 00:00:31.13, start: 0.000000, bitrate: 2412 kb/s
       Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 246 kb/s (default)
       Metadata:
         creation_time   : 2014-10-02 07:14:38
         handler_name    : Core Media Data Handler
       Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2157 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         creation_time   : 2014-10-02 07:14:38
         handler_name    : Core Media Data Handler
         encoder         : H.264

    I have two videos I’m testing with, and the first one (which is the one in the example above) has the following :

    Bit rate: 247 kbps
    Channels: 2 (stereo)
    Audio sample rate: 44 kHz

    And the second is :

    Bit rate: 161 kbps
    Channels: 2 (stereo)
    Audio sample rate: 48 kHz

    They’re both mp4s, and I can provide any details about the video itself if needed.

    As for the library, yeah I’m pretty locked into JavaCV. We already have videos running without sound, but we’re now trying to add sound to our program.

    When I run the sample program from your JSR link I get :

    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
  • How to transcode flash movie to mp4, then upload to s3

    13 octobre 2017, par user1790300

    I am using the fluent-ffmpeg library with node.js to transcode videos originally in a flash movie format to the mp3 format with multiple resolutions, 1080p, etc.. Once the transcoding is complete, I would like to move the transcoded video to an s3 bucket.

    I pull the original .flv file from a source s3 bucket and pass the stream to the ffmpeg constructor function. The issue is after the transcoding completes, how do I then get the stream of the mp4 data to send to s3.

    Here is the code I have so far :

           var params = {
               Bucket: process.env.SOURCE_BUCKET,
               Key: fileName
           };
           s3.getObject(params, function(err, data) {
               if (err) console.log(err, err.stack); // an error occurred

               var format = ffmpeg(data)
               .size('854x480')
               .videoCodec('libx264')
               .format('flv')
               .toFormat('mp4');
               .on('end', function () {
                   //Ideally, I would like to do the uploading here

                   var params = {
                      Body: //{This is my confusion, how do I get the stream to add here?},
                      Bucket: process.env.TRANSCODED_BUCKET,
                      Key: fileName
                   };
                   s3.putObject(params, function (err, data) {

                  });
               })
               .on('error', function (err) {
                   console.log('an error happened: ' + err.message);
               });

           });

    For the code above, where can I get the transcoded stream to add to the "Body" property of the params object ?

  • Regarding rotation information when rotating a movie in Avfoundation

    15 août 2017, par howmanylife

    I was able to rotate the movie with the following code

    videoCompositionTrack.preferredTransform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))

    I confirmed the information of the rotated video by ffmpeg. Rotate in the tag does not fluctuate as shown below, but a tag called side_data_list was generated and the value of rotation in side_data_list fluctuated, while keeping the information of rotate in tag unchanged.I want to change "tag" information.

    "tags": {
                   "rotate": "90"
           },
    "side_data_list": [
                   {
    "rotation": -90
                   }

    Are there any good advice on AVFoundation and ffmpeg ?