Recherche avancée

Médias (91)

Autres articles (20)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

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

Sur d’autres sites (4423)

  • Python Discord music bot stops playing a couple of minutes into any song

    9 mars 2023, par knewby

    I am trying to put together a Python Discord music bot as a fun little project. Outside of the required discord library I'm currently using the YouTube API to search for videos and parse the URL (not shown in code), yt-dlp which is a fork of yt_download that is still maintained to get the info from the YT URL, and FFMPEG to play the song obtained from yt-dlp through the bot. My play command seems to work as the 1st YT video result will start to play, but roughly 30-90 seconds into the audio, it stops playing. I get this message in the console :

    


    2023-02-23 14:54:44 IN discord.player ffmpeg process 4848 successfully terminated with return code of 0.

    


    So there is no error for me to go off of. I've included the full output from the console below...

    


    -----------------------------------
groovy-jr#6741 is up and running
-----------------------------------
2023-02-23 14:53:23 INFO     discord.voice_client Connecting to voice...
2023-02-23 14:53:23 INFO     discord.voice_client Starting voice handshake... (connection attempt 1)
2023-02-23 14:53:24 INFO     discord.voice_client Voice handshake complete. Endpoint found us-south1655.discord.media
2023-02-23 14:54:44 INFO     discord.player ffmpeg process 4848 successfully terminated with return code of 0.  <= AUDIO STOPS


    


    I'm currently developing this project on a Windows 11 machine, but I've had the issue running it on my Ubuntu machine as well. I am just hosting the bot directly from the VSCode terminal for development.

    


    I've been trying to do research on this problem, the problem is I can't find many recent information for the issue. There was another post that talked about a similar problem and had an answer suggesting the following FFMPEG options be used which I tried to no avail.

    


    FFMPEG_OPTIONS = {
                    'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
                    'options': '-vn',
                 }


    


    I'll include the problem file below :

    


    import discord
from discord.ext import commands
from discord import FFmpegPCMAudio
import responses
import youtubeSearch as YT
import yt_dlp

async def send_message(message, user_message, is_private = False):
    try:
        response = responses.handle_response(user_message)
        await message.author.send(response) if is_private else await message.channel.send(response)
    except Exception as e:
        print(e)

def run_discord_bot():
    intents = discord.Intents.default()
    intents.message_content = True

    TOKEN = 'xxxxxx'
    client = commands.Bot(command_prefix = '-', intents=intents)

    @client.event
    async def on_ready():
        print('-----------------------------------')
        print(f'{client.user} is up and running')
        print('-----------------------------------')

    @client.command(name='play', aliases=['p'], pass_context = True)
    async def play(ctx, *, search_term:str = None):
        if ctx.author.voice:
            voice = None
            if search_term == None:
                await ctx.send('No song specified.')
                return
            if not ctx.voice_client:
                channel = ctx.message.author.voice.channel
                voice = await channel.connect()
            else:
                voice = ctx.guild.voice_client
            
            url = YT.singleSearch(search_term)
            
            YTDLP_OPTIONS = {
                'format': 'bestaudio/best',
                'extractaudio': True,
                'audioformat': 'mp3',
                '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': 'ytsearch',
                'source_address': '0.0.0.0',
            }

 =====>     FFMPEG_OPTIONS = {
                'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
                'options': '-vn',
            }

            with yt_dlp.YoutubeDL(YTDLP_OPTIONS) as ydl:
                info = ydl.extract_info(url, download=False)
                playUrl = info['url']

            source = FFmpegPCMAudio(playUrl, options=FFMPEG_OPTIONS)
            voice.play(source)
        else:
            await ctx.send('You must be in a voice channel to play a song!')
            return

    @client.command(pass_context = True)
    async def leave(ctx):
        if ctx.voice_client:
            await ctx.guild.voice_client.disconnect()
        else:
            await ctx.send("I'm not in a voice channel!")

    @client.command(pass_context = True)
    async def pause(ctx):
        voice = discord.utils.get(client.voice_clients, guild = ctx.guild)
        if voice.is_playing():
            voice.pause()
        else:
            await ctx.send('No audio playing...')

    @client.command(pass_context = True)
    async def resume(ctx):
        voice = discord.utils.get(client.voice_clients, guild = ctx.guild)
        if voice.is_paused():
            voice.resume()
        else:
            await ctx.send('No audio paused...')

    @client.command(pass_context = True)
    async def stop(ctx):
        voice = discord.utils.get(client.voice_clients, guild = ctx.guild)
        voice.stop()

    client.run(TOKEN)


    


    I appreciate any guidance I can get !

    


  • android exoplayer add ffmpeg extension to my project how ?

    7 février 2023, par Malo

    I have an android application containing exoplayer instance, some udp video play without sounds , so i want to add Ffmpeg extension to my project, i am working on windows system and need to follow the instructions below :

    


    https://github.com/google/ExoPlayer/blob/release-v2/extensions/ffmpeg/README.md


    


    So first step is Set the following shell variable :
cd ""
FFMPEG_MODULE_PATH="$(pwd)/extensions/ffmpeg/src/main"

    


    i downloaded Git to use as power shell, so what is pwd ??

    


    PLus...
Set the host platform (use "darwin-x86_64" for Mac OS X) :
HOST_PLATFORM="linux-x86_64" what is this variable in windows ?

    


    Please i am confused how to build this library manually in windows and it is not straightforward at all....

    


  • ffmpeg error that causes songs to be skipped in discord.py music bot

    28 septembre 2022, par Wolfy

    I'm making a music bot in python. Sometimes when the music is playing, such an error may come out

    


    [tls @ 0x56540863c280] Error in the pull function.
[matroska,webm @ 0x565408639460] Read error
[tls @ 0x56540863c280] The specified session has been invalidated for some reason.


    


    [https @ 0x55ef3042ae80] HTTP error 403 Forbidden
https://rr5---sn-qxoedne7.googlevideo.com/videoplayback?expire=1643908737&ei=ILr7YYvvOfeA_tcP1P-O6AE&ip=34.70.213.61&id=o-AP2Y_3KL9ByYzaHpK9BTYU-rXEdyhVBdmAya4-RDcnhA&itag=249&source=youtube&requiressl=yes&mh=up&mm=31%2C26&mn=sn-qxoedne7%2Csn-5goeen7d&ms=au%2Conr&mv=u&mvi=5&pl=20&vprv=1&mime=audio%2Fwebm&ns=R7IIdhU6N1T67hOi5mk4h1gG&gir=yes&clen=1237668&dur=200.101&lmt=1643350535759614&mt=1643886547&fvip=4&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5432434&n=f5o7FLev4k11Jt4&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRQIhAI7fuWyVPY7zdiGm2FemrcqsDuQWjcqfSnLKxw66QoSwAiBOJHGVpoRCKu2ZnW3DPGxK8bKS-FfvyyxG2hRgg2TRVw%3D%3D&sig=AOq0QJ8wRQIgOWU5ecufOjhtuwQNdWX5l140N5cW7Hu01SfC9b6Zkg4CIQC0ZzrrXwUtf4qkvWZaQCEfWpOmZJhBmca0sYqqmxh75A==: Server returned 403 Forbidden (access denied)


    


    [dash @ 0x5596ac7e6460] Could not read complete fragment.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5596acb12940] Stream #0: not enough frames to estimate rate; consider increasing probesize
[dash @ 0x5596ac7e6460] Could not read complete fragment.


    


    A piece of code to launch a song :

    


    YDL_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, 'forceipv4': True,'cookies': True, 'default_search': 'auto','encoding': 'utf-8', "simulate": True, 'audioformat': "mp3",'audioquality': 5,'source_address': '0.0.0.0',"bitrate": 320000,"prefer_ffmpeg": True,"usenetrc": True,"verbose": False}
FFMPEG_OPTIONS = {'options': '-vn'}
vc.play(discord.FFmpegPCMAudio( source = URL, **FFMPEG_OPTIONS))
vc.source = discord.PCMVolumeTransformer(vc.source)
vc.source.volume = 1


    


    How do I catch these errors or how do I fix them ?