Recherche avancée

Médias (91)

Autres articles (19)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (4705)

  • How to overwrite file with ffmpeg when opened with pygame.mixer.music

    11 février 2015, par Lewistrick

    I have this interesting situation in which I want to convert a lot of audio fragments using ffmpeg via subprocess.check_call() and then play them using pygame.mixer.music.play().
    But because there would be a lot of small files when converting all of them, I want to overwrite the file every time, calling it tmp.wav.

    Converting goes as follows :

    outfilename = "tmp.wav"
    proc_args  = ["ffmpeg"]
    proc_args += ["-ss", str(begin / 1000)]
    proc_args += ["-i", os.path.join(audiodir, infilename)]
    proc_args += ["-to", str(duration / 1000)]
    proc_args += ["-ar", str(AUDIORATE)] # sample frequency (audio rate)
    proc_args += ["-y"]
    proc_args += [outfilename]
    DEVNULL = open(os.devnull, 'wb')
    try:
       subprocess.check_call(proc_args, stdout = DEVNULL, stderr = DEVNULL)
       # print "Converting audio succeeded."
    except subprocess.CalledProcessError as e:
       print "Converting audio failed."
       return 0.

    Playing goes as follows :

    pygame.mixer.music.load(outfilename)
    pygame.mixer.music.play()

    Now, a problem arises. The first file is converted and played correctly. But when skipping to the next file, tmp.wav can’t be overwritten. I think this is due to the fact that the file is still opened in the music module, but that doesn’t say how to close the file. I already tried pygame.mixer.music.stop(), pygame.mixer.quit() and pygame.mixer.stop() before converting the new file, but none of them works.

    How do I solve this problem ?

  • discord.py and ffmpeg : Play a sound effect while playing music

    26 juin 2022, par JPhusion

    I would like to play a sound effect while playing music in a vc using discord.py and ffmpeg. I know you cannot play more than one audio source at a time, so instead I am trying to pause the music, play the sound effect and continue the music.

    


    This is what I've come up with so far, but because I am playing the sound effect, the resume() method no longer works after the pause().

    


    @commands.command()
    async def sfx(self, ctx):
        try:
            voice = await ctx.author.voice.channel.connect()
        except:
            voice = ctx.guild.voice_client
        try:
            voice.pause()
            # voice.play(discord.FFmpegPCMAudio('./media/sfx/notification.mp3'))
        except:
            voice.pause()
            # voice.play(discord.FFmpegPCMAudio(executable=r"C:\Users\josh\Programming\Discord\ffmpeg\bin\ffmpeg.exe", source='./media/sfx/notification.mp3'))
        guild = self.client.get_guild(752756902525403156)
        member = guild.get_member(876292773639233596)
        print(member.activities[0].name)
        await asyncio.sleep(1)
        voice.resume()
        if member.activities[0].name == "Not playing music":
            await voice.disconnect()


    


  • Adding background music that fades out with ffmpeg

    15 septembre 2019, par malbolge

    I have a piece of video that is 30fps and simply want to add overlay faint background music starting at 10 seconds. Then I want it to fade out during the last 15 seconds. I can’t find any good examples of this other than weird hacks.

    ffmpeg -i main.mp4 -i outro.mp3 -t 10 \
     -filter_complex "[a0][1:a]acrossfade=d=15[a];weight1:0.5" \
     -map '[v]' -map '[a]' out.mp4

    I get bad arguments in the filter_complex. Somethings off right there. in terms of the duration. Any help is greatly appreciated !!