Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (15)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6862)

  • Music bot returning errors at core.py and bot.py

    13 septembre 2021, par Loganox

    The code for the music bot I'm trying to write in python keeps returning an error with the following code :

    


    @bot.command(name='play_song', help='To play song')
async def play(ctx,url):
    
    #if not ctx.message.author.name=="Rohan Krishna" :
    #     await ctx.send('NOT AUTHORISED!')
    #     return
    if 1==1:#try :
        server = ctx.message.guild
        voice_channel = server.voice_client
        print("try 1 was a success")
        
        async with ctx.typing():
            filename = await YTDLSource.from_url(url, loop=bot.loop)
            #voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename)) #ISSUE HERE
            print("try 2 was a success")
            voice = get(ctx.bot.voice_clients, guild=ctx.guild)
    
            #voice.play(discord.FFmpegPCMAudio('test.mp3'), after=your_check)
            #voice.source = discord.PCMVolumeTransformer(voice.source)
            #voice.source.volume = 0.5
        await ctx.send('**Now playing:** {}'.format(filename))
    if 1==0:#except:
        await ctx.send("The bot is not connected to a voice channel.")
        print("try 3 was unfortunately a success")


    


    It normally has a try/except function but I replaced it with if true and false statements to force it to run instead of breaking to determine the exact line of it breaking. The issue supposedly lies in

    


    voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=filename)) #ISSUE HERE


    


    The error I get returned is :

    


    Traceback (most recent call last):
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "app2.py", line 75, in play
    voice.play(discord.FFmpegPCMAudio('test.mp3'), after=your_check)
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 225, in __init__
    super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 138, in __init__
    self._process = self._spawn_process(args, **kwargs)
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\player.py", line 147, in _spawn_process
    raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\heyin\anaconda3\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found.


    


    I added the print statements to determine which lines were working so those can obviously be ignored. It seems to be working fine except for this, other commands in the bot are working appropriately.

    


  • Fix TS File Audio Sync Issue Using FFMPEG

    23 juillet 2021, par Steve Brown

    I have a few .ts files which I've downloaded from the web that I want to chop up into smaller files. I'm using FFmpeg to do this, but each time, after about 3 minutes the video starts to fall behind and go out of sync with the audio.

    


    I've been experimenting with async and vsync and have gotten this far...

    


    ffmpeg -I test.ts -async 1 -map 0:1 -c:v copy -map 0:0 -channel_layout '5.1' -ss 01:00:12 -to 01:07:45 -y test.mp4

    


    The result is a file where the audio and video and in sync, but every few seconds the audio jumps. I assume this is because the audio has been trimmed to align with the video stream ?

    


    Does anyone know how I could get the video to align to the audio ? i.e. leave the audio as-is and drop frames from the video stream to keep aligned with the audio ?

    


  • Discord.py ffprobe/avprobe and ffmpeg/avconv not found error

    20 juillet 2021, par Exd Craft

    Im hosting this discord bot using android device and the bot is used to play music using youtube_dl module, and when i launch the play music command, i got and error where ffprobe/avprobe and ffmpeg/avconv not found. I know how to solve this problem in pc but im still dont know how to fix this on android. For the test here, im using a music from soundcloud since its more faster to download the music.

    


    Here's the error message on the terminal

    


    Logged in as Test Bot#6599\
[soundcloud] user-785177525/yoasobi-yoru-ni-kakeru-x-l-a-b-remix: Downloading info JSON\
[soundcloud] None: Downloading webpage\
[soundcloud] None: Downloading webpage\
[soundcloud] user-785177525/yoasobi-yoru-ni-kakeru-x-l-a-b-remix: Downloading info JSON\
[soundcloud] 895894084: Downloading JSON metadata\
[soundcloud] 895894084: Downloading JSON metadata\
[soundcloud] 895894084: Downloading JSON metadata\
[download] Destination: YOASOBI - Yoru ni Kakeru [x l a b. Remix]-895894084.mp3\
[download] 100% of 3.60MiB in 00:03\
ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.


    


    Here's the sample code for the play music command

    


    

    

         @client.command()
     async def playsc(ctx, url : str, *, message):
         song_there = os.path.isfile("song.mp3")
         try:
             if song_there:
                 os.remove("song.mp3")
         except PermissionError:
             em8 = discord.Embed(title = "Music Is Currently Playing", description = 'Please wait for the current playing music to end or use %leave <:_Paimon6:827074349450133524>.\nMusic provided by {ctx.author.mention} <:_Paimon6:827074349450133524>',color = ctx.author.color)
             await ctx.send(embed = em8)
             return

         voiceChannel = discord.utils.get(ctx.guild.voice_channels, name=message)
         await voiceChannel.connect()
         voice = discord.utils.get(client.voice_clients, guild=ctx.guild)
         em6 = discord.Embed(title = "Downloading Soundcloud Music", description = f'{url}\n\nPlease wait for paimon to setup the music you provide.\nMusic provided by {ctx.author.mention} <:_Paimon6:827074349450133524>',color = ctx.author.color)
         await ctx.send(embed = em6, delete_after = 2)
         await ctx.message.delete()

         ydl_opts = {
             'format': 'bestaudio/best',
             'postprocessors': [{
                 'key': 'FFmpegExtractAudio',
                 'preferredcodec': 'mp3',
                 'preferredquality': '192',
             }],
         }
         with youtube_dl.YoutubeDL(ydl_opts) as ydl:
             ydl.download([url])
         for file in os.listdir("./"):
             if file.endswith(".mp3"):
                 os.rename(file, "song.mp3")
         voice.play(discord.FFmpegPCMAudio("song.mp3"))
        
         em1 = discord.Embed(title = "Now Listening Soundcloud Music", description = f'{url}\n\nPlease use %leave first to change music.\nMusic provided by {ctx.author.mention} <:_Paimon6:827074349450133524>',color = ctx.author.color)
         await ctx.send(embed = em1)