
Recherche avancée
Autres articles (54)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Les images
15 mai 2013 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (6105)
-
DiscordJS Music Bot Connects and Then Immediately Disconnects From Voice Channel
23 janvier 2020, par კΙбthebraɨɴsI see that questions similar to this one have been asked, and after following their solutions I still end up the same as I started. Below I have listed my code, a link to test it with a sample bot I created, and the modules you will need to test it using a self-hosted instance.
My problem is that upon connecting to the specified voice channel, the bot immediately leaves afterwards without any signs of errors or exceptions. I’m not sure if it is a problem with my code, or with one of the libraries I am using. The only console output I receive is as follows :
Bot Ready For Use
joined channel
left channelThanks !
My Code
var voiceChannel = message.member.voiceChannel;
if (!message.member.voiceChannel) return message.channel.send(`You do realize you have to be in a voice channel to do that, right ${message.author.username}?`)
if (!message.member.voiceConnection) voiceChannel.join().then(async connection => {
let streamURL = args.slice(1).join(" ")
let streamTitle = "";
let streamThumb = "";
let streamAuth = "";
let streamAuthThumb = "";
if (streamURL.includes("https://www.youtube.com") || streamURL.includes("https://youtu.be/") && !streamURL.includes(' ')) {
let results = await youtube.getVideo(streamURL)
let {
body
} = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results.channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
limit: 800
})
streamTitle = results.title
streamThumb = results.thumbnails.medium.url
streamAuth = results.channel.title
streamAuthThumb = body.items[0].snippet.thumbnails.medium.url
} else if (!streamURL.includes("https://www.youtube.com") || !streamURL.includes("https://youtu.be/")) {
let results = await youtube.searchVideos(streamURL)
let {
body
} = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results[0].channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
limit: 800
})
streamURL = results[0].url
streamTitle = results[0].title
streamThumb = results[0].thumbnails.medium.url
streamAuth = results[0].channel.title
streamAuthThumb = body.items[0].snippet.thumbnails.medium.url
} else {
return message.reply("I can only play videos from YouTube (#NotSponsored).")
}
console.log("joined channel");
const stream = ytdl('https://www.youtube.com/watch?v=gOMhN-hfMtY', {
filter: 'audioonly'
});
const dispatcher = connection.playStream(stream, {
seek: 0,
volume: 1
});
dispatcher.on("end", end => {
console.log("left channel");
voiceChannel.leave();
});
let musicEmbed = new Discord.RichEmbed()
.setAuthor(streamAuth, streamAuthThumb)
.setTitle(`Now Playing:`)
.addField(`${streamAuth}`, `${streamTitle}`)
.setImage(streamThumb)
.setColor(embedRed)
.setFooter(`${streamAuth} - ${streamTitle} (${streamURL}`)
message.channel.send(musicEmbed)
}).catch(console.error);
breakList of Modules
discord.js
simple-youtube-api
node-opus
ffmpeg
ffbinaries
ffmpeg-binaries
opusscript
snekfetch
node-fetch
ytdl-coreClick here to use my sample bot through repl.it.
Thanks Again !
-
ffmpeg (IMAGE THUMBNAIL 1 frame) how to "choose" compression quality when we use -vframes 1 (how to do like convert -quality 60....)
25 juillet 2021, par jini• PRE-CONTEXT : with ImageMagick, I'm use to do
convert -quality 60 1.jpg 1.webp
here "quality 60" affect the final size of the output

• CONTEXT : create a poster.webp OR poster.jpg of a movie.mp4


• QUESTION : how can we "achieve" the same compression level choice with ffmpeg when we want 1 frame


• WHAT I TRIED [1] :


ffmpeg -i movie.mp4 -vframes 1 -qmin 0 -qmax 1 0.webp


and
ffmpeg -i movie.mp4 -vframes 1 -qmin 50 -qmax 51 50.webp


==>> both gives the exact same size for the output.


• WHAT I TRIED [2] :


ffmpeg -i movie.mp4 -vframes 1 -b:v 9k bv9k.webp


and
ffmpeg -i movie.mp4 -vframes 1 -b:v 1k bv1k.webp


==>> both gives the exact same size for the output.


what I'm I missing or miss using here ?


Thanks


-
aarch64 : vp9 : loop_filter : fix typo in skip flatout8 check
14 novembre 2016, par Janne Grunau