
Advanced search
Other articles (64)
-
Other interesting software
13 April 2011, byWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website: http://videopress.com/
License: GNU/GPL v2
Source code: (...) -
Des sites réalisés avec MediaSPIP
2 May 2011, byCette 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. -
Taille des images et des logos définissables
9 February 2011, byDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
On other websites (4358)
-
Discord.js v14: AudioPlayer isn't working
6 September 2023, by colonelPanicI'm new to javascript in general, and I'm making a Discord bot that can join a voice channel and play some audio. When I run the slash command that I set up, I get no errors and a reply that suggests that everything is running correctly, but no audio is playing. I've looked at the documentation for the audio player and some examples of how to do this on youtube, but I can't find any hints as to why there's no audio.


The command that I'm using to handle the audio player is shown below:


// These are the contents of the 'play.js' file where I'm defining and exporting the slash command 

const { SlashCommandBuilder } = require('discord.js');
const { createAudioPlayer, 
 NoSubscriberBehavior, 
 AudioPlayerStatus,
 getVoiceConnection,
 createAudioResource,
 joinVoiceChannel
 } = require('@discordjs/voice');

module.exports = {
 data: new SlashCommandBuilder()
 .setName('play')
 .setDescription('Plays a song/sound in the voice channel you are in.')
 .addStringOption((option) => 
 option
 .setName('sound')
 .setDescription('The sound/song to play.')
 .setRequired(true)
 .addChoices(
 {name: 'spiderman-pizza', value: 'https://www.youtube.com/watch?v=czTksCF6X8Y'},
 {name: 'royaltyfree-1', value: 'C:/resources/sounds/royaltyfree-1.mp3'}
 )
 ),
 async execute(interaction) {
 // Create the audio player
 const audioPlayer = createAudioPlayer({
 behaviors: {
 noSubscriber: NoSubscriberBehavior.Pause,
 },
 });
 // Get the existing voice connection
 var connection = getVoiceConnection(interaction.guild.id);
 // If there is no existing connection, create one
 if (!connection) {
 connection = joinVoiceChannel({
 channelId: interaction.member.voice.channel.id,
 guildId: interaction.guild.id,
 adapterCreator: interaction.guild.voiceAdapterCreator
 });
 }
 // Get the chosen audio resource and play it in the voice channel
 const resource = createAudioResource(interaction.options.getString('sound'));
 audioPlayer.play(resource);
 connection.subscribe(audioPlayer);

 interaction.reply({content: `Playing ${interaction.options.getString('sound')}`, ephemeral: true});
 }
}



I don't get any errors when I execute this command with either of the available choices, but the audio player doesn't play anything. On the Discord server, I've given the bot all permissions except for Administrator, and the intents that I've specified in the code can be seen below:


const { 
 Client, 
 Collection, 
 Events, 
 GatewayIntentBits,
 } = require('discord.js');

// Create a new client instance
const client = new Client({ 
 intents: [
 GatewayIntentBits.Guilds,
 GatewayIntentBits.MessageContent,
 GatewayIntentBits.GuildMessages,
 GatewayIntentBits.GuildMembers,
 GatewayIntentBits.GuildVoiceStates
 ] 
 }
 );



I know that the '/play' command is registered and that the bot can join the user's voice channel when '/play' is executed. I've installed 'libsodium-wrappers' (encryption package), 'ffmpeg-static', and '@discordjs/voice' using npm so I don't think there should be any dependency issues. Does anyone have an idea of why the audio isn't playing?


-
Analytics for the Internet of Things: collecting all your things’ data with Piwik to stay in control?
25 November 2015, by Matthieu Aubry — AboutAt Piwik our mission is to create the leading free and open source analytics platform, and supporting global organisations and communities to keep full control over their data.
Our broad mission started 8 years ago and we focused at first helping people to liberate their website analytics data, then liberate their mobile app analytics data. But it is clear that there is much more than Web + Mobile: data is everywhere and a lot more data is being generated by software, people and their activities, robots, sensors…
I’d like to share an interesting article which highlights one of the growing trends of technology: the rise of the Internet Of Things: 6 Ways Analytics And The Internet Of Things Will Transform Business.
Here is an extract:
The tech industry is no stranger to change, but the data derived from the IoT is taking disruption to a new level.
At IBM’s Insight conference last month, Bob Picciano, senior vice president of IBM Analytics, talked about the rise of the “cognitive business”, or an enterprise that engages with analytics to improve its customer relations, business processes, and decision-making capabilities.
There are dueling predictions over how ubiquitous the Internet of Things will be, but most indicate that the marketplace will host between 50 and 75 billion connected objects by 2020, signaling novel challenges for hardware manufacturing and development. Software engineers, likewise, may need to completely revamp programs to better exploit the influx of data, while innovators need to wrestle with the changes wrought by analytics.
IBM’s Insight event unfolded in light of this wave of disruption. The lineup of corporate presenters converged on the same message: Analytics is for everyone, and your viability in the marketplace depends on it.
[…]
IBM’s Insight 2015 conference sounded off on the most important trends in data usage and management. It also served a wake-up call for developers, engineers, and tech leaders. As the Internet of Things alters the landscape of analytics, hardware design needs to change, software development requires novel approaches, and tech management must become more agile in order to realize data’s greatest benefits.
So far there are 1 million websites using Piwik… but what if there could be 10 or 50 million things (sensors, devices) being measured by Piwik?
Together we will be creating the best open source and generic analytics platform, that is engineered to last, and designed to help humanity keep control and gain Freedom.
We aim for Piwik to be the ideal platform to measure the Internet Of Things.
We’re still at the beginning of this journey and it will take the best of all of us to get there.
See you on the way!
PS: if you’d like to get involved with Piwik, we would be glad to welcome you!
-
VP8 And FFmpeg
18 June 2010, by Multimedia Mike — VP8UPDATE, 2010-06-17: You don’t need to struggle through these instructions anymore. libvpx 0.9.1 and FFmpeg 0.6 work together much better. Please see this post for simple instructions on getting up and running quickly.
Let’s take the VP8 source code (in Google’s new libvpx library) for a spin; get it to compile and hook it up to FFmpeg. I am hesitant to publish specific instructions for building in the somewhat hackish manner available on day 1 (download FFmpeg at a certain revision and apply a patch) since that kind of post has a tendency to rise in Google rankings. I will just need to remember to update this post after the library patches are applied to the official FFmpeg tree.
Statement of libvpx’s Relationship to FFmpeg
I don’t necessarily speak officially for FFmpeg. But I’ve been with the project long enough to explain how certain things work.Certainly, some may wonder if FFmpeg will incorporate Google’s newly open sourced libvpx library into FFmpeg. In the near term, FFmpeg will support encoding and decoding VP8 via external library as it does with a number of other libraries (most popularly, libx264). FFmpeg will not adopt the code for its own codebase, even if the license may allow it. That just isn’t how the FFmpeg crew rolls.
In the longer term, expect the FFmpeg project to develop an independent, interoperable implementation of the VP8 decoder. Sometime after that, there may also be an independent VP8 encoder as well.
Building libvpx
Download and build libvpx. This is a basic ’configure && make’ process. The build process creates a static library, a bunch of header files, and 14 utilities. A bunch of these utilities operate on a file format called IVF which is apparently a simple transport method for VP8. I have recorded the file format on the wiki.We could use a decoder for this in the FFmpeg code base for testing VP8 in the future.
Who’s game?Just as I was proofreading this post, I saw that David Conrad has sent an IVF demuxer to the ffmpeg-devel list.There doesn’t seem to be a ’make install’ step for the library. Instead, go into the overly long directory (on my system, this is generated as vpx-vp8-nopost-nodocs-generic-gnu-v0.9.0), copy the contents of include/ to /usr/local/include and the static library in lib/ to /usr/local/lib .
Building FFmpeg with libvpx
Download FFmpeg source code at the revision specified or take your chances with the latest version (as I did). Download and apply provided patches. This part hurts since there is one diff per file. Most of them applied for me.Configure FFmpeg with
'configure --enable-libvpx_vp8 --enable-pthreads'
. Ideally, this should yield no complaints and ’libvpx_vp8’ should show up in the enabled decoders and encoders sections. The library apparently relies on threading which is why'--enable-pthreads'
is necessary. After I did this, I was able to create a new webm/VP8/Vorbis file simply with:ffmpeg -i input_file output_file.webm
Unfortunately, I can’t complete the round trip as decoding doesn’t seem to work. Passing the generated .webm file back into FFmpeg results in a bunch of errors of this format:
[libvpx_vp8 @ 0x8c4ab20]v0.9.0 [libvpx_vp8 @ 0x8c4ab20]Failed to initialize decoder: Codec does not implement requested capability
Maybe this is the FFmpeg revision mismatch biting me.
FFmpeg Presets
FFmpeg features support for preset files which contain collections of tuning options to be loaded into the program. Google provided some presets along with their FFmpeg patches:- 1080p50
- 1080p
- 360p
- 720p50
- 720p
To invoke one of these (assuming the program has been installed via ’make install’ so that the presets are in the right place):
ffmpeg -i input_file -vcodec libvpx_vp8 -vpre 720p output_file.webm
This will use a set of parameters that are known to do well when encoding a 720p video.
Code Paths
One of goals with this post was to visualize a call graph after I got the decoder hooked up to FFmpeg. Fortunately, this recon is greatly simplified by libvpx’s simple_decoder utility. Steps:- Build libvpx with
--enable-gprof
- Run simple_decoder on an IVF file
- Get the pl_from_gprof.pl and dot_from_pl.pl scripts frome Graphviz’s gprof filters
- gprof simple_decoder | ./pl_from_gprof.pl | ./dot_from_pl.pl > 001.dot
- Remove the 2 [graph] and 1 [node] modifiers from the dot file (they only make the resulting graph very hard to read)
- dot -Tpng 001.dot > 001.png
Here are call graphs generated from decoding test vectors 001 and 017.
It’s funny to see several functions calling an empty bubble. Probably nothing to worry about. More interesting is the fact that a lot of function_c() functions are called. The ’_c’ at the end is important— that generally indicates that there are (or could be) SIMD-optimized versions. I know this codebase has plenty of assembly. All of the x86 ASM files appear to be written such that they could be compiled with NASM.
Leftovers
One interesting item in the code was vpx_scale/leapster. Is this in reference to the Leapster handheld educational gaming unit? Based on this item from 2005 (archive.org copy), some Leapster titles probably used VP6. This reminds me of finding references to the PlayStation in Duck/On2’s original VpVision source release. I don’t know of any PlayStation games that used Duck’s original codecs but with thousands to choose from, it’s possible that we may find a few some day.