Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (92)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (6642)

  • Command raised an exception : NameError : name 'player' is not defined

    20 mars 2023, par baartys

    I finally got myself a hosting for my project, but got into an error and I don't know how to resolve it.
I ran command !play to start streaming in vc, but I got this error :

    


    2023-03-19 18:36:04 INFO     discord.client logging in using static token
2023-03-19 18:36:04 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: f983009c9f2881b87ee119278692efc9).
Eurobeat Radio is running!
2023-03-19 18:36:10 ERROR    discord.ext.commands.bot Ignoring exception in command play
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/container/radio.py", line 44, in play
    player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
NameError: name 'player' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1023, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 238, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'player' is not defined


    


    I tried running it on my pc and that was without error, but once it was on the hosting it ran in to the error up the page.

    


    Here is the code :

    


    import discord
import urllib.request, json 
from discord import FFmpegPCMAudio
from discord.ext import commands
from discord.ext import tasks
client= commands.Bot(command_prefix="er!", intents=discord.Intents.all(), help_command=None)

@tasks.loop(seconds=10.0)
async def my_background_task():
    """Will loop every 60 seconds and change the bots presence"""
    with urllib.request.urlopen('https://api.laut.fm/station/eurobeat/current_song') as url:
        data = json.load(url)
        global namestatus
        global artiststatus
        namestatus = data['title']
        artiststatus = data['artist']['name']
    await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="Eurobeat FM"))
    await client.change_presence(activity=discord.Game(name="Para para dancing ~"))
    await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f"{namestatus} by {artiststatus}"))


@client.event
async def on_ready():
    print('Eurobeat Radio is running!')
    await client.wait_until_ready()
    my_background_task.start()


@client.event
async def on_voice_state_update(member, prev, cur):
    if client.user in prev.channel.members and len([m for m in prev.channel.members if not m.bot]) == 0:
        channel = discord.utils.get(client.voice_clients, channel=prev.channel)
        await channel.disconnect()

@client.command(aliases=['p', 'pla', 'join', 'j'])
async def play(ctx, url: str = 'http://stream.eurobeat.xyz'): 
    channel = ctx.message.author.voice.channel
    global player
    try:
        player = await channel.connect()
    except:
        pass
    player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
    embedVar = discord.Embed(title="Started Playing!", color=discord.Color.random())
    await ctx.send(embed=embedVar)


    


    Would be very grateful for your help !

    


  • ffmpeg segments only the first part of my audio file

    30 juin 2012, par hammat

    I'm implementing a http live streaming server to send audio file to iOS devices.
    No problem with Apple's tools, mediafilesegmenter, my files are valid and it works fine.

    I'm trying now to segment the same file using ffmpeg. I've downloaded the last stable version which is the 0.10.2 for now.

    Here is how I try to segment my mp3 file :

    ./ffmpeg -re -i input.mp3 -f segment -segment_time 10 -segment_list outputList.m3u8 -acodec libmp3lame -map 0 output%03d.mp3

    It starts the mapping like expected but finish with only one .mp3 file.

    Did I miss something in the process ?
    Thanks in advance.

    edit

    Ok here is my latest command line :

    ffmpeg -i input.mp3 -c:a libmp3lame -b:a 128k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mp3 'output%03d.mp3'

    It still gives me only one file but the file is the hole song, not only one part.
    Here is the output of ffmpeg :

    ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
    built on Apr 20 2012 07:08:29 with gcc 4.5.2  
    configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libmp3lame  
       libavutil      51. 35.100 / 51. 35.100  
       libavcodec     53. 61.100 / 53. 61.100  
       libavformat    53. 32.100 /
           53. 32.100  
       libavdevice    53.  4.100 / 53.  4.100  
       libavfilter     2. 61.100 /  2. 61.100  
       libswscale      2.  1.100 /  2.  1.100  
       libswresample   0.  6.100 /  0.  6.100  
       libpostproc    52.  0.100 /  52.  0.100
       [mp3 @ 0x8e4f120] max_analyze_duration 5000000 reached at 5015510
    Input #0, mp3, from 'BeachHouse-Myth.mp3':  
       Metadata:
               title           : Myth
               artist          : Beach House
               track           : /
               album           : Bloom
               disc            : /
               genre           : Alternative
               TSRC            : USSUB1296501  
       Duration: 00:04:18.69, start: 0.000000, bitrate: 320 kb/s
               Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s Output #0, segment, to 'stream%03d.mp3':   Metadata:
               title           : Myth
               artist          : Beach House
               track           : /
               album           : Bloom
               disc            : /
               genre           : Alternative
               TSRC            : USSUB1296501
               encoder         : Lavf53.32.100
               Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
    Stream mapping:  
       Stream #0:0 -> #0:0 (mp3 -> libmp3lame)
       Press [q] to stop, [?] for help
       Truncating packet of size 1024 to 105ate=   0.0kbits/s    
       Truncating packet of size 1024 to 1
       size=       0kB time=00:04:18.71 bitrate=   0.0kbits/s     video:0kB audio:4042kB global headers:0kB muxing overhead -100.000000%
  • Faster way of getting number of key frames than "show_frames" in ffprobe ?

    19 novembre 2016, par Will Tower

    I’m making a little in-house utility using ffmpg and ffprobe. Works fine and does what is needed : give a count of the number of key frames in a video file plus some other details.

    Alas, with the large video files this will be used on it can take many seconds for show_frames to return – and I then have to parse the JSON dump of frame data and keep a running count of the total key frames.

    Is there a faster way ? Perhaps it is listed in the "stream" or "format" data dumps and I am not recognizing what it is being called ? I’ve been through the ffmpg and ffprobe docs and didn’t find anything else.