Recherche avancée

Médias (91)

Autres articles (89)

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

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

  • How to combine software and hardware video filters in FFmpeg, e.g. using CUDA/nvenc ? [closed]

    3 novembre 2020, par bemo

    One function of my Windows software project requires capturing video at 100fps for 10 seconds simultaneously from 4 machine vision cameras. I'm initially storing the video data in uncompressed/raw video files, one per camera, where these files are just concatenated raw frame data from the camera (in Bayer rggb8 format).

    


    After capturing, I need to convert these into a compressed format (I don't do this at the time of capture to avoid clogging up the CPU and minimise the risk of dropping frames). I'm using ffmpeg for this and I've arrived at this command that gives satisfactory results :

    


    ffmpeg.exe -y -an -f rawvideo -pixel_format bayer_rggb8 -video_size 2048x1536 -framerate 100 -i input.raw -codec:v libx264 -preset medium -crf 17 -vf "vignette=mode=backward:a=PI/7,lenscorrection=k1=-0.14,unsharp=13:13:1.5:5:5:0,hqdn3d,format=yuv420p" output.mp4

    


    Since the above uses software encoding it is pretty slow and takes several minutes to complete the 4x10s videos. I need it to be a lot faster to avoid the user having to wait too long within my app for transcoding to finish. So, I want to speed this up using ffmpeg's hardware acceleration.

    


    I've purchased a nvenc/CUDA-compatible GeForce card, have compiled ffmpeg with CUDA support and have experimented with the h264_nvenc encoder. Basic encoding works (without encoding parameters and filters) but I've got two specific problems :

    


      

    1. -crf (and possibly -present) aren't supported by h264_nvenc, so what is the hardware-accelerated equivalent to -preset medium -crf 17 ?
    2. 


    3. How can I apply filters to reduce vignetting, correct lens distortion (2 cameras are using fish-eye lenses), sharpen the images and then de-noise them, whilst still significantly improving overall encoding speed ? I understand some filters aren't supported by hardware so I need to use hwupload_cuda and hwdownload to move data between video memory and main memory, but I can't get the exact encoding incantation working and I'm also worried I'll lose all the hardware-acceleration benefit if I have to do too much in software.
    4. 


    


    I'm open to using alternatives to nvenc if necessary - e.g. VAAPI, libmfx/QuickSync or OpenCL as mentioned on ffmpeg's hardware acceleration page.

    


  • ffmpeg filter to make video rectangular/square

    1er août 2021, par MiGu3X

    So, I've been trying for a while To convert this videos I have to a more "squared" way, so it doesn't look circular as they are being recorded.

    


    An example image of the video is the following :
Original picture

    


    I've been trying using lenscorrection filter with ffmpeg attempting to convert that image into something like I could do in photoshop to something like this :
Photoshop converted

    


    But it seemed impossible. I've got information that the camera has a lens of 1.77 mm with focal length F2.4

    


    I don't know a lot about cameras that's why I couldn't understand which parameters top input into the lenscorrection filter or lensfun filter on ffmpeg and if someone could help me it'd be great.
I've read other posts on stackoverflow and blogposts but couldn't find the optimal parameters.

    


  • Discord bot stop playing music in random time of song

    25 janvier 2021, par Jusmejtr

    I have a discord to let me play a random song from the list.

    


    How bot works :
Bot IS connected to firestore Cloud (firebase) where i have economy data from my server. Price for playing random song is 75 coins.

    


    Everything worked as it should, but yesterday I used command, the bot started playing and after a while it stopped playing music and also no other commands worked, bot probably get freezed.

    


    I have no errors in the console until after a minute it showed me this error.

    


    https://pastebin.com/ay9gV75T

    


    The bot is hosted on Heroku and I also added this buildpack to ffmpeg in the settings.

    


    https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest

    


    This is my code :

    


    module.exports = {
    name: "buy-music",
    description: "buy a music",

    async execute(message, config, db){
        const PREFIX = (config.prefix);

        if(message.content === PREFIX + "buy music"){
            const ytdl = require("ytdl-core");
            message.delete();
            let uzivatel = message.author.tag;

            let voiceChannel = message.member.voice.channel;
            if(!voiceChannel) return message.reply("Musíš byť vo voice roomke");

            let cena = 75;
    
            db.collection('economy').doc(uzivatel).get().then(async (q) => {
                if(!q.exists) return message.reply("Nemáš vytvorený účet");
                var hodnota = q.data().money;
                if(hodnota < cena) return message.reply("Nemáš dostatok financií");

                db.collection('statusy').doc('music').get().then(async (asaj) => {
                    let stav = asaj.data().stav;
                    if(stav == "off"){
                        db.collection('statusy').doc('music').update({
                            "stav": "on",
                            "autor": message.author.tag,
                        });
                        hodnota -= cena;
                        db.collection('economy').doc(uzivatel).update({
                            'money': hodnota
                        });
                        function randomhraj(){
                            var pole = [
                     My YT links

                            ]
                            let rnd = Math.floor(Math.random() * pole.length);
                            let output = pole[rnd];
                            return output;
                        }
        
                        try{
                            var pripojenie = await voiceChannel.join();
                            message.reply(`Úspešne si si kúpil chuťovečku`);
                        }catch(error){
                            console.log(`Error pri pripajani do room (music join) ${error}`);
                        }
                        
                        const dispatcher = pripojenie.play(ytdl(randomhraj())).on("finish", async() => {
                            await voiceChannel.leave();
                            await db.collection('statusy').doc('music').update({
                                "stav": "off",
                                "autor": "nikto",
                            });
                        }).on("error", error => {
                            console.log(error)
                        })
                        dispatcher.setVolumeLogarithmic(5 / 5)
                    }else{
                        message.reply("Momentálne si hudbu kúpil niekto iný alebo ak si hudbu kúpil a chceš ju zastaviť použi príkaz *stop");
                    }
                    
                });
            });
    
        }else if(message.content === PREFIX + "stop"){
            message.delete();
            db.collection('statusy').doc('music').get().then((n) => {
                let kto = n.data().autor;
                let meno = message.author.tag;
                if(!message.member.voice.channel) return message.channel.send("Musíš byť vo voice roomke pre stopnutie hudby");
                if(kto == meno){
                    message.member.voice.channel.leave();
                    message.channel.send("Úspešne odpojený");
                    db.collection('statusy').doc('music').update({
                        "stav": "off",
                        "autor": "nikto",
                    });
                }else{
                    message.reply("Zastaviť hudbu môže len ten kto si ju kúpil");
                }
            });
        }
        
    }
}