Recherche avancée

Médias (91)

Autres articles (88)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (10878)

  • Is there a way to play fragmented mp4 at random chunk ?

    4 février 2021, par Kate Evklid

    Say there is a video rendered into fragmented mp4 consisting of a number of chunks/fragments. The question is : after the init was loaded to MediaSource buffer, is there a way to play a random fragment ?

    


    A small research of the thing's specifications gave little understanding of the problem. Fragments seem to have a kind of an order IDs hardcoded in them. It's a fairly reasonable idea to include it in a file in case of unreliable connection and asynchronous fetching while streaming content, but is there a way to parse a chunk and change its ID using JavaScript ?

    


    The code below is just playing 2 minute video split into 12 fragments based on user's time and is supposed to be able to start at any chunk (not only the first) and then to repeat.

    


    let mediaSource = new MediaSource
document.getElementById('video').src = URL.createObjectURL(mediaSource)

mediaSource.addEventListener('sourceopen', () => {
    let buffer = mediaSource.addSourceBuffer('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')
    let loadToBuffer = url => {
        let xhr = new XMLHttpRequest
        xhr.responseType = 'arraybuffer'
        xhr.open('GET', url, true)
        xhr.addEventListener('loadend', () => buffer.appendBuffer(new Uint8Array(xhr.response)))
        xhr.send()
    }
    loadToBuffer('video/init.mp4')
    setInterval(() => loadToBuffer('video/video' + (Math.floor(new Date().getTime() / 1000 / 10) % 12) + '.m4s'), 10 * 1000)
})


    


  • PHP file that outputs a video does not play

    2 septembre 2014, par Rob Avery IV

    So, I created a php file that has the following code (abridged version) :

    <?php

    //Full version of file does a lot of database stuff

    //Get $path of file

    header('Content-type: video/mp4');
    header('Content-Length: '.filesize($path)); // provide file size

    $contents = file_get_contents($path);
    echo $contents;

    I use this php to obtain the video content, so I don’t have to hardcode the video path into the HTML and so I can keep the videos outside public_html. I have tested this before, and it works with other video files.

    Here is a timeline of where this file has been and what I’m trying to do :

    1. File is uploaded
    2. File is converted to mp4 using ffmpeg-php
    3. Stream it (similar to youtube) using the php code above

    The file uploads and converts fine (I tested this by downloading the video file locally after it has been converted and I was able to play the video). I use the following ffmpeg command to convert ALL videos to mp4 :

    "ffmpeg -i '".$srcFile."' -vcodec h264 -acodec aac -strict -2 -f mp4 '".$destFile."'";

    My only problems is with step 3. When I use the above php file to output the video, it doesn’t work sometimes (Right now, it only works with a few videos). Every file I’m outputting is converted the same way with the above ffmpeg command.

    How do I make it so I am able to convert all (or at least most) video files to be able to stream them ?

  • ffmpeg output doesn't play on multiple devices

    22 janvier 2019, par jchaykow

    I have read the other stackoverflow posts regarding this topic so I am fairly certain this is not exact duplicate.

    ffmpeg exports a video that seems to only play on select players. I want to export a video that plays on iphone/mac/general players. I have seen the suggestions for the -pix_fmt yuv420p tag but this does not seem to work anymore - I read that Mac has since changed their systems that makes it not compatible anymore.

    I am running :

    ffmpeg -start_number 1 -framerate 4 -pix_fmt yuv420p -i screen%01d.png output.mp4

    This all works fine and I can see the video by doing :

    ffplay output.mp4

    But I would like to be able to transfer this to mobile or general playback, any way to do this, ideally using ffmpeg ? I’d rather not use two tools to do 1 job.


    • Works on gmail
    • Doesn’t work on QuickTime Player
    • Doesn’t work on Flip Player
    • Doesn’t work on iPhone