
Advanced search
Other articles (93)
-
L’utiliser, en parler, le critiquer
10 April 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 February 2011, byLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
Les autorisations surchargées par les plugins
27 April 2010, byMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
On other websites (10559)
-
Convert mp3 to AAC with mpeg-2 container (FFMPEG)
18 March 2016, by jsurfI’m trying to convert an mp3 audio file to an AAC file with FFMPEG, and I need the audio to be wrapped in an MPEG-2 container.
The resulting AAC file needs to be AAC-LC (Low Complexity), 1-channel, CBR mode, 44100 sample rate, and 48kb/s bitrate, so I use this command:ffmpeg -y -i input.mp3 -ar 44100 -ab 48k -acodec libfdk_aac -ac 1 output.aac
But when I examine the ADTS headers, the audio file is always being wrapped in an MPEG-4 container. I have tried all the codecs listed here but I still end up with an mpeg-4 container wrapped around the audio: http://trac.ffmpeg.org/wiki/AACEncodingGuide.
Here are the headers I get when examining the AAC output file:
mpeg_type: ’MPEG4’,
profile: 2,
profile_name: ’AAC LC’,
sample_freq: 44100,
channel_config: 1,
channels: 1,
frame_length: 139,
buffer_fullness: 157,
number_of_frames: 1,
frames_per_sec: 43.06640625Any ideas as to why ffmpeg wraps an mp4 container around the audio? Can I get around this somehow? Are there any other encoders I can try aside from FFMPEG? I was giving FAAC encoder a shot and it gives me the proper encoding and ADTS headers, but alas it does not support mp3, only WAV.
-
fftools/ffmpeg_mux_init: change 1-bit bitfields from int to unsigned
14 December 2023, by Anton Khirnovfftools/ffmpeg_mux_init: change 1-bit bitfields from int to unsigned
They cannot store 1 as signed, only 0 and -1.
Avoids warnings such as:
implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] -
How can I merge discord voice streams?
3 March 2023, by LeGlaudeI'd like to merge the voice of users that I receive using the discordjs/voice library. The number of streams to merge has to be flexible. Also, The output stream has to be readable so I can use it as a source.


I tried different libraries like fluent-ffmpeg, ffmpeg and merge-stream. My discord bot didn't crash when I was using fluent-ffmpeg to merge n streams but no sound was streamed. Sadly, I don't have my previous code when I used fluent-ffmpeg. I have my code that uses merge-stream. The problem with merge-stream is that when I try to merge streams it says "TypeError: source.once is not a function". Here is my code :


async function CreateStream(server_id) {
 let users = client.channels.cache.get(GetVoiceChannel(server_id)).members.map(user => user.id)
 if (users.indexOf(bot_id) != -1) {
 users.splice(users.indexOf(bot_id), bot_id)
 };

 console.log(users)

 const connection1 = getVoiceConnection(server_id)
 const connection2 = getVoiceConnection(GetCall(server_id))

 const streams = []

 for (const user in users) {
 const sub = connection1.receiver.subscribe(user, { end: EndBehaviorType.Manual })
 streams.push(sub)
 }

 const theStream = merge()

 for (const stream in streams) {
 theStream.add(stream)
 }

 const resource = createAudioResource(theStream, {inputType: StreamType.Opus})
 const player = createAudioPlayer()

 connection2.subscribe(player);
 player.play(resource);
 
}



EDIT :


Now this is my code :



async function CreateStream(server_id) {
 let users = client.channels.cache.get(GetVoiceChannel(server_id)).members.map(user => user.id)
 if (users.indexOf(bot_id) != -1) {
 users.splice(users.indexOf(bot_id), bot_id)
 };

 const connection1 = getVoiceConnection(server_id)
 const connection2 = getVoiceConnection(GetCall(server_id))

 let merge_param = []

 for (const user in users) {
 const sub = connection1.receiver.subscribe(user, { end: EndBehaviorType.Manual })
 merge_param.push('-i')
 merge_param.push(sub)
 }

 merge_param.push('-','-sample_fmt', 's16', '-ar', '48000','-ac', 2, '-acodec', 'libopus','-b:a', '192k', '-vbr', 'on', '-compression_level', '10', '-f', 'opus', 'pipe:1')

 const ffmpeg = cp.spawn('ffmpeg', merge_param);

 const resource = createAudioResource(ffmpeg.stdout, {inputType: StreamType.Opus})
 const player = createAudioPlayer()

 connection2.subscribe(player);
 player.play(resource);
 
}




I don't have an error anymore but no sound is coming out from the bot.