
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (55)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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. -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (5777)
-
How to upgrade ffmpeg to the latest version [closed]
14 avril 2013, par user1503606I am looking to upgrade ffmpeg to the latest version if i run
yum install ffmpeg ffmpeg-devel
I get the following
Setting up Install Process
Package ffmpeg-0.6.5-1.el5.rf.x86_64 already installed and latest version
Package ffmpeg-devel-0.6.5-1.el5.rf.x86_64 already installed and latest version
Nothing to doThen if i run
ffmpeg -i P1010989.MOV -vcodec copy -acodec aac -strict -2 -b:a 384k ouet.mp4
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'P1010989.MOV':
Duration: 00:00:01.00, start: 0.000000, bitrate: 11584 kb/s
Stream #0.0(eng): Video: mjpeg, yuvj420p, 640x480, 11315 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0.1(eng): Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s
Unrecognized option 'b:a'Any suggestions
-
How can I use libav to encode video to dvd compliant mpeg2
18 juillet 2014, par Dave CampIm new to using FFMpeg and I’d like to do the equivalent of using the command line option -f dvd but in my app, by using the libav api. In the source of FFMpeg the option sets up some parameters as
opt_video_codec(o, "c:v", "mpeg2video");
opt_audio_codec(o, "c:a", "ac3");
parse_option(o, "f", "dvd", options);
parse_option(o, "s", norm == PAL ? "720x576" : "720x480", options);
parse_option(o, "r", frame_rates[norm], options);
parse_option(o, "pix_fmt", "yuv420p", options);
av_dict_set(&o->g->codec_opts, "g", norm == PAL ? "15" : "18", AV_DICT_DONT_OVERWRITE);
av_dict_set(&o->g->codec_opts, "b:v", "6000000", AV_DICT_DONT_OVERWRITE);
av_dict_set(&o->g->codec_opts, "maxrate", "9000000", AV_DICT_DONT_OVERWRITE);
av_dict_set(&o->g->codec_opts, "minrate", "0", AV_DICT_DONT_OVERWRITE); // 1500000;
av_dict_set(&o->g->codec_opts, "bufsize", "1835008", AV_DICT_DONT_OVERWRITE); // 224*1024*8;
av_dict_set(&o->g->format_opts, "packetsize", "2048", AV_DICT_DONT_OVERWRITE); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
av_dict_set(&o->g->format_opts, "muxrate", "10080000", AV_DICT_DONT_OVERWRITE); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8
av_dict_set(&o->g->codec_opts, "b:a", "448000", AV_DICT_DONT_OVERWRITE);
parse_option(o, "ar", "48000", options);How do these relate to the libav api ?
The incoming video frames are at the correct resolution for pal of 720x576 in yuv420p format. Some of my params...
pCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
pContext->bitrate = 48000000;
pContext->width = 720;
pContext->height = 576;
AVRational fps = {1,25};
pContext->time_base = fps;
pContext->gop_size = 15;
pContext->max_b_frmaes = 2;
pContext->pix_fmt = AV_PIX_FMT_YUV420P;
av_set_dict(&pDict,"packet_size","2048",0); // This seems to be ignored?
avcodec_open2(pContext,pCodec,&pDict);The AVDictionary... What is the dictionary ? How does it relate the encoding process ? Is it simply a user dictionary for passing a collection of settings around your code ?
Ultimately I’d like to be able to transcode incoming video frames that are already in the correct size and format for pal dvd and output a dvd compliant mpeg2 video ( data packets of 2048 bytes ). I understand the mpeg2 video format but I’m confused with ffmpeg params.
Thanks !
-
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) ?