Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (63)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8963)

  • how to begin streaming while ffmpeg is still transcoding the file in PHP

    15 janvier 2013, par Joyal

    I want to transcode an AVI video to mp4 with ffmpeg, but while is still transcoding, I would like to watch the video transcoded on a flash video player in realtime , Im using jwplayer , I made some test with mp4 and works great , but Im not able to make it work while is transcoding

    I made a php script to run the command in background

    ffmpeg.exe -threads 1 -y -i "a.avi" -s 1280x720 -f mp4 -vcodec libx264 -b 2000000 -ab 128000 -ar 44100 "a.mp4"

    on the jwplayer i have as source "a.mp4"

  • Is async.js needed to process multiple ffmpeg conversions at the same time ?

    15 février 2019, par jurelik

    I’m trying to convert youtube videos to mp3 via my Node.js server, using ’ytdl-core’ and ’fluent-ffmpeg’. Since the server is intended to process multiple requests at the same time, it got me thinking whether or not async.js is needed to convert videos in a time efficient manner.

    The interesting thing however, is that upon testing the handling of multiple requests with and without using async.js, the result seems to be the same both ways - the time it takes to convert 3 videos is the same.

    Here is the code I’m using without async.js :

    server.get('/download/:id', (req, res) => {

     const id = req.params.id;
     let stream = ytdl(`https://www.youtube.com/watch?v=${id}`);

     ffmpeg(stream)
       .audioCodec('libmp3lame')
       .audioBitrate(128)
       .toFormat('mp3')
       .save(`public/downloads/${id}.mp3`)
       .on('error', err => {
         console.log(err);
       })
       .on('end', () => {
         console.log('file downloaded');
         send(req, `public/downloads/${id}.mp3`).pipe(res);
       });
    });

    And this is the code using async.js :

    let queue = async.queue((task, callback) => {
     let stream = ytdl(`https://www.youtube.com/watch?v=${task.id}`);

     ffmpeg(stream)
     .audioCodec('libmp3lame')
     .audioBitrate(128)
     .toFormat('mp3')
     .save(`public/downloads/${task.id}.mp3`)
     .on('error', err => {
       console.log(err);
       callback(err)
     })
     .on('end', () => {
       send(task.req, `public/downloads/${task.id}.mp3`).pipe(task.res);
       callback('file sucessfully downloaded');
     });
    }, 5);

    queue.drain = function() {
     console.log('all items downloaded');
    }

    server.get('/download/:id', (req, res) => {
     queue.push({req: req, id: req.params.id, res: res}, err => {
       console.log(err);
     });
    });

    Does anyone have any ideas why both methods seem to finish conversion at roughly the same time ? I would imagine using async.js should finish converting the videos faster due to processing in parallel, but that isn’t the case.

    Any thoughts would be much appreciated !

  • Having issues making an app with py2app ffmpeg and ffprobe

    23 septembre 2024, par Nuno Mesquita

    I have made an app in OSX Python, that uses FFMEG and ffprobe.

    


    It runs fine in my VS Code.

    


    I want to make a self sustained app, that others can use, without needed to install anything themselves. So, I manually included the static libraries in the bin folder of my main app, and am able to run the app using the libraries inside my bin folder.

    


    I have lost many hours trying to figure this out, and am always getting the same error.

    


    My best shot was being able to open the app inside app/contents/resources and running via Python, but still have the issue saying that ffprobe is not available.

    


    I´m losing my mind...

    


    Should I try a completely different approach ?

    


    For now, I just want my OSX friends to be able to use the app, then I will want it to run on Windows too, but baby steps.

    


    I am not quite sure what to include in setup.py, so I would love to include everything that is in my app folder, to avoid all sorts of errors in missing .pngs and stuff.

    


    I also made sure that libraries are executable (they are about 80MB each (ffmpeg and ffprobe))

    


    Can anyone help =D ???

    


    I described above, tested different ways, checked stuff like redirecting the libraries to the folders of the app :

    


    For the last try my setup.py was :

    


    from setuptools import setup

APP = ['mpc.py']
DATA_FILES = [
    ('bin', ['./bin/ffmpeg', './bin/ffprobe']),
    ('theme/dark', ['./theme/dark/*.png']),
    ('theme/light', ['./theme/light/*.png']),
    ('theme', ['./theme/dark.tcl', './theme/light.tcl']),
    '.',  # Add current directory to ensure everything is included
]

OPTIONS = {
    'argv_emulation': False,
    'packages': ['pydub', 'pygame', 'requests', 'freesound'],
    'includes': ['pydub', 'pygame', 'requests', 'freesound'],
    'resources': ['./bin/ffmpeg', './bin/ffprobe', './theme/dark/*.png', './theme/light/*.png',     './theme/dark.tcl', './theme/light.tcl'],
}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


    


    And I also had this in the beginning of my Python script :

    


    # Set ffmpeg and ffprobe paths relative to the app's Resources/bin directory
app_dir = os.path.dirname(os.path.abspath(__file__)) 

# Set ffmpeg and ffprobe paths relative to the app's Resources/bin directory
ffmpeg_path = os.path.join(app_dir, 'bin', 'ffmpeg')
ffprobe_path = os.path.join(app_dir, 'bin', 'ffprobe') 
AudioSegment.converter = ffmpeg_path
AudioSegment.ffprobe = ffprobe_path


    


    Don't know what else to try.