Recherche avancée

Médias (91)

Autres articles (101)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang 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, par

    Le 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, par

    L’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 codingmaster398

    Input :

    


    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 ?
enter image description here

    


  • Discord Bot can't play audio from YouTube all of a sudden

    22 mars 2023, par Aidan Tweedy

    Last 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 :

    &#xA;

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

    &#xA;

    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 ?

    &#xA;

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

    &#xA;

    @client.command(pass_context = True)&#xA;async def play(ctx):&#xA;    url = ctx.message.content.split("!play ",1)[1]&#xA;    voice = discord.utils.get(client.voice_clients)&#xA;    if (ctx.author.voice):&#xA;        if voice == None:&#xA;            channel = ctx.message.author.voice.channel&#xA;            voice = await channel.connect()&#xA;&#xA;        # Youtube Magic&#xA;        ydl_opts = {&#xA;        &#x27;format&#x27;: &#x27;worstaudio/worst&#x27;,&#xA;        &#x27;postprocessors&#x27;: [{&#xA;            &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;            &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;            &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;        }],&#xA;        }&#xA;&#xA;        if "http" not in url:&#xA;            yt = YoutubeSearch(url, max_results=1).to_json()&#xA;            print(yt)&#xA;            yt_id = str(json.loads(yt)[&#x27;videos&#x27;][0][&#x27;id&#x27;])&#xA;            yt_channel = str(json.loads(yt)[&#x27;videos&#x27;][0][&#x27;channel&#x27;]).strip().replace(" ", "")&#xA;            url = &#x27;https://www.youtube.com/watch?v=&#x27;&#x2B;yt_id&#x2B;"&amp;ab_channel="&#x2B;yt_channel&#xA;&#xA;        with yt_dlp.YoutubeDL(ydl_opts) as ydl:&#xA;            song_info=ydl.extract_info(url, download=False)&#xA;        for file in os.listdir("./"):&#xA;            if file.endswith(".mp3"):&#xA;                os.rename(file, "song.mp3")&#xA;&#xA;        voice.stop()&#xA;&#xA;        embed_trk = discord.Embed(&#xA;                title="Now playing",&#xA;                color=ctx.author.color,&#xA;        )&#xA;        video_title = song_info.get(&#x27;title&#x27;, None)&#xA;        video_channel = song_info.get(&#x27;uploader&#x27;, None)&#xA;        embed_trk.add_field(name="Track title", value=video_title, inline=False)&#xA;        embed_trk.add_field(name="Channel", value=video_channel, inline=False)&#xA;&#xA;        await ctx.send(embed=embed_trk)&#xA;        player = await YTDLSource.from_url(url, loop=client.loop, stream=True)&#xA;        voice.play(player, after=lambda e: print(f&#x27;Player error: {e}&#x27;) if e else None)&#xA;        while voice.is_playing():&#xA;            await asyncio.sleep(1)&#xA;        &#xA;        await request_record(ctx, video_title)&#xA;&#xA;    else:&#xA;        await ctx.send("You must be in a voice channel to run this command")&#xA;

    &#xA;

  • 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 Solutions

    Is 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.)