Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (32)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • 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

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (5022)

  • Anomalie #3187 (Fermé) : [ shouldnt be closed with a ;

    13 mars 2014, par jluc -

    La ligne http://core.spip.org/projects/spip/repository/revisions/21264/entry/branches/spip-2-stable/prive/rss/forums_public.html#L21
    commence par un crochet ouvrant [ sans crochet fermant ] matchant. À la place il semble y avoir un point virgule :
    [ ref="(#ID_FORUM|generer_url_forum_parent|url_absolue)"
    href="(#ID_FORUM|generer_url_forum_parent|url_absolue)" />’ ;

  • OpenCV and ffmpeg error. Reason Image not found

    13 septembre 2014, par Maggick

    I’m wrote some code using OpenCV to read in an image. My code compiles just fine but when I run the code I get the following error :

    dyld: Library not loaded: /opt/local/lib/libavcodec.54.dylib
     Referenced from: /usr/local/lib/libopencv_highgui.2.4.dylib
     Reason: image not found
    Trace/BPT trap: 5

    Has anyone seen this error before ?

    Also I don’t know why it is looking in /opt/local/lib my lib search path is only for /usr/local/lib/

    I am not even using ffmpeg but it seems that libavcoder is a ffmpeg library

    Any help or advice would be greatly appreciated

  • Discord.js v14 : AudioPlayer isn't working

    6 septembre 2023, par colonelPanic

    I'm new to javascript in general, and I'm making a Discord bot that can join a voice channel and play some audio. When I run the slash command that I set up, I get no errors and a reply that suggests that everything is running correctly, but no audio is playing. I've looked at the documentation for the audio player and some examples of how to do this on youtube, but I can't find any hints as to why there's no audio.

    


    The command that I'm using to handle the audio player is shown below :

    


    // These are the contents of the 'play.js' file where I'm defining and exporting the slash command 

const { SlashCommandBuilder } = require('discord.js');
const { createAudioPlayer, 
        NoSubscriberBehavior, 
        AudioPlayerStatus,
        getVoiceConnection,
        createAudioResource,
        joinVoiceChannel
      } = require('@discordjs/voice');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('play')
        .setDescription('Plays a song/sound in the voice channel you are in.')
        .addStringOption((option) => 
            option
            .setName('sound')
            .setDescription('The sound/song to play.')
            .setRequired(true)
            .addChoices(
                {name: 'spiderman-pizza', value: 'https://www.youtube.com/watch?v=czTksCF6X8Y'},
                {name: 'royaltyfree-1',   value: 'C:/resources/sounds/royaltyfree-1.mp3'}
            )
        ),
    async execute(interaction) {
        // Create the audio player
        const audioPlayer = createAudioPlayer({
            behaviors: {
                noSubscriber: NoSubscriberBehavior.Pause,
            },
        });
        // Get the existing voice connection
        var connection = getVoiceConnection(interaction.guild.id);
        // If there is no existing connection, create one
        if (!connection) {
            connection = joinVoiceChannel({
                channelId: interaction.member.voice.channel.id,
                guildId: interaction.guild.id,
                adapterCreator: interaction.guild.voiceAdapterCreator
            });
        }
        // Get the chosen audio resource and play it in the voice channel
        const resource = createAudioResource(interaction.options.getString('sound'));
        audioPlayer.play(resource);
        connection.subscribe(audioPlayer);

        interaction.reply({content: `Playing ${interaction.options.getString('sound')}`, ephemeral: true});
    }
}


    


    I don't get any errors when I execute this command with either of the available choices, but the audio player doesn't play anything. On the Discord server, I've given the bot all permissions except for Administrator, and the intents that I've specified in the code can be seen below :

    


    const { 
    Client, 
    Collection, 
    Events, 
    GatewayIntentBits,
 } = require('discord.js');

// Create a new client instance
const client = new Client({ 
    intents: [
            GatewayIntentBits.Guilds,
            GatewayIntentBits.MessageContent,
            GatewayIntentBits.GuildMessages,
            GatewayIntentBits.GuildMembers,
            GatewayIntentBits.GuildVoiceStates
            ] 
        }
    );


    


    I know that the '/play' command is registered and that the bot can join the user's voice channel when '/play' is executed. I've installed 'libsodium-wrappers' (encryption package), 'ffmpeg-static', and '@discordjs/voice' using npm so I don't think there should be any dependency issues. Does anyone have an idea of why the audio isn't playing ?