Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (65)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (5411)

  • Modify the ffmpeg command to work with more than one image

    16 avril 2024, par Koi Farm ĐaMi

    ffmpeg -y -i image.jpg -filter_complex "[0:v] scale=1280 :-1,loop=-1:size=2,trim=0:40,setpts=PTS-STARTPTS,setsar=1,crop='w=1280:h=720:x=0:y=min(max(0, t - 3), (40 - 3 - 3)) / (40 - 3 - 3) * (ih-oh)'" unix.mp4

    


    I want to edit the above command so it can be used for multiple images or a folder containing many images. And give all images used the same size and aspect ratio. Please help me, thank you everyone.

    


  • FFmpeg stream map doesn't work any more

    5 mai 2016, par Tommy

    I have troubles to get for example first stream from MKV file. Strange is that my script used to work on older Debian and same code doesn’t work on Debian 8. I checked also manual and there is the same :

    ffmpeg -i INPUT -map 0:1 out.wav

    Do you know what is wrong ?

    Thank you

       tommy@reco1:/home/www/media/20$ ffmpeg -i /home/www/media/21/21.mkv -map 0:1 /var/www/vids/21/new.mkv  
    ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Debian 4.9.2-10)
     configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Guessed Channel Layout for  Input Stream #0.2 : mono
    Guessed Channel Layout for  Input Stream #0.3 : mono
    Guessed Channel Layout for  Input Stream #0.4 : stereo
    Input #0, matroska,webm, from '/home/www/media/21/21.mkv':
     Metadata:
       MINOR_VERSION   : 0
       COMPATIBLE_BRANDS: mp42isom
       MAJOR_BRAND     : mp42
       ENCODER         : Lavf56.25.101
     Duration: 00:01:30.16, start: 0.000000, bitrate: 3512 kb/s
       Stream #0:0(und): Video: h264 (Main), yuv420p(tv), 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
       Stream #0:1: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
       Metadata:
         ENCODER         : Lavc56.56.101 pcm_s16le
       Stream #0:2: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
       Metadata:
         ENCODER         : Lavc56.56.101 pcm_s16le
       Stream #0:3: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
       Metadata:
         ENCODER         : Lavc56.56.101 pcm_s16le
       Stream #0:4(und): Audio: pcm_s16le, 16000 Hz, 2 channels, s16, 512 kb/s (default)
       Metadata:
         LANGUAGE        : und
         ENCODER         : Lavc56.56.101 pcm_s16le
    /var/www/vids/21/new.mkv: No such file or directory
  • FFmpegPCMaudio doesn't work on my server but it works on my computer

    4 mai 2023, par Alex

    I am developing a Discord bot with python that can play music. When I do the tests on my computer all work find but when I take all the files to put there in my server it stop working. So I tried to run it on an other computer and no, it still does not work.

    


    First I was thinking it was a power problems but the other computer is almost the same. I tried to install all the packages that I have on my computer to the second but the music part still not work. It's not a Discord API problem because my others commands work find.

    


    import discord
from discord.ext import commands
from youtube_dl import YoutubeDL


class music_cog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

        # all the music related stuff
        self.is_playing = False

        # 2d array containing [song, channel]
        self.music_queue = []
        self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
        self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
                               'options': '-vn'}

        self.vc = ""

    # searching the item on youtube
    def search_yt(self, item):
        with YoutubeDL(self.YDL_OPTIONS) as ydl:
            try:
                info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'][0]
            except Exception:
                return False

        return {'source': info['formats'][0]['url'], 'title': info['title']}

    def play_next(self):
        if len(self.music_queue) > 0:
            self.is_playing = True

            # get the first url
            m_url = self.music_queue[0][0]['source']

            # remove the first element as you are currently playing it
            self.music_queue.pop(0)

            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
        else:
            self.is_playing = False

    # infinite loop checking
    async def play_music(self):
        if len(self.music_queue) > 0:
            self.is_playing = True

            m_url = self.music_queue[0][0]['source']

            # try to connect to voice channel if you are not already connected

            if self.vc == "" or not self.vc.is_connected() or self.vc == None:
                self.vc = await self.music_queue[0][1].connect()
            else:
                await self.vc.move_to(self.music_queue[0][1])

            print(self.music_queue)
            # remove the first element as you are currently playing it
            self.music_queue.pop(0)

            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
        else:
            self.is_playing = False

    @commands.command(name="play", help="Plays a selected song from youtube")
    async def p(self, ctx, *args):
        query = " ".join(args)

        voice_channel = discord.utils.get(ctx.guild.voice_channels, name='General')
        if voice_channel is None:
            # you need to be connected so that the bot knows where to go
            await ctx.send("Connect to a voice channel!")
        else:
            song = self.search_yt(query)
            if type(song) == type(True):
                await ctx.send(
                    "Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")
            else:
                await ctx.send("Song added to the queue")
                self.music_queue.append([song, voice_channel])

                if self.is_playing == False:
                    await self.play_music()

    @commands.command(name="queue", help="Displays the current songs in queue")
    async def q(self, ctx):
        retval = ""
        for i in range(0, len(self.music_queue)):
            retval += self.music_queue[i][0]['title'] + "\n"

        print(retval)
        if retval != "":
            await ctx.send(retval)
        else:
            await ctx.send("No music in queue")

    @commands.command(name="skip", help="Skips the current song being played")
    async def skip(self, ctx):
        if self.vc != "" and self.vc:
            self.vc.stop()
            # try to play next in the queue if it exists
            await self.play_music()

    @commands.command(name="disconnect", help="Disconnecting bot from VC")
    async def dc(self, ctx):
        await self.vc.disconnect()

    @commands.command(name="pause")
    async def pause(self, ctx):
        voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
        if voice.is_playing():
            voice.pause()
        else:
            await ctx.send("Currently no audio is playing.")

    @commands.command(name="resume")
    async def resume(self, ctx):
        voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
        if voice.is_paused():
            voice.resume()
        else:
            await ctx.send("The audio is not paused.")


    


    There are not any error messages, the bot just joins the voice chat and does nothing.

    


    If someone can tell me we it work just on my computer I will be very grateful.

    


    My files :
my files