
Recherche avancée
Autres articles (85)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (15902)
-
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 ?