Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (77)

  • Supporting all media types

    13 avril 2011, par

    Unlike 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 (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (9797)

  • ffmpeg - add music to an audiobook, and loop the music [closed]

    23 novembre 2024, par Rhys

    I found these example, and they all work. But I cannot overlay 2 audios and loop the shortest audio until the longest audio is finished.

    


    Audio to match Video Length

    


    ffmpeg -i VIDEO1.mp4 -stream_loop -1 -i bgmusic.mp3 -shortest -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4


    


    Loop Audio

    


    ffmpeg -i audio.mp3 -filter_complex "aloop=loop=-1:size=10" output_loop.mp3


    


    Overlay 2 Audios

    


    ffmpeg -y -i bgmusic.mp3 -i audio.mp3 -filter_complex "[0:0]volume=1.0[a];[1:0]volume=1.0[b];[a][b]amix=inputs=2:duration=longest" -c:a libmp3lame output.mp3


    


    Here is my attempt.

    


    ffmpeg -y -i audio.mp3 -stream_loop -1 -i bgmusic.mp3 -shortest -filter_complex "[0:0]volume=1.0[a];[1:0]volume=1.0[b];[a][b]amix=inputs=2:duration=longest" -c:a libmp3lame output.mp3


    


    But this example is looping bgmusic.mp3 forever ... and audio.mp3 is stopping after the song finishes

    


    how can I get to audios to play togeather, but the shortest audio loops until the longest audio is finished ?

    


  • I need my music bot to play on multiple servers at the same time

    12 mars 2024, par Ondosh

    I'm writing my music bot in Python and I want it to be able to play music on multiple servers at once. Now the attempt to play on several servers looks like this : I start music on the first server, go to the second and start other music there, but the one that was requested on the first one is playing.
Know my code is :

    


    from nextcord.ext import commands
import nextcord, random
import yt_dlp
import datetime
import lazy_queue as lq

FFMPEG_OPTIONS = {
    "before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5",
    'options': '-vn'}

YDL_OPTIONS = {
    'format': 'bestaudio/best',
    'extractaudio': True,
    'noplaylist': True,
    'keepvideo': False,
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '320'
    }]
}

bot.remove_command("help")
songs_queue = lq.Queue()
loop_flag = False

@bot.command()
async def add(ctx, *url):
    url = ' '.join(url)
    with yt_dlp.YoutubeDL(YDL_OPTIONS) as ydl:
        try:
            info = ydl.extract_info(url, download=False)
        except:
            info = ydl.extract_info(f"ytsearch:{url}",
                                    download=False)['entries'][0]
    URL = info['url']
    name = info['title']
    time = str(datetime.timedelta(seconds=info['duration']))
    songs_queue.q_add([name, time, URL])
    embed = nextcord.Embed(description=f'Записываю [{name}]({url}) в очередь 📝',
                           colour=nextcord.Colour.red())
    await ctx.message.reply(embed=embed)


def step_and_remove(voice_client):
    if loop_flag:
        songs_queue.q_add(songs_queue.get_value()[0])
    songs_queue.q_remove()
    audio_player_task(voice_client)


def audio_player_task(voice_client):
    if not voice_client.is_playing() and songs_queue.get_value():
        voice_client.play(nextcord.FFmpegPCMAudio(
            executable="ffmpeg\\bin\\ffmpeg.exe",
            source=songs_queue.get_value()[0][2],
            **FFMPEG_OPTIONS),
            after=lambda e: step_and_remove(voice_client))


@bot.command()
async def play(ctx, *url):
    await join(ctx)
    await add(ctx, ' '.join(url))
    await ctx.message.add_reaction(emoji='🎸')
    voice_client = ctx.guild.voice_client
    audio_player_task(voice_client)
async def queue(ctx):
    if len(songs_queue.get_value()) > 0:
        only_names_and_time_queue = []
        for i in songs_queue.get_value():
            name = i[0]
            if len(i[0]) > 30:
                name = i[0][:30] + '...'
            only_names_and_time_queue.append(f'📀 `{name:<33}   {i[1]:>20}`\n')
        c = 0
        queue_of_queues = []
        while c < len(only_names_and_time_queue):
            queue_of_queues.append(only_names_and_time_queue[c:c + 10])
            c += 10
        embed = nextcord.Embed(title=f'ОЧЕРЕДЬ [LOOP: {loop_flag}]',
                               description=''.join(queue_of_queues[0]),
                               colour=nextcord.Colour.red())
        await ctx.send(embed=embed)
        for i in range(1, len(queue_of_queues)):
            embed = nextcord.Embed(description=''.join(queue_of_queues[i]),
                                   colour=nextcord.Colour.red())
            await ctx.send(embed=embed)
    else:
        await ctx.send('Очередь пуста')


    


    As far as I understand, I need to create variables that will be associated with the server ID, but I do not know how to do this.

    


  • FFmpeg - ducking music for voiceover (sidechain)

    7 décembre 2023, par kaushal

    I am trying to duck the background music from a voiceover input file using FFmpeg (I tried doing this using pydub with no success).

    


    The below command is predominantly working, except that it is truncating my background music file (main.mp3, over 3 min long) to the length of the voiceover file (taekwondo.mp3, about a min long). Any idea or suggestion on what can I change in below command so that the output file is full 3 min long, with background music ducked when the voiceover is playing. Once the voiceover completes, background music continues to play as normal.

    


    In below complex filter, this is what I'm doing :
adelay filter : to start voiceover playing after 5 seconds into background music
volume filter : Since my background music is too loud and voiceover is too low, I'm increasing voiceover volume by 1.5 times, and lowering background music volume to 0.7 times
sidechaincompress filter : Then I'm applying sidechain filter to duck background music whenever voiceover is playing, with usual threshold, ratio & release filters

    


    I've tried both amix & amerge, but results in same behaviour.

    


    ffmpeg -i main.mp3 -i taekwondo.mp3 -filter_complex "[1:a]adelay=5000|5000,volume=1.5[a];[0:a]volume=0.7[b];[a]asplit=2[sc][mix];[b][sc]sidechaincompress=threshold=0.05:ratio=20:level_sc=1:release=500:attack=1[compr];[compr][mix]amix" output.mp3