Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (55)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8255)

  • Express - FFMPEG : Serve transcoded video instead of static video file

    30 septembre 2020, par No stupid questions

    I am creating a website to host videos downloaded on my computer online. However, many of these videos are not in a web friendly format (like .mkv or .flv). It is not an option to convert these files on the disk and then serve them as static files, converting needs to be done live by the server. I want to transcode these videos with ffmpeg to a web friendly format like webm.

    


    So far, I have been able to somewhat successfully transcode a video and serve it :

    


    import express from 'express';
import cors from 'cors';
import ffmpeg from 'fluent-ffmpeg';

const app = express();

app.use(cors());
app.use(express.json());

app.use('/static/videos', globalPasswordMiddleware, (req, res) => {
    res.contentType('webm');
    const videoPath = path.join('C:/videos', decodeURIComponent(req.path));
    ffmpeg(videoPath)
        .format('webm')
        .on('end', function () {
            console.log('file has been converted succesfully');
        })
        .on('error', function (err) {
            console.log('an error happened: ' + err.message);
        })
        .pipe(res, { end: true });
});


    


    However, I am still encountering three different issues :

    


    Firstly, while this code seems to work for transcoding something like a flash video into webm, there are still a number of videos I cannot get to play. For example, a number of videos that play in Chrome will still not play in Firefox or a number of videos that play on my PC won't on my ancient iPad. Are there more arguments I need to be passing to ffmpeg to transcode the video in a way that it will work on a greater number or devices/browsers ?

    


    Second, there is no ability to seek on the video or see how much time remains. When viewing a transcoded video it behaves more like a livestream than if I were serving it as a static file. How can I fix this ?

    


    And finally third, the transcoding is massively slow. Running in production mode, video playback has to buffer for a few seconds every five or so seconds. I am aware transcoding video is an intense process but I believe given my computer's hardware (i9 9900K) and how much faster it is at transcoding videos on Plex that I should be able to transcode videos faster than this.

    


  • ffmpeg - compositing a video within a video in the centre

    1er mars 2017, par kieran

    I’m looking to composite a video with ffmpeg that places the video in the centre no matter what the composited video’s aspect ratio/size.

    The "background" video will always be 16:9 and 1920x1080px. I won’t know the aspect ratio or size of the overlay video as it will be user uploaded and could be any size/ratio.

    Here’s an example of what I’m trying to achieve :

    This is the background image :

    enter image description here

    Now I want to overlay a video over the top :

    enter image description here

    This should also work :enter image description here

    Essentially no matter what the dimensions I want to ensure it’s always resized to fit within 1920x1080 and in addition ensure it’s always centred.

    Finally, if the uploaded video is also 16:9 it should simply overlay the entire video :
    enter image description here

  • How to speed up video and its timestamp to shorten video length, but represent time as it was recorded ?

    7 janvier 2021, par Gonzalo Aspee

    I have a video recorded at 5 fps that I want to speed up to 30 fps to shorten it. That is simple enough as :

    


    ffmpeg -i input.mp4 -r 30 -vf "setpts=0.16666*PTS" output.mp4


    


    But when I try to add a timestamp to it with :

    


    ffmpeg -i input.mp4 -r 30 -vf "setpts=0.16666*PTS, drawtext=text='%{pts\:localtime\:1610043985\:%Y\-%m\-%d %H\\\\\:%M\\\\\:%S.}%{eif\:mod(n,30)\:d}'" output.mp4


    


    The timestamp does not longer represents the time as it was recorded (it should run faster now)

    


    How to achieve this ?