
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (25)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (6099)
-
Why is my DSharpPlus Slash Command not playing my desired sound using FFMPEG in C# ?
19 mai 2023, par IngeniousThoughtsI'm having a problem with my ffmpeg setup the commands work fine but my play command doesn't play my desired sound.


//The command.
 [SlashCommand("play", "plays a sound in a voice channel.")]
 public async Task HowlCommand(InteractionContext ctx, [Choice("ChoiceName", "C:\\My\\Program\\Directory\\Name\\MySound.mp3")]
 [Option("Sound", "Please select a Sound")] string filepath)
 {
 //Creates a slash command used response.
 //Also removes the error message.
 await ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new DiscordInteractionResponseBuilder()
 .WithContent("Playing sound in voice channel. Please wait just a moment!"));
 
 //Checks if the user is not a bot to send the message.
 if (ctx.Member.IsBot)
 {
 return;
 }
 else
 {
 if(filepath != "C:\\My\\Program\\Directory\\Name\\MySound.mp3")
 {
 var embedmessage = new DiscordMessageBuilder()
 .AddEmbed(new DiscordEmbedBuilder()
 
 .WithAuthor("BotName", null, ctx.Client.CurrentApplication.Icon)
 .WithTitle("Please select the following sound to play:")
 .WithImageUrl(ctx.Client.CurrentApplication.Icon)
 .WithFooter("VoiceChannel Error.", "ImageURL.png")
 .WithTimestamp(DateTime.Now)
 .Build()
 
 );
 
 //Makes the command wait 5 seconds before sending the rest of the command data.
 await Task.Delay(TimeSpan.FromSeconds(5));
 
 //Sends the embed in a message.
 await ctx.Channel.SendMessageAsync(embedmessage);
 }
 else
 {
 //Makes the command wait 5 seconds before sending the rest of the command data.
 await Task.Delay(TimeSpan.FromSeconds(5));
 
 
 var vnext = ctx.Client.GetVoiceNext();
 var vnc = vnext.GetConnection(ctx.Guild);
 
 //if null throws exception.
 if (vnc == null)
 throw new System.InvalidOperationException("Not connected in this guild.");
 
 
 //Gets the mp3 file to use.
 var ffmpeg = Process.Start(new ProcessStartInfo
 {
 FileName = "ffmpeg",
 Arguments = $@"-i ""{filepath}"" -ac 2 -f s16le -ar 48000 pipe:1",
 RedirectStandardOutput = true,
 UseShellExecute = false
 });
 Stream pcm = ffmpeg.StandardOutput.BaseStream;
 
 VoiceTransmitSink transmit = vnc.GetTransmitSink();
 await pcm.CopyToAsync(transmit);
 vnc.GetTransmitSink().VolumeModifier = 5;
 
 //Makes the command wait 10 seconds before sending the rest of the command data.
 await Task.Delay(TimeSpan.FromSeconds(10));
 
 //Disconnects the bot from the voice channel.
 vnc.Disconnect();
 }
 }
 }



//The command.
 [SlashCommand("join", "Joins a voice channel.")]
 public async Task JoinChannel(InteractionContext ctx, [Choice("MyVoiceChannel", "VoiceChannelName")]
 [Option("VoiceChannel", "Please choose a Voice Channel.")] DiscordChannel channel)
 {
 //Creates a slash command used response.
 //Also removes the error message.
 await ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new DiscordInteractionResponseBuilder()
 .WithContent("Joining voice channel. Please wait just a moment!"));
 
 //Checks if the user is not a bot to send the message.
 if (ctx.Member.IsBot)
 {
 return;
 }
 else
 {
 if (channel.Name != "MyVoiceChannelName")
 {
 var embedmessage = new DiscordMessageBuilder()
 .AddEmbed(new DiscordEmbedBuilder()
 
 .WithAuthor("BotName", null, ctx.Client.CurrentApplication.Icon)
 .WithTitle("Please Create The Following Voice Channel:")
 .WithImageUrl(ctx.Client.CurrentApplication.Icon)
 .AddField("VoiceChannel:", "**BotName**" + Environment.NewLine + "Is Case Sensitive: **Yes**")
 .WithFooter("VoiceChannel Error.", "ImageURL.png")
 .WithTimestamp(DateTime.Now)
 .Build()
 
 );
 
 //Makes the command wait 5 seconds before sending the rest of the command data.
 await Task.Delay(TimeSpan.FromSeconds(5));
 
 //Sends the embed in a message.
 await ctx.Channel.SendMessageAsync(embedmessage);
 }
 else
 {
 //Makes the command wait 5 seconds before sending the rest of the command data.
 await Task.Delay(TimeSpan.FromSeconds(5));
 
 
 channel = ctx.Member.VoiceState?.Channel;
 await channel.ConnectAsync();
 
 }
 }
 }
 
 }
}



public sealed class Program
 {
 public static DiscordClient Client { get; private set; }
 public static InteractivityExtension Interactivity { get; private set; }
 public static CommandsNextExtension Commands { get; private set; }
 public static VoiceNextExtension VoiceNext { get; private set; }
 
 
 static async Task Main(string[] args)
 {
 
 //Main Window configs specifying the title name and color.
 Console.BackgroundColor = ConsoleColor.Black;
 Console.ForegroundColor = ConsoleColor.Magenta;
 Console.Title = "BotName";
 
 //1. Get the details of your config.json file by deserialising it
 var configJsonFile = new JSONReader();
 await configJsonFile.ReadJSON();
 
 //2. Setting up the Bot Configuration
 var discordConfig = new DiscordConfiguration()
 {
 Intents = DiscordIntents.All,
 Token = configJsonFile.token,
 TokenType = TokenType.Bot,
 AutoReconnect = true
 };
 
 //3. Apply this config to our DiscordClient
 Client = new DiscordClient(discordConfig);
 
 //4. Set the default timeout for Commands that use interactivity
 Client.UseInteractivity(new InteractivityConfiguration()
 {
 Timeout = TimeSpan.FromMinutes(2)
 });
 
 //5. Set up the Task Handler Ready event
 Client.Ready += OnClientReady;
 
 //6. Set up the Commands Configuration
 var commandsConfig = new CommandsNextConfiguration()
 {
 StringPrefixes = new string[] { configJsonFile.prefix },
 EnableMentionPrefix = true,
 EnableDms = true,
 EnableDefaultHelp = false,
 };
 
 Commands = Client.UseCommandsNext(commandsConfig);
 
 //7. Register your commands
 var slashCommandsConfig = Client.UseSlashCommands();
 slashCommandsConfig.RegisterCommands<mysoundscommand>(MyGuildID);
 
 //8. Allows usage of voice channels.
 var VoiceNext = Client.UseVoiceNext();
 
 //9. Connect to get the Bot online
 await Client.ConnectAsync();
 await Task.Delay(-1);
 }
 
 private static Task OnClientReady(DiscordClient sender, ReadyEventArgs e)
 {
 return Task.CompletedTask;
 }
 }
</mysoundscommand>


SourceCode Link :




playing the playsound slash command but wasn't expecting it to not play the mp3 file.


everything else worked fine except when it transmits the sound it doesn't play it.


-
Increase the sound of the first input in certain moments
22 mars 2023, par Ali AzmoodehI have a code that has two inputs. The first entry is played with a 2 second delay. The second entry is played with a 1 second delay. These entries are repeated as the video progresses. The volume of the two inputs sometimes overlaps


when this happens I want the volume of the first input to be 1 and the volume of the input The latter should be set to 0.3


-
how can i record sound with ffmpeg with electron ?
10 février 2023, par korayaggulI'm trying to record sound with electron using ffmpeg but I've never done it before, how can I do it ?


need to run this code


ffmpeg -loglevel debug -f avfoundation -i none:1 -f avfoundation -i none:2 -filter_complex amix=inputs=2:duration=first:dropout_transition=3 out.mk