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 (5504)

  • The problem is that the music does not play Discord py bot [closed]

    7 mai 2023, par ImFoxter

    When I write the command : !yt Such a mistake :
enter image description here

    


    I also have FFMPEG, but I don't really understand what to do with it, I've already tried a lot of things and it doesn't work enter image description here
    
Please help to fix this

    


    I have an operating system : Windows
    
And the file is created
enter image description here

    


    import asyncio

import discord
import youtube_dl

from discord.ext import commands

youtube_dl.utils.bug_reports_message = lambda: ""

ytdl_format_options = {
'format': 'bestaudio/best',
'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
'restrictfilenames': True,
'noplaylist': True,
'nocheckcertificate': True,
'ignoreerrors': False,
'logtostderr': False,
'quiet': True,
'no_warnings': True,
'default_search': 'auto',
'source_address': '0.0.0.0'
}

ffmpeg_options = {"options": "-vn"}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

class YTDLSource(discord.PCMVolumeTransformer):
def __init__(self, source, \*, data, volume=0.5):
super().__init__(source, volume)

        self.data = data
    
        self.title = data.get("title")
        self.url = data.get("url")
    
    @classmethod
    async def from_url(cls, url, *, loop=None, stream=False):
        loop = loop or asyncio.get_event_loop()
        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url=url, download=not stream))
    
        if "entries" in data:
            data = data["entries"][0]
    
        file_name = data["url"] if stream else ytdl.prepare_filename(data)
        return cls(discord.FFmpegAudio(file_name, **ffmpeg_options), data=data)

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

    @commands.command(name="j")
    async def joined(self, ifx, *, channel: discord.VoiceChannel):
        if ifx.voice_client is not None:
            return await ifx.voice_client.move_to(channel)
        await channel.connect()
    
    @commands.command(name="p")
    async def playing(self, ifx, *, query):
        source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(query))
        ifx.voice_client.play(source, after=lambda e: print(f"Player error: {e}") if e else None)
        await ifx.send(content=f"New playing: {query}")
    
    @commands.command(name="yt")
    async def youtube(self, ifx, *, url):
        async with ifx.typing():
            player = await YTDLSource.from_url(url=url, loop=self.bot.loop)
            ifx.voice_client.play(
                player, after=lambda e: print(f"Player error: {e}") if e else None
            )
            await ifx.send(f"New playing: {player.title}")
    
    @commands.command(name="stream")
    async def stream(self, ifx, *, url):
        async with ifx.typing():
            player = await YTDLSource.from_url(url=url, loop=self.bot.loop, stream=True)
            ifx.voice_client.play(
                player, after=lambda e: print(f"Player error: {e}") if e else None
            )
            await ifx.send(f"New playing: {player.title}")
    
    @commands.command(name="l")
    async def leave(self, ifx):
        await ifx.voice_client.move_to(None)
    
    @playing.before_invoke
    @youtube.before_invoke
    @stream.before_invoke
    async def ensure_voice(self, ifx: commands.Context):
        if ifx.voice_client is None:
            if ifx.author.voice:
                await ifx.author.voice.channel.connect()
            else:
                await ifx.send(content="You are not connected to a voice channel")
                raise commands.CommandError(message="Author not connected to a voice channel")
        elif ifx.voice_client.is_playing():
            ifx.voice_client.stop()

async def setup(bot: commands.Bot):
await bot.add_cog(PlayMusicVoiceChannel(bot))


    


  • FFmpeg conform DASH to YouTube Live Stream requirements

    4 septembre 2023, par Aniol Pagès

    I'm trying to stream to YouTube using FFmpeg and DASH. I've generated the stream key and I'm successfully sending the generated files to YouTube. However, YouTube refuses the MPD manifest because it has two AdaptationSet (one for video and one for audio), and the documentation specifies that I should use only one for both video and audio

    


    I've tried to use the -adaptation_sets flag unsuccessfully, and also the -map flag.

    


    Here is one of the commands I've tried :
ffmpeg -re -i "/Users/user/Desktop/file.mp4" \        -map 0:v -map 0:a \        -use_template 1 -use_timeline 1 -window_size 5 -min_seg_duration 5000000 \        -f dash dash.mpd

    


    And with the -adaptation_sets flag :
ffmpeg -re -i "/Users/aniolpages/Desktop/2023-09-03 Taller colar filtrar assubtilar.mp4" -map 0 -map 0 -c:a aac -c:v libx264 \ -use_timeline 1 -use_template 1 \ -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \ -f dash dash.mpd

    


    Has someone been successful to conform the manifest to YouTube requirements ?

    


    Thank you very much !

    


  • ffmpeg rtmp broadcast on youtube speed below 1x

    23 septembre 2020, par usr6969

    i made an python and opencv program that produce frame per second around 8-15fps with MJPEG output format where MJPEG address served on localhost webserver (0.0.0.0:5000) and, i do attempt to broadcast its frame to rtmp server like youtube using ffmpeg so basically i do convert MJEG to flv and forward to rtmp server with following command ffmpeg -f  mjpeg -i http://0.0.0.0:5000/video_feed -f lavfi -i anullsrc -c:v libx264 -vf "scale=trunc(oh*a/2)*2:320,unsharp=lx=3:ly=3:la=1.0" -crf 24 -c:a aac -ac 1 -f flv rtmp://a.rtmp.youtube.com/live2/xxx-xxx-xxx but unfortunatelly youtube stream has too many buffering that occur every around 5 second and ffmpeg terminal tell that writing speed is only around 0.317x (expected to be sync with youtube around 0.99-1x), my question is

    


    does there a way to stream 'realtime' around 8-15fps and automatically sync with youtube rtmp server without buffering because i thought that youtube require around 30fps while my fps only 9-15fps that probably causing buffer.
do there an such like additional ffmpeg's parameter that able to speed up writing ? thank you

    


    enter image description here

    


    enter image description here