Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (63)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • 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");
                }
            });
        }
        
    }
}


    


  • Android FFmpeg export of the Video in SurfaceView with Pinch/Scale/Zoom/Bg Color Operation

    31 mai 2024, par CoderDev

    I'm working on a feature in which I need to perform some actions on the selected video from the gallery and then upload it on the Backend server, on this selected video I can pinch it to scale up/down/zoom in/out and place it anywhere on the screen (even out side the screen), just like the Instagram app.
I can apply a background color which will be applied to the whole space of the outer of the video frame.

    


    After all the above changes I'm exporting the changes to the output video that will contain all the changes that I've mentioned above. I'm using the FFMpeg for the same :

    


        implementation("com.arthenica:ffmpeg-kit-full-gpl:6.0-2.LTS")



    


    Basically the operation is being achieved with this solution (Except Export Video) : Android SurfaceView operation on Video to Pinch/Scale/Zoom/Bg Color

    


    I've tried numerous FFmpeg commands but not getting the adequate output, I've tried below solution :

    


        private fun exportVideo() {
        val outputVideoPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).path + "/ffmpegoutput.mp4"
        val inputVideoPath = selectedFilePath
        val bgColor = getColorHexCode()

        // Load the input video dimensions
        val retriever = MediaMetadataRetriever()
        retriever.setDataSource(inputVideoPath)
        val videoWidth = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)?.toInt() ?: 0
        val videoHeight = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)?.toInt() ?: 0
        retriever.release()

        // Calculate the scaled dimensions
        val scaledWidth = (videoWidth * scaleFactor).toInt()
        val scaledHeight = (videoHeight * scaleFactor).toInt()

        // Calculate the new translation
        val translatedX = translationX.toInt()
        val translatedY = translationY.toInt()

         // Ensure the output dimensions are at least as large as the scaled dimensions
        val outputWidth = maxOf(deviceWidth, scaledWidth + abs(translatedX) * 2)
        val outputHeight = maxOf(deviceHeight, scaledHeight + abs(translatedY) * 2)

        // Calculate padding positions
        val xPad = (outputWidth - scaledWidth) / 2 + translatedX
        val yPad = (outputHeight - scaledHeight) / 2 + translatedY

        // Create the filter string for FFmpeg
        val filter = "scale=$scaledWidth:$scaledHeight," +
                "pad=$diagonal:$diagonal:(ow-iw)/2:(oh-ih)/2:$bgColor," +
                "pad=$outputWidth:$outputHeight:$xPad:$yPad:$bgColor"


        val command = ("-i $inputVideoPath " +
                "-vf $filter " +
                "-c:a copy " + // Copy the audio stream without re-encoding
                "-y $outputVideoPath"
                )

        // Execute FFMPEG command
        executeFFmpegKitCommand(command)
    }


    private fun executeFFmpegKitCommand(command: String) {
        FFmpegKit.executeAsync(command) { session ->
            println("FFMPEG executeAsync, session: $session")
            val returnCode = session.returnCode
            if (returnCode.isValueSuccess) {
                // Handle success
                runOnUiThread {
                    Toast.makeText(this, "Video saved successfully!", Toast.LENGTH_SHORT).show()
                }
            } else {
                // Handle failure
                runOnUiThread {
                    Toast.makeText(this, "Failed to save video", Toast.LENGTH_SHORT).show()
                }
            }
        }
    }


    


    But this not giving me the adequate output, it's not creating the output with the Screen's height/width (Tried passing the same), and the original video position is also not correct on the canvas which I've placed with the touch event.

    


  • Make a video file with the song cover for each song in a folder [closed]

    19 novembre 2024, par Nathan Kaufmann

    I have a folder full of wav audio files, and I would want, using ffmpeg in a batch file, to output as many video files as there is songs, with a still image of the cover, with the highest possible audio quality as permitted by ffmpeg. Additionally I would want the metadata (title, artist, album and year) to be copied to the corresponding video file.

    


    For now I have the command :
ffmpeg -f lavfi -i color=c=black:s=640x480 -i song.wav -c:v libx264 -tune stillimage -pix_fmt yuv420p -shortest -c:a aac -ar 96000 -b:a -metadata title="My title" 1000000000k output.mp4

    


    But it only makes a black video with the song, with the highest quality sound I could set, and it changes the title but I couldn't find how to change it to the song's title. Also for now I don't know how to automate it for a whole folder.