Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (100)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (4048)

  • Convert m4a to aac and keep metadata on Windows 7

    24 novembre 2014, par betamax

    I want to convert an m4a file to aac*. I can do this using :

    ffmpeg -i song.m4a -acodec copy song.aac

    But on Windows 7 the metadata is not compatible. It seems the -id3v2_version 3 flag should be used so that Windows compatible ID3 tags version 2.3 are used :

    ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac

    However, with the above command I still don’t get any metadata in song.aac. I have used windows file explorer, mp3tag and winamp to confirm there are no tags.

    * : reason ; m4a won’t play on the car stereo so following this advice (http://www.vwaudiforum.co.uk/forum/showthread.php?153728-Tip-Getting-M4A-(iTunes)-format-music-to-play-on-a-VW-head-unit)

    Console Output :

    C:\temp>ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac
    ffmpeg version N-67914-gf87a344 Copyright (c) 2000-2014 the FFmpeg developers
     built on Nov 22 2014 22:10:18 with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
    g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
    opencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
    r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
    enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
    libx265 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.100 / 56. 15.100
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002dcc760] stream 0, timescale not set
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'song.m4a':
     Metadata:
       major_brand     : M4A
       minor_version   : 0
       compatible_brands: M4A mp42isom
       creation_time   : 1980-07-20 13:32:00
       iTunSMPB        :  00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000
       iTunNORM        :  0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
       title           : Time Away
       artist          : Andy Stott
       album_artist    : Andy Stott
       album           : Faith In Strangers
       genre           : Electronic
       track           : 1/9
       disc            : 1/1
       compilation     : 0
       gapless_playback: 0
       date            : 2014-11-17T08:00:00Z
       copyright       : Ôäù 2014 Modern Love
       media_type      : 1
       iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?>
                       :
                       : <plist version="1.0">
                       : <dict>
                       :   <key>asset-info</key>
                       :   <dict>
                       :           <key>file-size</key>
                       :           <integer>14359364</integer>
                       :           <key>flavor</key>
                       :           <string>2:256</string>
                       :   </dict>
                       : </dict>
                       : </plist>
                       :
     Duration: 00:06:24.20, start: 0.000000, bitrate: 298 kb/s
       Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 285 kb/s (default)
       Metadata:
         creation_time   : 1980-07-20 13:32:00
       Stream #0:1: Video: mjpeg, gray(bt470bg/unknown/unknown), 1400x1400 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc

    Output #0, adts, to 'song.aac':
     Metadata:
       major_brand     : M4A
       minor_version   : 0
       compatible_brands: M4A mp42isom
       iTunMOVI        : &lt;?xml version="1.0" encoding="UTF-8"?>
                       :
                       : <plist version="1.0">
                       : <dict>
                       :   <key>asset-info</key>
                       :   <dict>
                       :           <key>file-size</key>
                       :           <integer>14359364</integer>
                       :           <key>flavor</key>
                       :           <string>2:256</string>
                       :   </dict>
                       : </dict>
                       : </plist>
                       :
       iTunSMPB        :  00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000
       iTunNORM        :  0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
       title           : Time Away
       artist          : Andy Stott
       album_artist    : Andy Stott
       album           : Faith In Strangers
       genre           : Electronic
       track           : 1/9
       disc            : 1/1
       compilation     : 0
       gapless_playback: 0
       date            : 2014-11-17T08:00:00Z
       copyright       : Ôäù 2014 Modern Love
       media_type      : 1
       encoder         : Lavf56.15.100
       Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 285 kb/s (default)
       Metadata:
         creation_time   : 1980-07-20 13:32:00
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=   13523kB time=00:06:24.19 bitrate= 288.3kbits/s
    video:0kB audio:13410kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.843272%

    C:\temp>
  • My music doesn't play correctly and other problems - Discord.py

    24 mars 2021, par Diacono

    So, I'm triying to let my bot play songs directly from the url (without downloading them like the song.mp3 method) but I'm having a hard time. The bot plays only 1 song and when I try to play another song it doesn't play it.&#xA;I'm also getting 2 errors : video_link is not defined and self is not defined.&#xA;Also when I try to play live music like "lofi hip hop radio - beats to relax/study to" nothing happens.&#xA;Can you help me please ???

    &#xA;

    This is my code

    &#xA;

    import asyncio&#xA;import discord&#xA;from discord.ext import commands, tasks&#xA;import requests&#xA;import json&#xA;from random import choice&#xA;from discord.utils import get&#xA;from discord import FFmpegPCMAudio&#xA;import youtube_dl&#xA;bot = commands.Bot(command_prefix="!")&#xA;&#xA;&#xA;&#xA;ytdl_format_options = {&#xA;    &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;    &#x27;outtmpl&#x27;: &#x27;%(extractor)s-%(id)s-%(title)s.%(ext)s&#x27;,&#xA;    &#x27;restrictfilenames&#x27;: True,&#xA;    &#x27;noplaylist&#x27;: True,&#xA;    &#x27;nocheckcertificate&#x27;: True,&#xA;    &#x27;ignoreerrors&#x27;: False,&#xA;    &#x27;logtostderr&#x27;: False,&#xA;    &#x27;quiet&#x27;: True,&#xA;    &#x27;no_warnings&#x27;: True,&#xA;    &#x27;default_search&#x27;: &#x27;auto&#x27;,&#xA;    &#x27;source_address&#x27;: &#x27;0.0.0.0&#x27; # bind to ipv4 since ipv6 addresses cause issues sometimes&#xA;}&#xA;&#xA;ffmpeg_options = {&#xA;    &#x27;options&#x27;: &#x27;-vn&#x27;&#xA;}&#xA;&#xA;ytdl = youtube_dl.YoutubeDL(ytdl_format_options)&#xA;&#xA;class YTDLSource(discord.PCMVolumeTransformer):&#xA;    def __init__(self, source, *, data, volume=0.5):&#xA;        super().__init__(source, volume)&#xA;&#xA;        self.data = data&#xA;&#xA;        self.title = data.get(&#x27;title&#x27;)&#xA;        self.url = data.get(&#x27;url&#x27;)&#xA;&#xA;    @classmethod&#xA;    async def from_url(cls, url, *, loop=None, stream=False):&#xA;        loop = loop or asyncio.get_event_loop()&#xA;        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download= not stream))&#xA;&#xA;        if &#x27;entries&#x27; in data:&#xA;            data = data[&#x27;entries&#x27;][0]&#xA;&#xA;        filename = data[&#x27;url&#x27;] if stream else ytdl.prepare_filename(data)&#xA;        return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)&#xA;&#xA;&#xA;@bot.command()&#xA;async def play(ctx, url):&#xA;    voice = await ctx.author.voice.channel.connect()&#xA;    player = await YTDLSource.from_url(url, loop=client.loop)&#xA;    ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;    ydl_opts = {&#x27;format&#x27;: &#x27;bestaudio&#x27;}&#xA;    FFMPEG_OPTIONS = {&#x27;before_options&#x27;: &#x27;-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5&#x27;, &#x27;options&#x27;: &#x27;-vn&#x27;}&#xA;    with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;         info = ydl.extract_info(video_link, download=False)&#xA;         URL = info[&#x27;formats&#x27;][0][&#x27;url&#x27;]&#xA;    voice = get(self.bot.voice_clients, guild=ctx.guild)&#xA;    voice.play(discord.FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))&#xA;

    &#xA;

  • Discord music bot doesn't play songs

    9 octobre 2023, par Gam3rsCZ

    I have made myself a discord bot that also plays music(it's only for my server so strings with messages are in Czech, but code is in English).&#xA;Bot worked a while ago but now it stopped, and I don't know where the problem is

    &#xA;

    I'm getting these errors : HTTP error 403 Forbidden Server returned 403 Forbidden (access denied) and&#xA;C :\Users\Me\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\player.py:711 : RuntimeWarning : coroutine 'music_cog.play_next' was never awaited&#xA;self.after(error)&#xA;RuntimeWarning : Enable tracemalloc to get the object allocation traceback&#xA;[2023-10-09 16:23:47] [INFO ] discord.player : ffmpeg process 17496 successfully terminated with return code of 1.&#xA;INFO : ffmpeg process 17496 successfully terminated with return code of 1.

    &#xA;

    My code is :

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;from yt_dlp import YoutubeDL&#xA;&#xA;class music_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;        self.current = ""&#xA;&#xA;        self.music_queue = []&#xA;        self.YDL_OPTIONS = {"format": "m4a/bestaudio/best", "noplaylist": "True"}&#xA;        self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}&#xA;&#xA;        self.vc = None&#xA;&#xA;    def search_yt(self, item):&#xA;        with YoutubeDL(self.YDL_OPTIONS) as ydl:&#xA;            try:&#xA;                info = ydl.extract_info("ytsearch:%s" % item, download=False)["entries"][0]&#xA;            except Exception:&#xA;                return False&#xA;        info = ydl.sanitize_info(info)&#xA;        url = info[&#x27;url&#x27;]&#xA;        title = info[&#x27;title&#x27;]&#xA;        return {&#x27;title&#x27;: title, &#x27;source&#x27;: url}&#xA;&#xA;    async def play_next(self):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;            self.current = self.music_queue[0][0]["title"]&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            self.music_queue.pop(0)&#xA;&#xA;            await self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e:  self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    async def play_music(self, ctx):&#xA;        try:&#xA;            if len(self.music_queue) > 0:&#xA;                self.is_playing = True&#xA;                m_url = self.music_queue[0][0]["source"]&#xA;&#xA;                if self.vc == None or not self.vc.is_connected():&#xA;                    self.vc =  await self.music_queue[0][1].connect()&#xA;&#xA;                    if self.vc == None:&#xA;                        await ctx.send("Nepodařilo se připojit do hlasov&#xE9;ho kan&#xE1;lu.")&#xA;                        return&#xA;                else:&#xA;                    await self.vc.move_to(self.music_queue[0][1])&#xA;&#xA;                self.current = self.music_queue[0][0]["title"]&#xA;                self.music_queue.pop(0)&#xA;&#xA;                self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;            else:&#xA;                self.is_playing = False&#xA;&#xA;        except:&#xA;            print("Something went wrong")&#xA;            await ctx.send(content="Něco se pokazilo")&#xA;&#xA;    @commands.command(name="play", help="Plays selected song from YouTube")&#xA;    async def play(self, ctx, *args):&#xA;        query = " ".join(args)&#xA;&#xA;        voice_channel = ctx.author.voice.channel&#xA;        if voice_channel is None:&#xA;            await ctx.send("Připojte se do hlasov&#xE9;ho kan&#xE1;lu!")&#xA;        elif self.is_paused:&#xA;            self.vc.resume()&#xA;        else:&#xA;            song = self.search_yt(query)&#xA;            if type(song) == type(True):&#xA;                await ctx.send("P&#xED;sničku se nepodařilo st&#xE1;hnout. Špatn&#xFD; form&#xE1;t, možn&#xE1; jste se pokusili zadat playlist nebo livestream.")&#xA;            else:&#xA;                await ctx.send("P&#xED;snička přid&#xE1;na do řady.")&#xA;                self.music_queue.append([song, voice_channel])&#xA;&#xA;                if self.is_playing == False:&#xA;                    await self.play_music(ctx)&#xA;                    self.is_playing = True&#xA;&#xA;    @commands.command(name="pause", aliases=["p"], help="Pauses the BOT")&#xA;    async def pause(self, ctx, *args):&#xA;        if self.is_playing:&#xA;            self.is_playing = False&#xA;            self.is_paused = True&#xA;            self.vc.pause()&#xA;            await ctx.send(content="P&#xED;snička byla pozastavena.")&#xA;            &#xA;        elif self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;            await ctx.send(content="P&#xED;snička byla obnovena.")&#xA;&#xA;    @commands.command(name="resume", aliases=["r"], help="Resumes playing")&#xA;    async def resume(self, ctx, *args):&#xA;        if self.is_paused:&#xA;            self.is_paused = False&#xA;            self.is_playing = True&#xA;            self.vc.resume()&#xA;            await ctx.send(content="P&#xED;snička byla obnovena.")&#xA;&#xA;    @commands.command(name="skip", aliases=["s"], help="Skips current song")&#xA;    async def skip(self, ctx, *args):&#xA;        if self.vc != None and self.vc:&#xA;            self.vc.stop()&#xA;        await self.play_next()&#xA;        await ctx.send(content="P&#xED;snička byla přeskočena.")&#xA;&#xA;    @commands.command(name="queue", aliases=["q"], help="Displays song queue")&#xA;    async def queue(self, ctx, songs=5):&#xA;        retval = ""&#xA;&#xA;        for i in range(0, len(self.music_queue)):&#xA;            if i > songs: break&#xA;            retval &#x2B;= "    " &#x2B; self.music_queue[i][0]["title"] &#x2B; "\n"&#xA;&#xA;        if retval != "":&#xA;            retval &#x2B;= "```"&#xA;            await ctx.send(content=("```Aktu&#xE1;ln&#xED; fronta:\n" &#x2B; retval))&#xA;        else:&#xA;            await ctx.send("Řada je pr&#xE1;zdn&#xE1;.")&#xA;&#xA;    @commands.command(name="clear", help="Clears the queue")&#xA;    async def clear(self, ctx):&#xA;        if self.vc != None and self.is_playing:&#xA;            self.vc.stop()&#xA;        self.music_queue = []&#xA;        await ctx.send("Řada byla vymaz&#xE1;na.")&#xA;&#xA;    @commands.command(name="leave", aliases=["dc", "disconnect"], help="Disconnects the BOT")&#xA;    async def leave(self, ctx):&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;&#xA;        if self.vc != None:&#xA;            return await self.vc.disconnect(), await ctx.send(content="BOT byl odpojen.")&#xA;&#xA;        else:&#xA;            return await ctx.send("BOT nen&#xED; nikde připojen.")&#xA;   &#xA;    @commands.command(name="current", help="Displays the current song")&#xA;    async def current(self, ctx):&#xA;        current = self.current&#xA;        retval = f"```Pr&#xE1;vě hraje:\n    {current}```"&#xA;        if current != "":&#xA;            await ctx.send(retval)&#xA;        else:&#xA;            await ctx.send("Aktu&#xE1;lně nic nehraje.")&#xA;

    &#xA;

    I already tried everything I can think of(which isn't a lot because I suck at programming), and also tried searching for some solution on the internet, but nothing worked.

    &#xA;