
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (78)
-
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (4565)
-
avcodec/h26[45]_metadata_bsf : Use separate contexts for reading/writing
6 juillet 2020, par Andreas Rheinhardtavcodec/h26[45]_metadata_bsf : Use separate contexts for reading/writing
Currently, both bsfs used the same CodedBitstreamContext for reading and
writing ; as a consequence, the state of the writer's context at the
beginning of writing a fragment is exactly the state of the reader after
having read the fragment ; in particular, the writer might not have
encountered one of its active parameter sets yet.This is not nice and may lead to invalid output even when the input
is completely spec-compliant : Think of an access unit containing
a primary coded picture referencing a PPS with id id (that is known from
an earlier access unit/from extradata), then a new version of the PPS
with id id and then a redundant coded picture that is also referencing
the PPS with id id. This is spec-compliant, as the standard allows to
overwrite a PPS with a different PPS in between coded pictures and not
only at the beginning of an access unit. In this scenario, the reader
would read the primary coded picture with the old PPS and the redundant
coded picture with the new PPS (as it should) ; yet the writer would
write both with the new PPS as extradata which might lead to errors or
to invalid data being output without any error (e.g. if the two PPS
differed in redundant_pic_cnt_present_flag).The above scenario does not directly translate to HEVC as long as one
restricts oneself to input with nuh_layer_id == 0 only (as cbs_h265
does : it currently strips away any NAL unit with nuh_layer_id > 0 when
decomposing) ; if one doesn't the same issue as above can happen.If one also allowed input packets to contain more than one access unit,
issues like the above can happen even without redundant coded
pictures/multiple layers.Therefore this commit uses separate contexts for reader and writer.
Reviewed-by : Mark Thompson <sw@jkqxz.net>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com> -
What is the difference between different fadein/fadeout curves in ffmpeg ?
16 août 2018, par siods333333Here is the list of possible curves for
afade
andacrossfade
filters from here https://ffmpeg.org/ffmpeg-filters.html#afade-1tri
select triangular, linear slope (default)
qsin
select quarter of sine wave
hsin
select half of sine wave
esin
select exponential sine wave
log
select logarithmic
ipar
select inverted parabola
qua
select quadratic
cub
select cubic
squ
select square root
cbr
select cubic root
par
select parabola
exp
select exponential
iqsin
select inverted quarter of sine wave
ihsin
select inverted half of sine wave
dese
select double-exponential seat
desi
select double-exponential sigmoidHere is the code for them, from
libavfilter/af_afade.c
:switch (curve) {
case QSIN:
gain = sin(gain * M_PI / 2.0);
break;
case IQSIN:
/* 0.6... = 2 / M_PI */
gain = 0.6366197723675814 * asin(gain);
break;
case ESIN:
gain = 1.0 - cos(M_PI / 4.0 * (CUBE(2.0*gain - 1) + 1));
break;
case HSIN:
gain = (1.0 - cos(gain * M_PI)) / 2.0;
break;
case IHSIN:
/* 0.3... = 1 / M_PI */
gain = 0.3183098861837907 * acos(1 - 2 * gain);
break;
case EXP:
/* -11.5... = 5*ln(0.1) */
gain = exp(-11.512925464970227 * (1 - gain));
break;
case LOG:
gain = av_clipd(1 + 0.2 * log10(gain), 0, 1.0);
break;
case PAR:
gain = 1 - sqrt(1 - gain);
break;
case IPAR:
gain = (1 - (1 - gain) * (1 - gain));
break;
case QUA:
gain *= gain;
break;
case CUB:
gain = CUBE(gain);
break;
case SQU:
gain = sqrt(gain);
break;
case CBR:
gain = cbrt(gain);
break;
case DESE:
gain = gain <= 0.5 ? cbrt(2 * gain) / 2: 1 - cbrt(2 * (1 - gain)) / 2;
break;
case DESI:
gain = gain <= 0.5 ? CUBE(2 * gain) / 2: 1 - CUBE(2 * (1 - gain)) / 2;
break;
}How do they look like ? How do they sound like ? Which one is recommended for fadein+fadeout and crossfade ? Personally I’m just trying to avoid audio clicks, maybe crossfade is a bit of an overkill here.
Related link : http://manual.audacityteam.org/man/fade_and_crossfade.html . Not sure how audacity names translate into ffmpeg names though.
-
My discord music bot works locally, but not on a server [closed]
8 décembre 2022, par AsmondyaI have an issue with my discord music bot that I made with discord.js v14.


When I run it locally, it works fine and plays music as it should. But when I put in on a server (here I use Vultr), it doesn't work.


I am not sure but it might come from FFmpeg. I am kinda desperate and cant really figure where the issue is from. I think it is FFmpeg because it is what converts the music.


What happens :


Me: !play a music
Bot: Now playing a music
*and right after, without playing the music*
Bot: Music finished



What should normally happen is that same thing but the "music finished" should be sent when the queue is finished.


The thing is that the bot works perfectly locally, but does this when it is hosted on a server. Also I don't have any error messages or else. It just doesn't play the music like if the music was 0 seconds length.


I tried making sure everything is installed on the server, same as making sure ffmpeg was installed globally and I have the good version of it. Here is the answer I have to the "ffmpeg -version" command :enter image description here.


Does anyone know what could be the issue or what could cause it ? I can show some code if needed, even tho it works perfectly fine locally.


Here's my code :


const { DisTube } = require('distube')
const Discord = require('discord.js')
const { EmbedBuilder } = require('discord.js')
const client = new Discord.Client({
 intents: [
 Discord.GatewayIntentBits.Guilds,
 Discord.GatewayIntentBits.GuildMessages,
 Discord.GatewayIntentBits.GuildVoiceStates,
 Discord.GatewayIntentBits.MessageContent,
 ]
})
const { ActivityType } = require('discord.js')
const fs = require('fs')
const dotenv = require("dotenv")
dotenv.config()
const { SpotifyPlugin } = require('@distube/spotify')
const { SoundCloudPlugin } = require('@distube/soundcloud')
const { YtDlpPlugin } = require('@distube/yt-dlp')

client.distube = new DisTube(client, {
 leaveOnStop: false,
 emitNewSongOnly: true,
 emitAddSongWhenCreatingQueue: false,
 emitAddListWhenCreatingQueue: false,
 plugins: [
 new SpotifyPlugin({
 emitEventsAfterFetching: true
 }),
 new SoundCloudPlugin(),
 new YtDlpPlugin()
 ]
})
client.commands = new Discord.Collection()
client.aliases = new Discord.Collection()

fs.readdir('./commands/', (err, files) => {
 if (err) return console.log('Could not find any commands!')
 const jsFiles = files.filter(f => f.split('.').pop() === 'js')
 if (jsFiles.length <= 0) return console.log('Could not find any commands!')
 jsFiles.forEach(file => {
 const cmd = require(`./commands/${file}`)
 console.log(`Loaded ${file}`)
 client.commands.set(cmd.name, cmd)
 if (cmd.aliases) cmd.aliases.forEach(alias => client.aliases.set(alias, cmd.name))
 })
})

client.on('ready', () => {
 console.log(`${client.user.tag} is ready to play music.`)
})

client.on('messageCreate', async message => {
 if (message.author.bot || !message.guild) return
 const prefix = "!"
 if (!message.content.startsWith(prefix)) return
 const args = message.content.slice(prefix.length).trim().split(/ +/g)
 const command = args.shift().toLowerCase()
 const cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command))
 if (!cmd) return
 if (cmd.inVoiceChannel && !message.member.voice.channel) {
 return message.channel.send(`You must be in a voice channel!`)
 }
 try {
 cmd.run(client, message, args)
 } catch (e) {
 console.error(e)
 message.channel.send(`Error: \`${e}\``)
 }
})

// Add filters to the queue status :
// | Filter: \`${queue.filters.names.join(', ') || 'Off'}\` 

const status = queue =>
 `Volume: \`${queue.volume}%\` | Loop: \`${
 queue.repeatMode ? (queue.repeatMode === 2 ? 'All Queue' : 'This Song') : 'Off'
 }\` | Autoplay: \`${queue.autoplay ? 'On' : 'Off'}\``
client.distube
 .on('playSong', (queue, song) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle('Now playing')
 .setDescription(`\`${song.name}\` - \`${song.formattedDuration}\`\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('addSong', (queue, song) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle('Song added to the queue')
 .setDescription(`${song.name} - \`${song.formattedDuration}\`\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('addList', (queue, playlist) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle(`Playlist added to the queue`)
 .setDescription(`\`${playlist.name}\` (${
 playlist.songs.length
 } songs)\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('error', (channel, e) => {
 if (channel) channel.send(`An error encountered: ${e.toString().slice(0, 1974)}`)
 else console.error(e)
 })
 .on('empty', channel => channel.send('There is no one here. Im alone, again...'))
 .on('searchNoResult', (message, query) =>
 message.channel.send(`No result found for \`${query}\`!`)
 )
 .on('finish', queue => queue.textChannel.send("https://tenor.com/view/end-thats-all-folks-gif-10601784"))

client.on("ready", () => {
 client.user.setPresence({
 activities: [{
 name: 'AURORA',
 type: ActivityType.Listening
 }],
 status: "idle"
 })
})

client.login(process.env.TOKEN)



It does come from my ffpmeg, I need to install one of these packages instead of the npm installation : https://github.com/BtbN/FFmpeg-Builds/releases


How do I install it on a server (Vultr) ?