
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (56)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang 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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (9927)
-
Hello ! I have a little problem with my discord.py music bot
5 mars 2021, par Luca M. Schmidti'm rather new/unexpierience with youtube-dl and python. The thing i'm triying to do is to add a queue system to my music cog. When possible it should be able to add songs and start the next song after the first one ended as well. You dont need to provide the complete code for it, tryingt to explain how it should work and giving some tipps should be enought. If more information is needed, feel free to ask. Thx for helping.


My Code (Stripped down a bit) :


# IMPORT


import discord
from discord.ext import commands
import json
import asyncio
import youtube_dl



# LOKALE_VARIABLEN


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': False,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0'
}

ffmpeg_options = {
 'options': '-vn'
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

songs = asyncio.Queue()
play_next_song = asyncio.Event()


# ----

class YTDLSource(discord.PCMVolumeTransformer):
 def __init__(self, source, *, data, volume=0.5):
 super().__init__(source, volume)

 self.data = data

 self.title = data.get('title')
 self.url = data.get('url')
 self.thumbnail = data.get('thumbnail')


 @classmethod
 async def from_url(cls, url, *, loop=None, stream=False):
 loop = loop or asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

 if 'entries' in data:
 data = data['entries'][0]

 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)


# COG_SETUP(START)


class Music(commands.Cog):

 def __init__(self, client):
 self.client = client


 @commands.command()
 async def join(self, ctx, *, channel: discord.VoiceChannel):

 if ctx.voice_client is not None:
 return await ctx.voice_client.move_to(channel)

 await channel.connect()

 @commands.command()
 @commands.cooldown(1, 10, commands.BucketType.user)
 async def play(self, ctx, *, url):

 try:

 async with ctx.typing():
 player = await YTDLSource.from_url(url, loop=self.client.loop, stream=True)
 ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None)

 except:
 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Dies ist eine nicht Unterstützte URL!'
 )

 return await ctx.send(embed=embed)

 embed = discord.Embed(
 title='',
 colour=discord.Colour.blue(),
 description=f'[{format(player.title)}]({player.url})'
 )
 embed.set_author(name='Spielt gerade:')
 embed.set_image(url=player.thumbnail)
 embed.set_footer(text=f'Hinzugefügt von: {ctx.author.name}', icon_url=ctx.author.avatar_url)


 await ctx.send(embed=embed)




 @commands.command()
 async def volume(self, ctx, volume: int):

 if ctx.voice_client is None:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Ich bin mit keinem Sprachkanal verbunden!'
 )

 return await ctx.send(embed=embed)

 elif ctx.voice_client is not None:

 if volume in range(0, 201):
 try:
 ctx.voice_client.source.volume = volume / 100

 embed = discord.Embed(
 title='Lautstärke',
 colour=discord.Colour.blue(),
 description=f'Lautstärke auf **{format(volume)}**% gestellt.'
 )
 embed.set_footer(text=f"Angepasst von: {ctx.author.name}", icon_url=ctx.author.avatar_url)

 return await ctx.send(embed=embed)
 except:
 pass

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Das ist Lauter, als die Musik geht!'
 )

 return await ctx.send(embed=embed)

 @commands.command()
 async def stop(self, ctx):
 try:

 await ctx.voice_client.disconnect()
 await ctx.message.delete()

 except:
 pass

 @commands.command()
 async def pause(self, ctx):

 if ctx.voice_client.is_playing():

 ctx.voice_client.pause()
 await ctx.message.delete()
 return

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Es spielt keine Musik!'
 )

 return await ctx.send(embed=embed)

 @commands.command()
 async def resume(self, ctx):

 if ctx.voice_client.is_paused():

 ctx.voice_client.resume()
 await ctx.message.delete()
 return

 else:

 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Es wurde keine Musik pausiert, darum kann ich auch nichts fortsetzen!'
 )

 return await ctx.send(embed=embed)

 @resume.before_invoke
 @play.before_invoke
 async def ensure_voice(self, ctx):
 if ctx.voice_client is None:
 if ctx.author.voice:
 try:

 await ctx.author.voice.channel.connect()

 except commands.CommandError:
 embed = discord.Embed(
 title='Fehler!',
 colour=discord.Colour.red(),
 description='Du bist nicht mit einem Sprachkanal verbunden!'
 )

 await ctx.send(embed=embed)

 elif ctx.voice_client.is_playing():
 ctx.voice_client.stop()


# COG_SETUP(END)


def setup(client):
 client.add_cog(Music(client))




-
How to overlay a box on a transparent video in FFmpeg
28 août 2023, par SidneyI'm trying to overlay a box and image on a transparent video in FFmpeg and Python, and have it show up in video editors.


I've written the following code :


import ffmpeg

stream = ffmpeg.input("/dev/zero", f='rawvideo', pix_fmt='rgba', s='{}x{}'.format(1920, 1080),
 r=30)

stream = ffmpeg.overlay(stream, ffmpeg.input("tmp.png"), x=0, y=0)
stream = ffmpeg.drawbox(stream, x=900, y=100, width=500, height=500, color='blue', thickness="fill")
stream = ffmpeg.trim(stream, duration=1)
stream = ffmpeg.output(stream, "out.webm",
 pix_fmt="yuva420p")
ffmpeg.run(stream)



While the box displays in most video players :



When I try to overlay it on another image in any video editor like Kdenlive or Shotcut, or open in FireFox, it doesn't appear :



This seems odd considering the overlayed image displays fine. Is there something wrong with the drawbox call ?


EDIT :
The same issue occurs when exporting as PNGs, where no frames contain the box when it's not over the image :


stream = ffmpeg.output(stream, "out/out%d.png")





-
Why can I not change the number of frames (nframes) in a gganimate animation ? SOLVED
26 décembre 2022, par GekinI have produced an animation per gganimate and rendered it per ffmpeg. It works just fine, but only, if I do not change the number of frames. If I do set the number of frames, I get this error message :


nframes and fps adjusted to match transition
Error parsing framerate 8,4. 
Error: Rendering with ffmpeg failed



I produced the gganim
MonthlyAveragePrecipitationMap
the following way :

options(scipen = 999, OutDec = ",")

MonthlyAveragePrecipitationMap = ggplot(MonthlyAverageExtremePrecipitation) + 
 geom_path(data = map_data("world","Germany"),
 aes(x = long, y = lat, group = group)) +
 coord_fixed(xlim = c(6,15),
 ylim = c(47,55)) + 
 geom_point(aes(x=lon, y=lat, 
 colour = ShareOfExtremePrecipitationEvents,
 group = MonthOfYear),
 size = 3) + 
 scale_color_gradient(low="blue", high="yellow") + 
 xlab("Longitude (degree)") +
 ylab("Latitude (degree)") + 
 theme_bw() +
 transition_manual(frames = MonthOfYear) + 
 labs(title = '{unique(MonthlyAverageExtremePrecipitation$MonthOfYear)[as.integer(frame)]}', 
 color = paste0("Share of Extreme Precipitation Events \namong all Precipitation Events")) 



I call the animation the following way :


animate(MonthlyAveragePrecipitationMap,
 nframes = 300,
 renderer =
 ffmpeg_renderer(
 format = "auto",
 ffmpeg = NULL,
 options = list(pix_fmt = "yuv420p")))




I used this exact code just a few days ago and it worked fine.


Has someone had similar experiences ?
Thanks in advance.


EDIT : Problem solved.


- 

- Problem : Changing the decimal seperator from
.
to,
peroptions(dec=",")
- Solution : Changing the decimal seperator locally within the axis scaling per function.






- Problem : Changing the decimal seperator from