Recherche avancée

Médias (91)

Autres articles (78)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (12265)

  • I tried programming a discord bot for music, it joins the channel, it apparently "speaks" but i can't hear anything

    2 avril 2020, par borax

    I tried to code it alone, but I got the same problem, then I copied the code from https://gabrieltanner.org/blog/dicord-music-bot and it persists. I have downloaded FFmpeg, but I still think the problem lies there. Any suggestions ? (it's my first time here, I don't know how much of the code is relevant, also, i get this Error : FFmpeg/avconv not found !)

    



    const Discord = require('discord.js');
const client = new Discord.Client();

const ytdl = require("ytdl-core");

const token = 'REDACTED';

const prefix = '$';

var version = '1.1.2';

var servers = {};

const queue = new Map();

client.on('ready', () => {
    console.log('BOT is online');
})
client.once("ready", () => {
    console.log("Ready!");
  });

  client.once("reconnecting", () => {
    console.log("Reconnecting!");
  });

  client.once("disconnect", () => {
    console.log("Disconnect!");
  });

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

    const serverQueue = queue.get(message.guild.id);

    if (message.content.startsWith(`${prefix}play`)) {
      execute(message, serverQueue);
      return;
    } else if (message.content.startsWith(`${prefix}skip`)) {
      skip(message, serverQueue);
      return;
    } else if (message.content.startsWith(`${prefix}stop`)) {
      stop(message, serverQueue);
      return;
    } else {
      message.channel.send("You need to enter a valid command!");
    }
  });

  async function execute(message, serverQueue) {
    const args = message.content.split(" ");

    const voiceChannel = message.member.voice.channel;
    if (!voiceChannel)
      return message.channel.send(
        "You need to be in a voice channel to play music!"
      );
    const permissions = voiceChannel.permissionsFor(message.client.user);
    if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
      return message.channel.send(
        "I need the permissions to join and speak in your voice channel!"
      );
    }

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

    if (!serverQueue) {
      const queueContruct = {
        textChannel: message.channel,
        voiceChannel: voiceChannel,
        connection: null,
        songs: [],
        volume: 5,
        playing: true
      };

      queue.set(message.guild.id, queueContruct);

      queueContruct.songs.push(song);

      try {
        var connection = await voiceChannel.join();
        queueContruct.connection = connection;
        play(message.guild, queueContruct.songs[0]);
      } catch (err) {
        console.log(err);
        queue.delete(message.guild.id);
        return message.channel.send(err);
      }
    } else {
      serverQueue.songs.push(song);
      return message.channel.send(`${song.title} has been added to the queue!`);
    }
  }

  function skip(message, serverQueue) {
    if (!message.member.voice.channel)
      return message.channel.send(
        "You have to be in a voice channel to stop the music!"
      );
    if (!serverQueue)
      return message.channel.send("There is no song that I could skip!");
    serverQueue.connection.dispatcher.end();
  }

  function stop(message, serverQueue) {
    if (!message.member.voice.channel)
      return message.channel.send(
        "You have to be in a voice channel to stop the music!"
      );
    serverQueue.songs = [];
    serverQueue.connection.dispatcher.end();
  }

  function play(guild, song) {
    const serverQueue = queue.get(guild.id);
    if (!song) {
      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.error(error));
    dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
    serverQueue.textChannel.send(`Start playing: **${song.title}**`);
  }

client.login(token);


    


  • How to split audio file into equal-length segments with ffmpeg ?

    11 mars, par GPWR

    I want to split an audio file into several equal-length segments using FFmpeg. I want to specify the general segment duration (no overlap), and I want FFmpeg to render as many segments as it takes to go over the whole audio file (in other words, the number of segments to be rendered is unspecified).
Also, since I am not very experienced with FFmpeg (I only use it to make simple file conversions with few arguments), I would like a description of the code you should use to do this, rather than just a piece of code that I won't necessarily understand, if possible.
Thank you in advance.

    


    P.S. Here's the context for why I'm trying to do this :
I would like to sample a song into single-bar loops automatically, instead of having to chop them manually using a DAW. All I want to do is align the first beat of the song to the beat grid in my DAW, and then export that audio file and use it to generate one-bar loops in FFmpeg.

    


    In the future, I will try to do something like a batch command in which one can specify the tempo and key signature, and it will generate the loops using FFmpeg automatically (as long as the loop is aligned to the beat grid, as I've mentioned earlier). 😀

    


  • Audacity vocal removal failed when ffmpeg-conversion was involved

    10 mars 2018, par fyang

    I downloaded some songs coded with FLAC, and Audacity could remove the vocals quite well.

    When I downloaded songs coded with ALAC, I must use ffmpeg to convert them to some other forms because Audacity didn’t recognise .m4a files.

    I used the command ffmpeg -i "song 01.m4a" -f flac "song 01.flac". Now Audacity could load the song, but its vocal removal failed to remove the vocals.

    I tried again with this command in order to be precise, ffmpeg -i "song 01.m4a" -af "pan=stereo|c0=c0|c1=c1" -f flac "song 01.flac", and vocal removal did not work either.

    I tried to do it manually by splitting, inverting and changing both channels to mono, but the vocals were still there.

    I think the problem lies with the ffmpeg conversion step. Is there any fix ? Thanks !

    Below is the result of the conversion :

    ffmpeg -i "song 01.m4a" -af "pan=stereo|c0=c0|c1=c1" -f flac "song 01.flac"
    ffmpeg version N-90143-gb6652f5100 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
     libavutil      56.  7.101 / 56.  7.101
     libavcodec     58. 12.102 / 58. 12.102
     libavformat    58.  9.100 / 58.  9.100
     libavdevice    58.  2.100 / 58.  2.100
     libavfilter     7. 12.100 /  7. 12.100
     libswscale      5.  0.101 /  5.  0.101
     libswresample   3.  0.101 /  3.  0.101
     libpostproc    55.  0.100 / 55.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0000019f2b258000] stream 0, timescale not set
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'song 01.m4a':
     Metadata:
       major_brand     : M4A
       minor_version   : 0
       compatible_brands: M4A mp42isom
       creation_time   : 2009-12-27T00:15:23.000000Z
       track           : 1/10
       genre           :
       album           :
       artist          :
       comment         : ExactAudioCopy v0.95b4
       DISCID          :
       iTunNORM        :  00000F32 00000E1D 0000547D 00005B93 0006C3CA 0006C43E 00007FF8 00007FFF 00058227 0003593B
       title           : song 01
       encoder         : iTunes 9.0.2.25
       date            : 2005
       album_artist    :
       lyrics          :
     Duration: 00:08:10.84, start: 0.000000, bitrate: 921 kb/s
       Stream #0:0(und): Audio: alac (alac / 0x63616C61), 44100 Hz, stereo, s16p, 920 kb/s (default)
       Metadata:
         creation_time   : 2009-12-27T00:15:23.000000Z
       Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 300x300 [SAR 100:100 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (alac (native) -> flac (native))
    Press [q] to stop, [?] for help
    [Parsed_pan_0 @ 0000019f2b2a6fc0] Pure channel mapping detected: 0 1
    Output #0, flac, to 'song 01.flac':
     Metadata:
       major_brand     : M4A
       minor_version   : 0
       compatible_brands: M4A mp42isom
       lyrics          :
       TRACKNUMBER     : 1/10
       genre           :
       album           :
       artist          :
       DESCRIPTION     : ExactAudioCopy v0.95b4
       DISCID          :
       iTunNORM        :  00000F32 00000E1D 0000547D 00005B93 0006C3CA 0006C43E 00007FF8 00007FFF 00058227 0003593B
       title           : song 01
       ALBUMARTIST     :
       date            : 2005
       encoder         : Lavf58.9.100
       Stream #0:0(und): Audio: flac, 44100 Hz, stereo, s16, 128 kb/s (default)
       Metadata:
         creation_time   : 2009-12-27T00:15:23.000000Z
         encoder         : Lavc58.12.102 flac
    size=   54518kB time=00:08:10.84 bitrate= 909.9kbits/s speed=  35x
    video:0kB audio:54508kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.018294%