Recherche avancée

Médias (0)

Mot : - Tags -/albums

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (55)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6338)

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

  • FFmpeg streaming to youtube very slowly

    3 avril 2022, par codingmaster398

    Input :

    &#xA;

    const runCommand = require(&#x27;./runCommand&#x27;)&#xA;&#xA;runCommand(&#xA;    &#x27;ffmpeg&#x27;,&#xA;    `-threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 512 \&#xA;-loop 1 -i ./place.png \&#xA;-stream_loop -1 \&#xA;-i ./track.mp3 \&#xA;-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}`,&#xA;    (data) => console.log(data),&#xA;    () => console.log(&#x27;finished&#x27;)&#xA;  )&#xA;

    &#xA;

    Output :

    &#xA;

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

    &#xA;

    Why is my FPS so low when streaming to Youtube ?

    &#xA;

    P.S. The process is using very low memory and CPU, can I sacrifice a bit more for it ?&#xA;enter image description here

    &#xA;

  • How to use ffmpeg on Android, Kivy, python3, youtube-dl

    7 avril 2022, par Adarsh Singh

    I am trying to create an app using Kivy 1.11.1 using youtube-dl module in python3. I am using buildozer to create apk from python source code which usage python-for-android to create apk. I have mentioned ffmpeg in buildozer requirements. I can see ffmpeg in pythonforandroid/recipes/.&#xA;After installing form apk, when I try to print ffmpeg version using the following

    &#xA;

    merger = youtube_dl.postprocessor.FFmpegMergerPP()&#xA;merger._determine_executables()&#xA;print(merger.get_versions())&#xA;

    &#xA;

    I get this output

    &#xA;

    {&#x27;avprobe&#x27;: False, &#x27;avconv&#x27;: False, &#x27;ffmpeg&#x27;: False, &#x27;ffprobe&#x27;: False}&#xA;

    &#xA;

    which indicate that ffmpeg in not installed in android

    &#xA;

    this line is included in my buildozer.spec

    &#xA;

    requirements = python3,kivy,ffmpeg,youtube_dl,kivymd,kivmob,ffpyplayer,ffpyplayer_codecs,ffmpeg-python&#xA;

    &#xA;

    except ffmpeg rest all package are installed properly

    &#xA;

    I am not sure whether this is useful but I saw this in pythonforandroid/recipes/ffmpeg/init.py

    &#xA;

    def build_arch(self, arch):&#xA;        with current_directory(self.get_build_dir(arch.arch)):&#xA;            env = arch.get_env()&#xA;&#xA;            flags = [&#x27;--disable-everything&#x27;]&#xA;

    &#xA;

    **Goal : ** I want to use ffmpeg in youtube_dl via python3 after installing application from apk created by buildozer.

    &#xA;