Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (53)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7277)

  • "Cannot read property 'url' of undefined" even though it's already defined

    28 novembre 2020, par Levi Stancz

    I'm making a Discord music Bot and I'm having trouble with an error saying

    


    TypeError: Cannot read property 'url' of undefined


    


    I tried console logging it and it showed me the url, so I don't understand what is the problem with my code.

    


    Here's my code :

    


    //musicBOT
const Discord = require('discord.js');
const client = new Discord.Client();
const ytdl = require('ytdl-core');
const mcPrefix = '.';

const queue = new Map();

client.on('ready', () => console.log('Music bot ready!'));

client.on('message', async message => {
    if(message.author.bot) return;
    if(!message.content.startsWith(mcPrefix)) return;

    const args = message.content.substring(mcPrefix.length).split(" ");
    const serverQueue = queue.get(message.guild.id);

    if(message.content.startsWith(`${mcPrefix}play`)) {

        const voiceChannel = message.member.voice.channel;
        if(!voiceChannel) return message.channel.send("Hang-szobában kell lenned zenelejátszáshoz.");
        const permissions = voiceChannel.permissionsFor(message.client.user);
        if(!permissions.has('CONNECT')) return message.channel.send("Nincs jogosultságom csatlakozni a hangszobához.");
        if(!permissions.has('SPEAK')) return message.channel.send("Nincs jogosultságom megszólalni ebben a hangszobában.");

        const songInfo = await ytdl.getInfo(args[1])
        const song = {
            title: songInfo.title,
            url: songInfo.videoDetails.video_url
        }

        if(!serverQueue) {
            const queueConstruct = {
                textChannel: message.channel,
                voiceChannel: voiceChannel,
                connection: null,
                songs: [],
                volume: 5,
                playing: true
            }
            queue.set(message.guild.id, queueConstruct)

            queueConstruct.songs.push(song)

            try{
                var connection = await voiceChannel.join();
                message.channel.send(`${song.title} lejátszása.`)
                queueConstruct.connection = connection
                play(message.guild, queueConstruct.songs[0])
            }catch(e){
                console.log(`Hiba csatlakozás közben itt: ${e}`);
                queue.delete(message.guild.id)
                return message.channel.send(`Hiba volt a csatlakozás közben itt: ${e}`)
            }
        } else{
            serverQueue.songs.push(song)
            return message.channel.send(`**${song.title}** hozzáadva a lejátszási listához.`)
        }
        return undefined
        

        
    }else if (message.content.startsWith(`${mcPrefix}stop`)) {
        if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned ahhoz, hogy leállítsd a zenét.")
        if(!serverQueue) return message.channel.send("There is nothing playing")
        serverQueue.songs= []
        serverQueue.connection.dispatcher.end()
        message.channel.send("Sikeresen megálltottad a zenét.")
        return undefined
    }else if(message.content.startsWith(`${mcPrefix}skip`)){
        if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned a skip parancshoz.")
        if(!serverQueue) return message.channel.send("There is nothing playing")
        serverQueue.connection.dispatcher.end()
        message.channel.send("Zene továbbléptetve.")
        message.channel.send(`${song.title} játszása.`)
        
        return undefined
    }

    function play(guild, song) {
        const serverQueue = queue.get(guild.id)
    
        if(!serverQueue.songs){
            serverQueue.voiceChannel.leave()
            queue.delete(guild.id)
            return
        }
    
        const dispatcher = serverQueue.connection.play(ytdl(song.url))
            .on('finish', () => {
                serverQueue.songs.shift()
                play(guild, serverQueue.songs[0])
            })
            .on('error', error => {
                console.log(error)
            })
            dispatcher.setVolumeLogarithmic(serverQueue.volume / 5)
    }

})
//musicBOT


    


    and here is the full error :

    


    const dispatcher = serverQueue.connection.play(ytdl(songInfo.url))&#xA;                                                                     ^&#xA;TypeError: Cannot read property &#x27;url&#x27; of undefined&#xA;    at play (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:97:70)&#xA;    at StreamDispatcher.<anonymous> (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:100:17)&#xA;    at StreamDispatcher.emit (node:events:388:22)&#xA;    at finish (node:internal/streams/writable:734:10)&#xA;    at processTicksAndRejections (node:internal/process/task_queues:80:21)&#xA;</anonymous>

    &#xA;

    I started searching on the internet but found nothing about it, I guess my basic javascript knowledge is just not enough.

    &#xA;

  • Recursively Converting FLAC to MP3 Using FFmpeg While Maintaining Metadata and Directory Structure on Windows

    20 mars 2017, par elgo2006

    I’m trying to use FFmpeg to convert all of the .flac’s in my music library to .mp3’s while maintaining the metadata and directory structure of the original files. I’ve got everything working so far except for maintaining the directory structure.

    So far I have :

    @echo off
    rem Copies the original directory structure from F:\Music to D:\Music
    xcopy /T %1 %2
    rem Recursively converts files with .flac extension from F:\Music to .mp3 in D:\Music
    for /R %1 %%i in (*.flac) do (
       echo Currently converting "%%~nxi"
       ffmpeg -v quiet -i "%%i" -q:a 0 -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "%2\%%~ni.mp3"
    )
    echo Completed.
    pause

    I feel like my issue is coming from having my FFmpeg output as "%2\%%~ni.mp3" , however I can’t get it to maintain the original directory structure. I have played around with dpni as options for the output, but then it does not convert correctly.

    The .bat is being executed from the command line as convert F:\Music D:\Music

    All music in the original directory has the structure F :\Music\Artist Name\Album Name\Song.flac and I want it to end up as D :\Music\Artist Name\Album Name\Song.mp3.

    Alternatively, is there a way to convert the .flac to an .mp3 within the same directory as the source file and then delete the flac ?

  • FFMPEG Merge a video that has sound with an mp3 audio file outputs audio out of sync [duplicate]

    23 février 2021, par Mahmoud Eidarous

    An example for further explanation :&#xA;I'm recording a video singing at the same time the singer sings in a song.&#xA;So, I have a video file(Me singing) and the audio file(the song).

    &#xA;

    I tried this simple command :

    &#xA;

    -i $video-i $audio-c copy -map 0:0 -map 1:0 -shortest output.mp4&#xA;

    &#xA;

    But, it gives an output with the video sound muted(my voice muted).

    &#xA;

    And I want something more advanced to control the volume of each sound, and add filter to make the output sound sounds like it was recorded in a studio.. so after a long search through the documentation and similar questions, I made up this command here..

    &#xA;

    -i $video -i $audio -filter_complex "[0:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=0.8[a1]; [1:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=4[a2]; [a1][a2]amerge,pan=stereo|c0code>

    &#xA;

    It gives a video output with audio out of sync. (My voice doesn't match the singer).

    &#xA;

    Any help would be really appreciated !

    &#xA;