
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (26)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (4755)
-
Error : Unable to extract uploader id - Youtube, Discord.py
22 juillet 2024, par nikita goncharovI have a very powerful bot in discord (discord.py, PYTHON) and it can play music in voice channels. It gets the music from youtube (youtube_dl). It worked perfectly before but now it doesn't want to work with any video.
I tried updating youtube_dl but it still doesn't work
I searched everywhere but I still can't find a answer that might help me.


This is the Error :
Error: Unable to extract uploader id


After and before the error log there is no more information.
Can anyone help ?


I will leave some of the code that I use for my bot...
The youtube setup settings :


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': 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 sometimes
}

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

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


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.duration = data.get('duration')
 self.image = data.get("thumbnails")[0]["url"]
 @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))
 #print(data)

 if 'entries' in data:
 # take first item from a playlist
 data = data['entries'][0]
 #print(data["thumbnails"][0]["url"])
 #print(data["duration"])
 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)




Approximately the command to run the audio (from my bot) :


sessionChanel = message.author.voice.channel
await sessionChannel.connect()
url = matched.group(1)
player = await YTDLSource.from_url(url, loop=client.loop, stream=True)
sessionChannel.guild.voice_client.play(player, after=lambda e: print(
 f'Player error: {e}') if e else None)



-
Do avcodec_receive_frame and avcodec_send_packet block / how to design ffmpeg decoding loop ?
12 octobre 2020, par PaprikaI'm thinking about how to design a loop that reads frames from internet, feed to ffmpeg decoder and then receive from ffmpeg to send to a render.


Take this pseudocode loop in consideration :


while true {
 auto packet = receive_packet_from_network();
 avcodec_send_packet(packet);
 auto frame = alloc_empty_frame();
 int r = avcodec_receive_frame(&frame);
 if (r==0) {
 send_to_render(frame);
 }
}



do
avcodec_send_packet
oravcodec_receive_frame
block or ffmpeg has an internal thread ? I'm concerned about this loop because it waits for packets from network, so it has some delay. I'd like to do something like this instead :

//thread 1
while true {
 auto packet = receive_packet_from_network();
 avcodec_send_packet(packet);
}
//thread 2
while true {
 auto frame = alloc_empty_frame();
 int r = avcodec_receive_frame(&frame);
 if (r==0) {
 send_to_render(frame);
 }
}



however, now, if
avcodec_receive_frame
does not block, then this loop would run too fast, millions of times per second.

So, how should I design the send/receive of packets in ffmpeg in the most efficient way ? I don't want to spend cpu cycles like in the thread2 loop.


-
FFMPEG C# Winforms Output to Textbox
21 janvier 2016, par user1700974Trying to write a video compression app using Windows Forms, I can get the file to compress ok, but I’m looking to show the process to something like a textbox ?
At the minute the program doesn’t have a progress, so you don’t know if its complete or not, is it possible to output with FFMPEG is doing to a textbox ?
This is my code, when it runs nothing is shown in the textbox :
string ffmpeg = @"c:\test\ffmpeg.exe";
ProcessStartInfo psi = new ProcessStartInfo(ffmpeg);
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
psi.RedirectStandardOutput = true;
psi.Arguments = "-i c:\\test\\small.mp4 -s 480x272 c:\\test\\compressed.mp4";
var proc = Process.Start(psi);
string s = proc.StandardOutput.ReadToEnd();
textBox1.Text = s;Do i need to pass something else into the ProcessStartInfo section ?