Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (22)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (8352)

  • How to append fMP4 chunks to SourceBuffer ?

    24 octobre 2020, par Stefan Falk

    I have finally managed to create an fMP4 but now I am not able to seek or play the file depending on what I do in the file.

    


    On my backend I am taking the file and convert it to MP4 or fragmented MP4.

    


    The file gets send to the clients chunk-wise but this approach does not seem to work as it used to work on Chrome (bot not on Firefox) when using MP3.

    


    How I played MP3

    


    Say we have a 10 seconds track that is 1 MB in size which I want to start playing from second five. I want to load chunks of 1 second.

    


    Thus, I have offset = 5 / 10 * file_size and chunkSize = 1 / 10 * file_size`.

    


    With this I just started loading the MP3-file at an offset of 0.5 MB and loaded the chunks as needed where each chunk was 0.1 MB in size.

    


    This worked because before actually playing the file, I loaded the first bytes of the file and appended it to the SourceBuffer as well s.t. it was able to load the meta-information of the file. However, this approach is just not working for fMP4.

    


    What I tried with fMP4

    


    So, I have been converting MP3 to fMP4 with the MP3-approach ..

    


    .. using +dash (can play but not seek)

    


    ffmpeg -i input.mp3 -acodec aac -b:a 256k -f mp4 -movflags +dash output.mp4


    


    .. using frag_keyframe+empty_moov (cannot play on Chrome)

    


    ffmpeg -i input.mp3 -acodec aac -b:a 256k -f mp4 -movflags frag_keyframe+empty_moov output.mp4


    


    On the client the chunks get appended to a SourceBuffer (as explained above) after creating it with the Mime-Type audio/mp4; codecs="mp4a.40.2" :

    


    this.sourceBuffer = this.mediaSource
                        .addSourceBuffer('audio/mp4; codecs="mp4a.40.2"');


    


    and

    


    private appendSegment = (chunk) => {
  try {
    this.sourceBuffer.appendBuffer(chunk);
  } catch {
    return;
  }
}


    


    The problem is that I can only play the +dash converted file if I start reading it from the start and continue adding chunks.

    


    However, if I start reading the file from further down, the audio gets never played.

    


    playTrack(track, 0.0);  // Start at second 0 works
playTrack(track, 10.0); // Start at second 10 does not work


    


  • Revision 29188 : 2 options de plus pour personnaliser la page d’activation de la mutu : * ...

    15 juin 2009, par real3t@… — Log

    2 options de plus pour personnaliser la page d’activation de la mutu :
    * ’branding’ : texte libre en HTML
    * ’branding_logo’ => logo (sous forme de HTML)

  • ffmpeg nodejs lambda crop issue

    29 juillet 2020, par Ajouve

    I have a lambda function to crop videos with ffmpeg

    


    I am installing the layer this way

    


    #!/bin/bash
mkdir -p layer
cd layer
rm -rf *
curl -O https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar -xf ffmpeg-git-amd64-static.tar.xz
mv ffmpeg-git-*-amd64-static ffmpeg
rm ffmpeg-git-amd64-static.tar.xz


    


    I do not really which version but should be recent as I did it today for the last time

    


    Then my node js lambda function is running with the following nodejs module https://github.com/fluent-ffmpeg/node-fluent-ffmpeg

    


    return new Promise((resolve, reject) => {
        ffmpeg(inputFile.name)
            .videoFilters(`crop=${width}:${height}:${x}:${y}`)
            .format('mp4')
            .on('error', reject)
            .on('end', () => resolve(fs.readFileSync(outputFile.name)))
            .save(outputFile.name);


    


    with for example videoFilters('crop=500:500:20:20')

    


    And I have the folowing error

    


    ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!


    


    On my local computer I am running the following command on the exact same image

    


    ffmpeg -i in.mp4 -filter:v "crop=500:500:20:20" out.mp4


    


    my version of ffmpeg is 4.2.2 and this is working great

    


    I do not have the issue with all videos, here one video which is causing me the issue https://ajouve-util.s3.amazonaws.com/earth.mp4