Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (63)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

Sur d’autres sites (6750)

  • I have a audio in 128kbps that was read 16KB every second, but it seems that I am getting more than 1 seconds of the music each time. Why ?

    23 décembre 2022, par Hexona

    So I have a new stream to which I will push 2048 bytes of audio buffer every 128ms (i.e. 16KB every second) but I seem to have more than 1 second of data pushed to the stream. (I think so by finding ffmpeg is still streaming sound even tens of seconds after I stop pushing data in it)

    


    When I changed it to 1024 bytes/128ms (8KB/s), the sound stop right after I stop pushing data.

    


    Please correct me if I do anything wrong !

    


    Some background story

    


    I am using ffmpeg to stream to a rtp server. It is one-time used, so I can't stop ffmpeg and start again. I don't want to use the ZeroMQ way because of latency. The target I am trying to archive is to have the same readable stream to ffmpeg and change the audio content on the go by stop pushing chunks of previous audio file and switch to the new one.

    


    If you know some other ways to archive the goal, I would be very pleased to know. Thank you in advance !

    


    My current code

    


    const stream = new Stream.Readable();

// ...
// (send stream to ffmpeg)
// ...

fileP = fs.createReadStream(input);
fileP.on('readable', async () => {
    var chunk;
    while (previousStream && (chunk = fileP?.read(16 * 128))) {
        if (!previousStream) break;
        stream.push(chunk);
        await delay(125);
    }
});


    


  • How do I add a queue to my music bot using Discrod.py FFmpeg and youtube_dl ?

    28 septembre 2022, par Виктор Лисичкин

    I'm writing my bot for discord, I can't figure out how to track the end of a song to lose the next one. I sort of figured out the piece of music, but I don't fully understand what to do next. Here is my code for main.py

    


    from discord.ext import commands, tasks
from config import settings
from music_cog import music_cog
bot = commands.Bot(command_prefix='!',intents = discord.Intents.all())

@bot.event
async def on_ready():
    print(f'We have logged in as {bot.user}')
    await bot.add_cog(music_cog(bot))

bot.run(settings['token'])


    


    and And this is for cog with music

    


    from discord.ext import commands
from youtube_dl import YoutubeDL
YDL_OPTIONS = {'format': 'worstaudio/best', 'noplaylist': 'False', 'simulate': 'True',
               'preferredquality': '192', 'preferredcodec': 'mp3', 'key': 'FFmpegExtractAudio'}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
queue = []
class music_cog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
    @commands.command(pass_context=True)
    async def play(self,ctx, *, arg):
        global queue
        queue.append(arg)
        def playing():
            for song in queue:
                with YoutubeDL(YDL_OPTIONS) as ydl:
                    if 'https://' in song:
                        info = ydl.extract_info(song, download=False)
                    else:
                        info = ydl.extract_info(f"ytsearch:{song}", download=False)['entries'][0]

                    url = info['formats'][0]['url']
                    queue.pop(0)
                    vc.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=url, **FFMPEG_OPTIONS))
        voice_client = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
        if not ctx.message.author.voice:
            await ctx.send("You are not connected to voice chanel")
        elif voice_client:
            queue.append(arg)
        else:
            vc = await ctx.message.author.voice.channel.connect()
            playing()
    @commands.command(pass_context = True)
    async def disconect(self, ctx):
        server = ctx.message.guild.voice_client
        if ctx.message.guild.voice_client:
            await server.disconnect()
        else:
            await ctx.send("I am not connected")

    @commands.command(pass_context=True)
    async def stop(self, ctx):
        server = ctx.message.guild
        voice_channel = server.voice_client
        voice_channel.pause()

    @commands.command(pass_context=True)
    async def resumue(self, ctx):
        server = ctx.message.guild
        voice_channel = server.voice_client
        voice_channel.resume()


    


  • How to change or modify pitch of audio file (music etc like .mp3 file)using FFMPEG ?

    18 octobre 2022, par syed kashifullah

    I want to change and modify pitch an .mp3 audio file using FFMPEG.
But I am unable to use FFMPEG to change or modify pitch of that sound.
what command (exact command) should be exactly use for changing pitch of an audio file ?

    


     String outPutPath = new File("/storage/emulated/0/Share it Application/Over_the_HorizonTemp.wav").getPath();
                 
                String[] strFfmpeg  = {"ffmpeg","-i" ,strInputPath,"-af", "rubberband=tempo=1.0:pitch=1.5:pitchq=quality" ,outPutPath};
                execffmpegBinary(strFfmpeg);


    


    execffmpegBinary Function :

    


    public void execffmpegBinary(String[] command) {
    Config.enableLogCallback(new LogCallback() {
        @Override
        public void apply(LogMessage message) {
            Log.e(Config.TAG, message.getText());
            Log.e("TAG", "apply: " +message.getText());
        }
    });
    Config.enableStatisticsCallback(new StatisticsCallback() {
        @Override
        public void apply(Statistics statistics) {

        }
    });

    long executionId = FFmpeg.executeAsync(command, new ExecuteCallback() {
        @Override
        public void apply(long executionId, int returnCode) {
            if (returnCode == RETURN_CODE_SUCCESS) {
                
                Log.e("1TAG", "apply:return code "+returnCode );
                Log.e("1TAG", "apply:execution Id "+executionId );
                Log.e("1TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));


            } else if (returnCode == RETURN_CODE_CANCEL) {
                Log.e("2TAG", "apply:return code "+returnCode );
                Log.e("2TAG", "apply:execution Id "+executionId );
                Log.e("2TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));

            } else {
                Log.e("3TAG", "apply: returnCode"+ returnCode);
                Log.e("3TAG", "apply:return code "+returnCode );
                Log.e("3TAG", "apply:execution Id "+executionId );
                Log.e("3TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));

            }
        }
    });
}