
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (41)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.
Sur d’autres sites (9210)
-
Splitting an Audio File Into Equal-Lenght Segments Using FFmpeg
29 avril 2021, par G-PowerI 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).
-
Why does My Discord bot stop playing music
27 septembre 2021, par KonglnwzaSo My Discord bot will be able to play music for a while then it will stop and i have to restart the bot to fix it.
And if it stopped then i use command skip it will crash the bot with the errors below


C:\Users\User\Desktop\Discord bot\Song\play.js:96
 server_queue.connection.dispatcher.end();
 ^

TypeError: Cannot read property 'end' of null
 at skip_song (C:\Users\User\Desktop\Discord bot\Song\play.js:96:40)
 at Object.execute (C:\Users\User\Desktop\Discord bot\Song\play.js:65:47)
 at Client.<anonymous> (C:\Users\User\Desktop\Discord bot\bot.js:78:74)
 at Client.emit (node:events:394:28)
 at MessageCreateAction.handle (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
 at Object.module.exports [as MESSAGE_CREATE] (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
 at WebSocketManager.handlePacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
 at WebSocketShard.onPacket (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
 at WebSocketShard.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
 at WebSocket.onMessage (C:\Users\User\Desktop\Discord bot\node_modules\ws\lib\event-target.js:132:16)
</anonymous>


I guess the problem is something with ffmpeg or i must have some npms more.


npm i already installed


- 

- discord.js
- ytdl-core
- ytdl-search
and also i already installed ffmpeg in my computer and set the path








i want to ask that do i have to install any npms more ? or anyone know how to fixed this problem ?


const ytdl = require('ytdl-core');
const ytSearch = require('yt-search');

const queue = new Map();

module.exports = {
 name: 'play',
 aliases: ['skip', 'stop', 'queue', 'leave', 'join'],
 description: 'Joins and play',
 async execute(message, args , cmd, client, Discord){
 const voice_channel = message.member.voice.channel;
 if(!voice_channel) return message.channel.send('เข้าไปอยู่ในดิสก่อนดิวะ :angry: ');//you must in voice channel
 
 
 const server_queue = queue.get(message.guild.id);
 if(cmd==='play' || cmd==='p'){
 if(!args.length) return message.channel.send('จะเปิดอะไรล่ะพี่ :triumph:');//you must have argument
 let song = {};

 if(ytdl.validateURL(args[0])){
 const song_info = await ytdl.getInfo(args[0]);
 song = {title: song_info.videoDetails.title, url: song_info.videoDetails.video_url}
 } else {
 const videoFinder = async (query) => {
 const videoResult = await ytSearch(query);
 return (videoResult.videos.length > 1) ? videoResult.videos[0] : null;
 }

 const video = await videoFinder(args.join(' '));
 if(video){
 song = {title: video.title, url: video.url}
 
 } else{
 message.channel.send('หาไม่เจอ :cry: ');//cant find song
 }
 }
 //const connection = await voiceChannel.join(); 
 if(!server_queue){
 const queue_constructor = {
 voice_channel: voice_channel,
 text_channel: message.channel,
 connection: null,
 songs: []
 }

 queue.set(message.guild.id, queue_constructor);
 queue_constructor.songs.push(song);

 try{
 const connection = await voice_channel.join();
 queue_constructor.connection = connection;
 video_player(message.guild, queue_constructor.songs[0]);
 } catch (err) {
 queue.delete(message.guild.id);
 message.channel.send('error');
 throw err;
 }
 } else{
 server_queue.songs.push(song);
 return message.channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :star_struck: **${song.title}** ใส่เข้าคิวแล้ว`)//added to queue
 }
 

 }
 else if(cmd === 'skip' || cmd ==='s') skip_song(message, server_queue);
 else if(cmd === 'clear' || cmd==='c') clear_song(message, server_queue);
 else if(cmd === 'join') join_song(message);
 else if(cmd === 'leave') leave_song(message);
 else if(cmd === 'queue' || cmd ==='q') queue_show(message,server_queue,Discord);


 }
}

const video_player = async (guild, song) => {
 const song_queue = queue.get(guild.id);

 if(!song){
 //song_queue.text_channel.send('ไปละบาย :kissing_heart: ');
 song_queue.voice_channel.leave();
 queue.delete(guild.id);
 return;
 }
 const stream = ytdl(song.url,{filter: 'audioonly'},{ highWaterMark: 1<<25 });
 song_queue.connection.play(stream, { seek: 0, volume: 0.5 })
 .on('finish', () => {
 song_queue.songs.shift();
 video_player(guild, song_queue.songs[0]);
 });
 await song_queue.text_channel.send(`:regional_indicator_k: :regional_indicator_o: :regional_indicator_n: :regional_indicator_g: :sunglasses: กำลังเล่นเด็ก ***${song.title}***`);//playing song
}

const skip_song = (message, server_queue) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 server_queue.connection.dispatcher.end();
}

const clear_song = (message, server_queue) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 server_queue.songs = [];
 server_queue.connection.dispatcher.end();
}

const join_song = (message) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 message.member.voice.channel.join();
}

const leave_song = (message) => {
 if(!message.member.voice.channel) return message.channel.send('เข้าดิสก่อนดิ :angry: ');//you must be in voice channel
 message.member.voice.channel.leave();
}

const queue_show = (message,server_queue,Discord) => {
 if(!server_queue) return message.channel.send('ไม่มีเพลงในคิวแล้ว :relieved: ');//no song in queue
 const queueList = server_queue.songs.map((song, i) => `[${++i}] - ${song.title}`);
 const queueEmbed = new Discord.MessageEmbed()
 .setDescription(queueList);
 message.channel.send(queueEmbed);
}```



-
lavfi/colorspace_common : add ifdef check to be more compatible.
21 janvier 2019, par Ruiling Songlavfi/colorspace_common : add ifdef check to be more compatible.
Some filters may not need to do linearize/delinearize, thus
will even not define them. Add ifdef check, so they could easily
re-use the .cl file.Signed-off-by : Ruiling Song <ruiling.song@intel.com>