Recherche avancée

Médias (91)

Autres articles (69)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • 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

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

  • Anomalie #4189 : extraire_multi mélange un /li /ul final avec le de langue ajouté par code_...

    5 octobre 2018, par jluc -

    Plutôt

    1. <span class="CodeRay"><span class="local-variable">$mode</span> = <span class="predefined">preg_match</span>(<span class="string"><span class="delimiter">'</span><span class="content">,span><span class="delimiter">'</span></span> . _BALISES_BLOCS . <span class="string"><span class="delimiter">'</span><span class="content">)[>[:space:]],iS</span><span class="delimiter">'</span></span>, <span class="local-variable">$trad_propre</span>) ? <span class="string"><span class="delimiter">'</span><span class="content">div</span><span class="delimiter">'</span></span> : <span class="string"><span class="delimiter">'</span><span class="content">span</span><span class="delimiter">'</span></span>;
    2. <span class="keyword">if</span> (<span class="local-variable">$mode</span>==<span class="string"><span class="delimiter">'</span><span class="content">div</span><span class="delimiter">'</span></span> <span class="keyword">and</span> (<span class="predefined">substr</span>(<span class="predefined">rtrim</span>(<span class="local-variable">$trad_propre</span>), -<span class="integer">5</span>)==<span class="string"><span class="delimiter">'</span><span class="content"></span><span class="delimiter">'</span></span>))
    3.     <span class="local-variable">$trad</span> .= <span class="string"><span class="delimiter">"</span><span class="char">\n</span><span class="char">\n</span><span class="delimiter">"</span></span>;
    4. <span class="local-variable">$trad</span> = code_echappement(<span class="local-variable">$trad</span>, <span class="string"><span class="delimiter">'</span><span class="content">multi</span><span class="delimiter">'</span></span>, <span class="predefined-constant">false</span>, <span class="local-variable">$mode</span>);
    5. </span></span>

    Télécharger

  • Mixing video streams with a fade transition effect myself

    28 mai 2013, par AsTeR

    I would like to make a a software setup that would let the user switch between two webcam feeds (or more but let's consider two). I would like a fade in/out effect while switching. My main problem is that I don't know how to start.

    There seems to be some ffmpeg tool that could do the job (like libavfilter) but I don't get how I could setup it.

    What should I consider to use if I want to access frame image to make the transition myself ? Is there some simpler way ?

    I know that this question looks really poorly written, but I'm as lost as I look.

  • voice_client.play doesn't continue loop (Discord) (Solved)

    19 mars 2023, par Razurio

    SOLVED see end

    &#xA;

    songs = asyncio.Queue(maxsize=0)&#xA;currently_playing = False&#xA;&#xA;&#xA;@client.command()&#xA;async def play(ctx, url):&#xA;    global songs&#xA;    global currently_playing&#xA;    if currently_playing:&#xA;        with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:&#xA;            info = ydl.extract_info(url, download=True)&#xA;            filename = ydl.prepare_filename(info)&#xA;            await songs.put({"file": filename, "info": video_info(url)})&#xA;            # print("test 1")&#xA;    else:&#xA;        with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:&#xA;            info = ydl.extract_info(url, download=True)&#xA;            filename = ydl.prepare_filename(info)&#xA;            await songs.put({"file": filename, "info": video_info(url)})&#xA;            # print("test 2")&#xA;        asyncio.create_task(queue(ctx))&#xA;&#xA;&#xA;&#xA;async def queue(ctx):&#xA;    global songs&#xA;    global currently_playing&#xA;    currently_playing = True&#xA;    while True:&#xA;        if songs.empty():&#xA;            currently_playing = False&#xA;            await ctx.reply("Queue is now empty")&#xA;            await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty&#xA;            break&#xA;        else:    &#xA;            song = await songs.get()&#xA;            filename = song["file"]&#xA;            voice_channel = ctx.author.voice.channel&#xA;            if not ctx.voice_client:  # check if bot is not already connected to a voice channel&#xA;                await voice_channel.connect()&#xA;&#xA;            await ctx.reply(&#x27;playing&#x27;)&#xA;            await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))&#xA;&#xA;@client.command()&#xA;async def stop(ctx):&#xA;    global songs&#xA;    await ctx.voice_client.disconnect()&#xA;    await empty_queue(songs)&#xA;    await ctx.reply(&#x27;Stopped&#x27;)&#xA;&#xA;async def empty_queue(songs):&#xA;    while not songs.empty():&#xA;        songs.get_nowait()&#xA;

    &#xA;

    I have problems with the "await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))" which doesn't continue after finishing.

    &#xA;

    I know you can use a after= parameter in voice_client.play() but I didn't manage to get it to work to recursivly call queue()

    &#xA;

    async def play_next(ctx):&#xA;global songs&#xA;global currently_playing&#xA;if songs.empty():&#xA;    currently_playing = False&#xA;    await ctx.reply("Queue is now empty")&#xA;    await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty&#xA;else:    &#xA;    song = await songs.get()&#xA;    filename = song["file"]&#xA;    voice_channel = ctx.author.voice.channel&#xA;    if not ctx.voice_client:  # check if bot is not already connected to a voice channel&#xA;        await voice_channel.connect()&#xA;&#xA;    def after(error):&#xA;        if error:&#xA;            print(f&#x27;Error in after callback: {error}&#x27;)&#xA;        asyncio.create_task(play_next(ctx))&#xA;&#xA;    await ctx.reply(&#x27;playing&#x27;)&#xA;    ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)&#xA;

    &#xA;

    I tried using the after parameter like like but I just get an error in line 116, in after asyncio.create_task(play_next(ctx)) "no running event loop" ... "Calling the after function failed"

    &#xA;

    EDIT

    &#xA;

    async def play_next(ctx):&#xA;global loop&#xA;global songs&#xA;global currently_playing&#xA;global tasks&#xA;loop = asyncio.get_event_loop()&#xA;if songs.empty():&#xA;    currently_playing = False&#xA;    await ctx.reply("Queue is now empty")&#xA;    await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty&#xA;else:&#xA;    &#xA;    song = await songs.get()&#xA;    filename = song["file"]&#xA;    voice_channel = ctx.author.voice.channel&#xA;    if not ctx.voice_client:  # check if bot is not already connected to a voice channel&#xA;        await voice_channel.connect()&#xA;    def after(error):&#xA;        if error:&#xA;            print("er")&#xA;        loop.create_task(queue(ctx))&#xA;&#xA;    await ctx.reply(&#x27;playing&#x27;)&#xA;    ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)&#xA;

    &#xA;

    using loop = asyncio.get_event_loop() and loop.create_task(queue(ctx)) made it finally work&#xA;took inspiration from this post

    &#xA;