
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (101)
-
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. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (13570)
-
FFmpeg streaming to youtube very slowly
3 avril 2022, par codingmaster398Input :


const runCommand = require('./runCommand')

runCommand(
 'ffmpeg',
 `-threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 512 \
-loop 1 -i ./place.png \
-stream_loop -1 \
-i ./track.mp3 \
-pix_fmt yuv420p -c:v libx264 -qp:v 19 -profile:v high -rc:v cbr_ld_hq -level:v 4.2 -r:v 60 -g:v 120 -bf:v 3 -refs:v 16 -preset fast -f flv rtmp://a.rtmp.youtube.com/live2/${process.env.streamkey}`,
 (data) => console.log(data),
 () => console.log('finished')
 )



Output :


x 
frame= 588 fps=8.7 q=21.0 size= 9000kB time=00:00:22.76 bitrate=3238.2kbits/s speed=0.339x 
frame= 590 fps=8.7 q=19.0 size= 9001kB time=00:00:22.83 bitrate=3229.4kbits/s speed=0.336x 
frame= 597 fps=8.7 q=21.0 size= 9007kB time=00:00:23.11 bitrate=3191.5kbits/s speed=0.337x 
frame= 603 fps=8.7 q=20.0 size= 9012kB time=00:00:23.36 bitrate=3159.3kbits/s speed=0.338x 
frame= 608 fps=8.7 q=21.0 size= 9016kB time=00:00:23.56 bitrate=3133.9kbits/s speed=0.339x 
frame= 614 fps=8.8 q=19.0 size= 9021kB time=00:00:23.80 bitrate=3104.9kbits/s speed=0.339x 
frame= 617 fps=8.7 q=21.0 size= 10702kB time=00:00:23.92 bitrate=3663.8kbits/s speed=0.337x 
frame= 623 fps=8.7 q=20.0 size= 10735kB time=00:00:24.16 bitrate=3638.9kbits/s speed=0.338x 
frame= 629 fps=8.7 q=21.0 size= 10740kB time=00:00:24.40 bitrate=3605.8kbits/s speed=0.338x 
frame= 635 fps=8.7 q=20.0 size= 10745kB time=00:00:24.63 bitrate=3573.1kbits/s speed=0.339x 
frame= 643 fps=8.8 q=20.0 size= 10751kB time=00:00:24.96 bitrate=3527.4kbits/s speed=0.341x 
frame= 646 fps=8.8 q=19.0 size= 10754kB time=00:00:25.08 bitrate=3512.1kbits/s speed=0.341x 
frame= 651 fps=8.8 q=20.0 size= 10758kB time=00:00:25.28 bitrate=3485.6kbits/s speed=0.341x 
frame= 656 fps=8.8 q=21.0 size= 10762kB time=00:00:25.48 bitrate=3459.6kbits/s speed=0.341x 
frame= 658 fps=8.7 q=19.0 size= 10764kB time=00:00:25.56 bitrate=3448.7kbits/s speed=0.338x 
frame= 664 fps=8.7 q=21.0 size= 10769kB time=00:00:25.81 bitrate=3417.9kbits/s speed=0.338x



Why is my FPS so low when streaming to Youtube ?


P.S. The process is using very low memory and CPU, can I sacrifice a bit more for it ?



-
Discord Bot can't play audio from YouTube all of a sudden
22 mars 2023, par Aidan TweedyLast night my Discord bot stopped working out of the blue. The bot had been working perfectly for months until this point - no code changes occurred and it was running in a Docker container on my home server. Then last night, my
!play <url></url>
command stopped working. The bot would join the voice channel, but not actually play anything. Then it would need to be manually disconnected from the voice channel in order for it to do anything again. After the first play fails, and I try again I get this error message :

[youtube] crOZk88eCcg: Downloading webpage
 [youtube] crOZk88eCcg: Downloading android player API JSON
 [youtube] Extracting URL: https://www.youtube.com/watch?v=crOZk88eCcg&ab_channel=0foofighter0
 [youtube] crOZk88eCcg: Downloading webpage
 [youtube] crOZk88eCcg: Downloading android player API JSON
 [2023-03-22 00:27:59] [ERROR ] discord.ext.commands.bot: Ignoring exception in command play
 Traceback (most recent call last):
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 190, in wrapped
 ret = await coro(*args, **kwargs)
 File "/usr/src/app/./main.py", line 180, in play
 voice.play(player, after=lambda e: print(f'Player error: {e}') if e else None)
 File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 600, in play
 raise ClientException('Not connected to voice.')
 discord.errors.ClientException: Not connected to voice.
 
 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/bot.py", line 1347, in invoke
 await ctx.command.invoke(ctx)
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 986, in invoke
 await injected(*ctx.args, **ctx.kwargs) # type: ignore
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 199, in wrapped
 raise CommandInvokeError(exc) from exc
 discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.
 [2023-03-22 00:27:59] [INFO ] discord.player: ffmpeg process 12 has not terminated. Waiting to terminate...
 [2023-03-22 00:27:59] [INFO ] discord.player: ffmpeg process 12 should have terminated with a return code of -9.



My first instinct was that ffmpeg was borking somehow, since it has been difficult to get working in the past. However I'm not sure how ffmpeg could've stopped working, since the bot never went down between working and not working. That leads me to believe it could be a change on Youtube/Discord's side ?


For context, here is a snippet of my
!play
code :

@client.command(pass_context = True)
async def play(ctx):
 url = ctx.message.content.split("!play ",1)[1]
 voice = discord.utils.get(client.voice_clients)
 if (ctx.author.voice):
 if voice == None:
 channel = ctx.message.author.voice.channel
 voice = await channel.connect()

 # Youtube Magic
 ydl_opts = {
 'format': 'worstaudio/worst',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 }

 if "http" not in url:
 yt = YoutubeSearch(url, max_results=1).to_json()
 print(yt)
 yt_id = str(json.loads(yt)['videos'][0]['id'])
 yt_channel = str(json.loads(yt)['videos'][0]['channel']).strip().replace(" ", "")
 url = 'https://www.youtube.com/watch?v='+yt_id+"&ab_channel="+yt_channel

 with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 song_info=ydl.extract_info(url, download=False)
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file, "song.mp3")

 voice.stop()

 embed_trk = discord.Embed(
 title="Now playing",
 color=ctx.author.color,
 )
 video_title = song_info.get('title', None)
 video_channel = song_info.get('uploader', None)
 embed_trk.add_field(name="Track title", value=video_title, inline=False)
 embed_trk.add_field(name="Channel", value=video_channel, inline=False)

 await ctx.send(embed=embed_trk)
 player = await YTDLSource.from_url(url, loop=client.loop, stream=True)
 voice.play(player, after=lambda e: print(f'Player error: {e}') if e else None)
 while voice.is_playing():
 await asyncio.sleep(1)
 
 await request_record(ctx, video_title)

 else:
 await ctx.send("You must be in a voice channel to run this command")



-
Youtube-dll how to get a direct download link to the merged file without creating a temp file on server
11 juillet 2019, par CeylonDomains SolutionsIs there any way to create a direct download link to the merged file without creating a temp file on the server in youtube-dll ?
youtube-dll -f 255+160 https://youtu.be/p-flvm1szbI
The above code will merge the file and output the merged file.
I want to allow users to directly download the merged file to their computers — without creating any temp file on my server. Is this possible ?
(Creating a temp file and then letting the user download it is already possible.)