Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (24)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (5912)

  • How can I improve the frame rate of my Raspberry Pi to YouTube stream ?

    2 août 2021, par RDowns

    I am using a Raspberry Pi 4 2GB to live stream to YouTube.

    


    The performance is pretty poor at the moment as I am trying to go through terminal and I feel the setting's are not correct. Performance is OK however if I go directly through YouTube studio and use the 'Webcam' option instead of 'Stream'.

    


    These are the settings that I am currently using :

    


    raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -threads 0 -f v4l2 -i /dev/video0 -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 128k -strict experimental -s 640x480 -b 6000000 -aspect 16:9 -vcodec h264_omx -vb 820k -pix_fmt yuv420p -g 60 -r 30 -f

    


    What options can I change in this command to improve the frame rate and give better performance ?

    


  • 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 !

    


  • FFMPEG command runs but youtube livestream is not displayed [closed]

    21 septembre 2023, par Ngọc Hoa Dương

    I have a video on google drive and I use the ffmpeg command to livestream it on youtube
    
ffmpeg.exe -stream_loop -1 -re -i "https://drive.google.com/uc?export=preview&id=1rfKpTYrV62FnuZsfeWc96zt3Xl6NhZ0v" -vcodec copy -acodec copy -g 1 -f flv -flvflags no_duration_filesize rtmp://a.rtmp.youtube.com/live2/KEY
    
The command run good

    


    enter image description here
    
, but no livestream show in youtube
    
enter image description here