Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (89)

  • 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 ;

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • 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

Sur d’autres sites (8093)

  • ffmpeg : how to prevent wait in case of error

    14 février, par xrfang

    I use ffmpeg to add watermark to images/videos, using the following command line :

    


    ffmpeg -y -f mjpeg -i input -i /tmp/watermark.png -filter_complex "..." -f mjpeg output


    


    The problem is, in case the input file is not a jpeg file, the process will HANG instead of quit with an error :

    


    Press [q] to stop, [?] for help
[mjpeg @ 0x126dc60] dqt: len 28602 is too large
Error while decoding stream #0:0: Invalid data found when processing input
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A


    


    In my situation, the file has no extension, and I have to specify -f. In case I got the file type wrong, it is an acceptable bug, which I can fix as soon as I found such problem. However it is not good for me if ffmpeg hangs without returning to the parent process, because I have a very large queue of files to process, and I don't want any bug to block the processing task.

    


  • node ffmpeg module stuck more than one file

    29 mai 2021, par Muhammad Hamza

    when I read more than one file it will be stuck and also hang my pc. I need to restart my pc

    


    on one file or 5 files it will work perfectly but not more than 5 files

    


    if anyone know this issue let me know

    


    const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path
const ffmpeg = require('fluent-ffmpeg')
ffmpeg.setFfmpegPath(ffmpegPath)


const testFolder = './videos/';
const fs = require('fs');

 


fs.readdir(testFolder, async(err, files) => {
  try {
    for(let i = 0; i < 10; i++){
      if(files[i] != '1 Surah Fatiha Dr Israr Ahmed Urdu - 81of81.mp4'){
        
        let converter = await ffmpeg(`./videos/${files[i]}`)
        await converter.setStartTime('00:00:00').setDuration('30').output(`./outputfolder/${files[i]}`).on('end', function(err) {
        if(err) { 
          console.log(`err durinng conversation \n ${err}`) 
        }
        else{
          console.log(`Done ${files[i]}`);
        }
        }).on('error', function(err){
          console.log(`error: ${files[i]}`, err)
        }).run()
      }
    }
  } catch (error) {
    console.log(error)
  }
});



    


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