Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (62)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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 (10110)

  • Parse and drop gain control data, so that SSR packets decode.

    16 février 2018, par Dale Curtis
    Parse and drop gain control data, so that SSR packets decode.
    

    This will result in poor quality audio for SSR streams, but they
    will at least demux and decode without error ; partially fixing
    ticket #1693.

    This pulls in the decode_gain_control() function from the
    ffmpeg summer-of-code repo (original author Maxim Gavrilov) at
    svn ://svn.mplayerhq.hu/soc/aac/aac.c with some minor modifications
    and adds AOT_AAC_SSR to decode_audio_specific_config_gb().

    Signed-off-by : Dale Curtis <dalecurtis@chromium.org>
    Co-authored-by : Maxim Gavrilov <maxim.gavrilov@gmail.com>

    • [DH] libavcodec/aac.h
    • [DH] libavcodec/aacdec_template.c
  • ffmpeg : "Error setting profile"

    26 février 2017, par P. Reid

    I’ve been having trouble using ffmpeg to compress videos to something readable by quicktime. My goal in the end is to have a simple command that I can use to compress high bitrate videos (ie screencaptures) to something more reasonable to be able to share them with people.

    I want to use a command I found here as a starting point :

    ffmpeg -i input-file.avi -codec:v libx264 -profile: high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -codec:a libfdk_aac -b:a 128k output_file.mp4

    Unfortunately I get this error :

    [libx264 @ 0x7f92ab81c200] Error setting profile high.
    [libx264 @ 0x7f92ab81c200] Possible profiles: baseline main high high10 high422 high444
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    If I take out the -profile: high the command functions but the output still doesn’t open in quicktime (it does in VLC). I can’t find the keyword -profile on the ffmpeg man page : https://ffmpeg.org/ffmpeg.html so I don’t know if this is important or what to do about it.

    Does anyone know what might be causing my problem ? What should I do to try and debug this problem ? I would describe myself as inexperienced so sorry if I’m missing something obvious.

    Thanks in advance for your help,
    Peter

    This is my ffmpeg version :

    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 7.0.2 (clang-700.1.81)
  • How do I loop audio files in discord.py ?

    25 septembre 2021, par Jonah Alexander

    I cannot for the life of me find or figure out a solution that works anymore. here is both the bit of code that is actually important, and the whole file if you would like to see that too

    &#xA;

        async def play(self, ctx: commands.Context, url, lp):&#xA;        channel = ctx.author.voice.channel&#xA;&#xA;        if lp == &#x27;loop&#x27;:&#xA;            await channel.connect()&#xA;&#xA;            async with ctx.typing():&#xA;                player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;                ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;            await ctx.send(&#x27;Now playing: {}&#x27;.format(player.title))&#xA;            while True:&#xA;                if not ctx.voice_client.is_playing():&#xA;                    async with ctx.typing():&#xA;                        ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;                time.sleep(0.5)&#xA;        else:&#xA;            async with ctx.typing():&#xA;                await channel.connect()&#xA;                player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;                ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;            await ctx.send(&#x27;Now playing: {}&#x27;.format(player.title))&#xA;

    &#xA;

    from discord.ext import commands&#xA;import ffmpeg&#xA;import youtube_dl.YoutubeDL&#xA;import asyncio&#xA;import time&#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;&#xA;ytdl = youtube_dl.YoutubeDL(ytdl_format_options)&#xA;&#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;            # take first item from a playlist&#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;class MyBoi(commands.Cog):&#xA;    def __init__(self, bot: commands.Bot):&#xA;        self.bot = bot&#xA;        self.voice_states = {}&#xA;&#xA;    @commands.command(name=&#x27;leave&#x27;)&#xA;    async def leave(self, ctx: commands.Context):&#xA;        await ctx.voice_client.disconnect()&#xA;&#xA;    @commands.command(name=&#x27;play&#x27;)&#xA;    async def play(self, ctx: commands.Context, url, lp):&#xA;        channel = ctx.author.voice.channel&#xA;&#xA;        if lp == &#x27;loop&#x27;:&#xA;            await channel.connect()&#xA;&#xA;            async with ctx.typing():&#xA;                player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;                ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;            await ctx.send(&#x27;Now playing: {}&#x27;.format(player.title))&#xA;            while True:&#xA;                if not ctx.voice_client.is_playing():&#xA;                    async with ctx.typing():&#xA;                        ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;                time.sleep(0.5)&#xA;        else:&#xA;            async with ctx.typing():&#xA;                await channel.connect()&#xA;                player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;                ctx.voice_client.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;            await ctx.send(&#x27;Now playing: {}&#x27;.format(player.title))&#xA;&#xA;&#xA;intents = discord.Intents.all()&#xA;&#xA;clnt = commands.Bot(command_prefix=&#x27;#&#x27;, intents=intents)&#xA;clnt.add_cog(MyBoi(clnt))&#xA;&#xA;lop = {0: False}&#xA;plr = {}&#xA;&#xA;&#xA;@clnt.event&#xA;async def on_ready():&#xA;    print("ready")&#xA;&#xA;&#xA;clnt.run("the actual key normally")&#xA;

    &#xA;

    is the code poorly made and/or badly organized ? probably. but this is a personal project and did not expect to be sharing this with anyone. If you need clarification on anything lmk.

    &#xA;

    with the code here, the issue im getting is when I do the looped version, the bot disconnects for a frame and reconnects, then I get this error

    &#xA;

    &#xA;

    discord.ext.commands.errors.CommandInvokeError : Command raised an exception : ClientException : Not connected to voice.

    &#xA;

    &#xA;

    the bot does not disconnect immediately when not using the looped version, and trying to manually reconnect it at the start of the loop gives me an error saying it's already connected.

    &#xA;

    also sidenote I did not write the YTDLSource class or the ytdl_format_options.

    &#xA;