
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (43)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6234)
-
How to convert audio and keep track metadata with all formats
16 septembre 2018, par Bleuzenmy inputs are multiple FLAC and OGG files.
I want to convert them all to mp3. (a script does batch converting, ffmpeg command only has to handle one input file).I also want to keep the tags (song artist, track name, album name, ...).
My current command to do this is :ffmpeg -vn -n -i $INFILE -c:a libmp3lame -q:a 1 -ar 44100 -map_metadata 0:s:0 -id3v2_version 3 $OUTFILE.mp3
Now the problem is : it works when the input file is an OGG file. But it doesn’t work if input is a FLAC file.
I also found a command for FLAC input files :
ffmpeg -vn -n -i $INFILE -c:a libmp3lame -q:a 1 -ar 44100 $OUTFILE.mp3
(which is the same but without the map_metadata option. So FLAC tags are copied without that options. But without them it doesn’t work for OGG input files. And with the options it doesn’t work for FLAC input files.
How can I handle both input formats and keep tags of both without needing a different command ?
-
FFMPEG show audio frequency waves with border
13 juillet 2020, par Nikhil SolankiI am trying to generate sine waves or audio frequency like
using this command :


ffmpeg -i combine2.mp4 -i image1.png -i song.mp3 -t 20 -filter_complex "[0]split=2[color][alpha]; [color]crop=iw/2:ih:0:0[color]; [alpha]crop=iw/2:ih:iw/2:ih[alpha]; [color][alpha]alphamerge[v1];
[1]scale=540:960, setsar=1[v2];
[2]showfreqs=s=540x100:mode=line:ascale=sqrt:colors=white|red[v3];
[v2][v3] overlay=main_w-overlay_w:main_h-overlay_h-10[v4];
[v4][v1] overlay=1" output_video2.mp4 -y



This command shows frequency of audio with white colour only and also its not smooth as above image. So, how can I generate waves like above image smooth and bordered ?




-
Seeking with ffmpeg options fails or causes delayed playback in Discord bot
29 août 2022, par J PetersenMy Discord bot allows users to play a song starting from a timestamp.


The problem is that playback is delayed and audio plays faster and is jumbled if start times >= 30s are set.


Results from testing different start times. Same URL, 30 second duration :







 Entered Start Time (s) 

Playback Delay (s) 

Song Playback Time (s) 







 0 

3 

30 




 30 

10 

22 




 60 

17 

17 




 120 

31 

2 




 150 

120 

<1 









I am setting the start time using ffmpeg_options as suggested in this question.


Does anyone understand why the audio playback is being delayed/jumbled ? How can I improve playback delay and allow users to start in the middle of a multi-chapter YouTube video ?


Code :


import discord
import youtube_dl
import asyncio


# Suppress noise about console usage from errors
youtube_dl.utils.bug_reports_message = lambda: ""


ytdl_format_options = {
 "format": "bestaudio/best",
 "outtmpl": "%(extractor)s-%(id)s-%(title)s.%(ext)s",
 "restrictfilenames": True,
 "noplaylist": False,
 "yesplaylist": True,
 "nocheckcertificate": True,
 "ignoreerrors": False,
 "logtostderr": False,
 "quiet": True,
 "no_warnings": True,
 "default_search": "auto",
 "source_address": "0.0.0.0", # Bind to ipv4 since ipv6 addresses cause issues at certain times
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


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

 self.data = data

 self.title = data.get("title")
 self.url = data.get("url")

 @classmethod
 async def from_url(cls, url, *, loop=None, stream=False, timestamp = 0):
 ffmpeg_options = {
 "options": f"-vn -ss {timestamp}"}

 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:
 # Takes the first item from a playlist
 data = data["entries"][0]

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


intents = discord.Intents.default()

bot = discord.Bot(intents=intents)

@bot.slash_command()
async def play(ctx, audio: discord.Option(), seconds: discord.Option(), timestamp: discord.Option()):
 channel = ctx.author.voice.channel
 voice = await channel.connect()
 player = await YTDLSource.from_url(audio, loop=bot.loop, stream=True, timestamp=int(timestamp))
 voice.play(player)
 await asyncio.sleep(int(seconds))
 await voice.disconnect()

token = token value
bot.run(token)