Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (72)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (9868)

  • How to replace the video track in a video file with a still image ?

    22 février 2021, par cornerstore

    I am trying to use ffmpeg to replace the video track in a video file with a still image. I tried some commands I got from other questions such as the one here

    &#xA;

    ffmpeg -i x.png -i orig.mp4 final.mp4

    &#xA;

    ffmpeg -r 1/5 -i x.png -r 30 -i orig.mp4 final.mp4

    &#xA;

    But these didn't work. I'm not sure which of these arguments are required or not. The output should be accepted by YouTube as a valid video - I was able to simply remove the video track, but apparently they don't let you upload a video without a video track.

    &#xA;

  • Discord music bot doesn't play songs

    9 octobre 2023, par Gam3rsCZ

    I have made myself a discord bot that also plays music(it's only for my server so strings with messages are in Czech, but code is in English).&#xA;Bot worked a while ago but now it stopped, and I don't know where the problem is

    &#xA;

    I'm getting these errors : HTTP error 403 Forbidden Server returned 403 Forbidden (access denied) and&#xA;C :\Users\Me\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\player.py:711 : RuntimeWarning : coroutine 'music_cog.play_next' was never awaited&#xA;self.after(error)&#xA;RuntimeWarning : Enable tracemalloc to get the object allocation traceback&#xA;[2023-10-09 16:23:47] [INFO ] discord.player : ffmpeg process 17496 successfully terminated with return code of 1.&#xA;INFO : ffmpeg process 17496 successfully terminated with return code of 1.

    &#xA;

    My code is :

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;from yt_dlp import YoutubeDL&#xA;&#xA;class music_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;        self.current = ""&#xA;&#xA;        self.music_queue = []&#xA;        self.YDL_OPTIONS = {"format": "m4a/bestaudio/best", "noplaylist": "True"}&#xA;        self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}&#xA;&#xA;        self.vc = None&#xA;&#xA;    def search_yt(self, item):&#xA;        with YoutubeDL(self.YDL_OPTIONS) as ydl:&#xA;            try:&#xA;                info = ydl.extract_info("ytsearch:%s" % item, download=False)["entries"][0]&#xA;            except Exception:&#xA;                return False&#xA;        info = ydl.sanitize_info(info)&#xA;        url = info[&#x27;url&#x27;]&#xA;        title = info[&#x27;title&#x27;]&#xA;        return {&#x27;title&#x27;: title, &#x27;source&#x27;: url}&#xA;&#xA;    async def play_next(self):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;            self.current = self.music_queue[0][0]["title"]&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            self.music_queue.pop(0)&#xA;&#xA;            await self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e:  self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    async def play_music(self, ctx):&#xA;        try:&#xA;            if len(self.music_queue) > 0:&#xA;                self.is_playing = True&#xA;                m_url = self.music_queue[0][0]["source"]&#xA;&#xA;                if self.vc == None or not self.vc.is_connected():&#xA;                    self.vc =  await self.music_queue[0][1].connect()&#xA;&#xA;                    if self.vc == None:&#xA;                        await ctx.send("Nepodařilo se připojit do hlasov&#xE9;ho kan&#xE1;lu.")&#xA;                        return&#xA;                else:&#xA;                    await self.vc.move_to(self.music_queue[0][1])&#xA;&#xA;                self.current = self.music_queue[0][0]["title"]&#xA;                self.music_queue.pop(0)&#xA;&#xA;                self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;            else:&#xA;                self.is_playing = False&#xA;&#xA;        except:&#xA;            print("Something went wrong")&#xA;            await ctx.send(content="Něco se pokazilo")&#xA;&#xA;    @commands.command(name="play", help="Plays selected song from YouTube")&#xA;    async def play(self, ctx, *args):&#xA;        query = " ".join(args)&#xA;&#xA;        voice_channel = ctx.author.voice.channel&#xA;        if voice_channel is None:&#xA;            await ctx.send("Připojte se do hlasov&#xE9;ho kan&#xE1;lu!")&#xA;        elif self.is_paused:&#xA;            self.vc.resume()&#xA;        else:&#xA;            song = self.search_yt(query)&#xA;            if type(song) == type(True):&#xA;                await ctx.send("P&#xED;sničku se nepodařilo st&#xE1;hnout. Špatn&#xFD; form&#xE1;t, možn&#xE1; jste se pokusili zadat playlist nebo livestream.")&#xA;            else:&#xA;                await ctx.send("P&#xED;snička přid&#xE1;na do řady.")&#xA;                self.music_queue.append([song, voice_channel])&#xA;&#xA;                if self.is_playing == False:&#xA;                    await self.play_music(ctx)&#xA;                    self.is_playing = True&#xA;&#xA;    @commands.command(name="pause", aliases=["p"], help="Pauses the BOT")&#xA;    async def pause(self, ctx, *args):&#xA;        if self.is_playing:&#xA;            self.is_playing = False&#xA;            self.is_paused = True&#xA;            self.vc.pause()&#xA;            await ctx.send(content="P&#xED;snička byla pozastavena.")&#xA;            &#xA;        elif self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;            await ctx.send(content="P&#xED;snička byla obnovena.")&#xA;&#xA;    @commands.command(name="resume", aliases=["r"], help="Resumes playing")&#xA;    async def resume(self, ctx, *args):&#xA;        if self.is_paused:&#xA;            self.is_paused = False&#xA;            self.is_playing = True&#xA;            self.vc.resume()&#xA;            await ctx.send(content="P&#xED;snička byla obnovena.")&#xA;&#xA;    @commands.command(name="skip", aliases=["s"], help="Skips current song")&#xA;    async def skip(self, ctx, *args):&#xA;        if self.vc != None and self.vc:&#xA;            self.vc.stop()&#xA;        await self.play_next()&#xA;        await ctx.send(content="P&#xED;snička byla přeskočena.")&#xA;&#xA;    @commands.command(name="queue", aliases=["q"], help="Displays song queue")&#xA;    async def queue(self, ctx, songs=5):&#xA;        retval = ""&#xA;&#xA;        for i in range(0, len(self.music_queue)):&#xA;            if i > songs: break&#xA;            retval &#x2B;= "    " &#x2B; self.music_queue[i][0]["title"] &#x2B; "\n"&#xA;&#xA;        if retval != "":&#xA;            retval &#x2B;= "```"&#xA;            await ctx.send(content=("```Aktu&#xE1;ln&#xED; fronta:\n" &#x2B; retval))&#xA;        else:&#xA;            await ctx.send("Řada je pr&#xE1;zdn&#xE1;.")&#xA;&#xA;    @commands.command(name="clear", help="Clears the queue")&#xA;    async def clear(self, ctx):&#xA;        if self.vc != None and self.is_playing:&#xA;            self.vc.stop()&#xA;        self.music_queue = []&#xA;        await ctx.send("Řada byla vymaz&#xE1;na.")&#xA;&#xA;    @commands.command(name="leave", aliases=["dc", "disconnect"], help="Disconnects the BOT")&#xA;    async def leave(self, ctx):&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;&#xA;        if self.vc != None:&#xA;            return await self.vc.disconnect(), await ctx.send(content="BOT byl odpojen.")&#xA;&#xA;        else:&#xA;            return await ctx.send("BOT nen&#xED; nikde připojen.")&#xA;   &#xA;    @commands.command(name="current", help="Displays the current song")&#xA;    async def current(self, ctx):&#xA;        current = self.current&#xA;        retval = f"```Pr&#xE1;vě hraje:\n    {current}```"&#xA;        if current != "":&#xA;            await ctx.send(retval)&#xA;        else:&#xA;            await ctx.send("Aktu&#xE1;lně nic nehraje.")&#xA;

    &#xA;

    I already tried everything I can think of(which isn't a lot because I suck at programming), and also tried searching for some solution on the internet, but nothing worked.

    &#xA;

  • After merge videos, the duration is too long - ffmpeg

    20 février 2017, par Thanh Dao

    I have file txt with content

    file intro.mp4
    file video.mp4
    file outtro.mp4

    with duration by 10s, 178s, 13s.

    I use ffmpeg to merge 3 files into one with below command :

    ffmpeg -f concat -i "file.txt" -vcodec copy -acodec copy "endfile.mp4"

    The duration of endfile.mp4 is longer 11 mins (660s).

    I have a question that which params of video affect to merge? And which common params to merge another videos?

    My English really too bad. Sorry for it :)
    Good working this week !

    P/S Details infor of files :

    intro.mp4 :

    ffprobe version N-82885-g6d09d6e Copyright (c) 2007-2016 the FFmpeg developers<br />
       built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)<br />
       configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --<br />bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame<br /> --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265<br />
       libavutil      55. 43.100 / 55. 43.100<br />
       libavcodec     57. 68.100 / 57. 68.100<br />
       libavformat    57. 61.100 / 57. 61.100<br />
       libavdevice    57.  2.100 / 57.  2.100<br />
       libavfilter     6. 68.100 /  6. 68.100<br />
       libswscale      4.  3.101 /  4.  3.101<br />
       libswresample   2.  4.100 /  2.  4.100<br />
       libpostproc    54.  2.100 / 54.  2.100<br />
     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/path/to/intro.mp4':<br />
       Metadata:<br />
       major_brand     : isom<br />
       minor_version   : 512<br />
       compatible_brands: isomiso2avc1mp41<br />
       encoder         : Lavf56.23.100<br />
     Duration: 00:00:10.08, start: -0.013061, bitrate: 701 kb/s<br />
       Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)<br />
       Metadata:<br />
       handler_name    : SoundHandler<br />
       Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 853 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)<br />
     Metadata:<br />
       handler_name    : VideoHandler<br />

    outtro.mp4 :

    ffprobe version N-82885-g6d09d6e Copyright (c) 2007-2016 the FFmpeg developers<br />
       built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)<br />
       configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --<br />bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame<br /> --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265<br />
       libavutil      55. 43.100 / 55. 43.100<br />
       libavcodec     57. 68.100 / 57. 68.100<br />
       libavformat    57. 61.100 / 57. 61.100<br />
       libavdevice    57.  2.100 / 57.  2.100<br />
       libavfilter     6. 68.100 /  6. 68.100<br />
       libswscale      4.  3.101 /  4.  3.101<br />
       libswresample   2.  4.100 /  2.  4.100<br />
       libpostproc    54.  2.100 / 54.  2.100<br />
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/path/to/outtro.mp4':<br />
    Metadata:<br />
       major_brand     : isom<br />
       minor_version   : 512<br />
       compatible_brands: isomiso2avc1mp41<br />
       encoder         : Lavf56.23.100<br />
    Duration: 00:00:13.08, start: -0.013061, bitrate: 481 kb/s<br />
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)<br />
    Metadata:<br />
       handler_name    : SoundHandler<br />
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 392 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)<br />
    Metadata:<br />
       handler_name    : VideoHandler<br />

    video.mp4

    ffprobe version N-82885-g6d09d6e Copyright (c) 2007-2016 the FFmpeg developers<br />
       built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)<br />
       configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --<br />bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame<br /> --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265<br />
       libavutil      55. 43.100 / 55. 43.100<br /><br />
       libavcodec     57. 68.100 / 57. 68.100<br /><br />
       libavformat    57. 61.100 / 57. 61.100<br /><br />
       libavdevice    57.  2.100 / 57.  2.100<br /><br />
       libavfilter     6. 68.100 /  6. 68.100<br /><br />
       libswscale      4.  3.101 /  4.  3.101<br /><br />
       libswresample   2.  4.100 /  2.  4.100<br /><br />
       libpostproc    54.  2.100 / 54.  2.100<br /><br />
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'path/to/video.mp4':<br />
       Metadata:<br />
           major_brand     : isom<br />
           minor_version   : 512<br />
           compatible_brands: isomiso2avc1mp41<br />
           encoder         : Lavf57.61.100<br />
       Duration: 00:02:58.38, start: 0.000000, bitrate: 922 kb/s<br />
           Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 782 kb/s, 29.97 fps, 29.97 tbr, 30k <br />tbn, 59.94 tbc (default)<br />
           Metadata:<br />
               handler_name    : VideoHandler<br />
           Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 130 kb/s (default)<br />
           Metadata:<br />
               handler_name    : SoundHandler<br />