Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (41)

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (4744)

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

    


  • Stream input to stream output using avserver

    13 janvier 2014, par Gustavo Sgarbi Campos

    I'm trying to use the avserver package to re-stream my ip camera's stream in order to be able to record this stream and access it remotelly without having to stream it twice from the camera, to avoid overloading the wireless network.

    Following this link https://libav.org/avserver.html I came up with the following command :

    avserver -f /etc/avserver.conf & avconv -i http://user:password@192.168.1.121/videostream.asf http://localhost:80/feed1.ffm

    This gives me the following output

    avserver version 0.8.3-6:0.8.3-6ubuntu2, Copyright (c) 2000-2012 the Libav developers
    built on Oct  1 2012 15:03:26 with gcc 4.7.2
    avconv version 0.8.3-6:0.8.3-6ubuntu2, Copyright (c) 2000-2012 the Libav developers
    built on Oct  1 2012 15:03:26 with gcc 4.7.2
    Mon Jan 13 20:13:44 2014 AVserver started.
    [asf @ 0x153cac0] max_analyze_duration reached
    [asf @ 0x153cac0] Estimating duration from bitrate, this may be inaccurate
    Input #0, asf, from 'http://admin:gafit@192.168.1.121/videostream.asf':
    Duration: N/A, start: 0.000000, bitrate: 32 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 100 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: adpcm_ima_wav, 8000 Hz, 1 channels, s16, 32 kb/s
    Incompatible pixel format 'yuvj422p' for codec 'mpeg1video', auto-selecting format 'yuv420p'
    [buffer @ 0x153ec80] w:320 h:240 pixfmt:yuvj422p
    [avsink @ 0x1544820] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x1543460] w:320 h:240 fmt:yuvj422p -> w:320 h:240 fmt:yuv420p flags:0x4
    [mp2 @ 0x1544aa0] Requested sampling rate unsupported using closest supported (16000)
    Mon Jan 13 20:13:50 2014 Feed '/tmp/feed1.ffm.ffm' stream number does not match registered feed
    Output #0, ffm, to 'http://localhost:80/feed1.ffm':
    Metadata:
    encoder         : Lavf53.21.0
    Stream #0.0: Video: mpeg1video, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1000k tbn, 60 tbc
    Stream #0.1: Audio: mp2, 16000 Hz, 1 channels, s16, 128 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (mjpeg -> mpeg1video)
    Stream #0:1 -> #0:1 (adpcm_ima_wav -> mp2)
    Press ctrl-c to stop encoding
    Mon Jan 13 20:13:50 2014 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 4096

    When I try to open this stream via VLC, using

    http://192.168.1.15/test.asf

    I get the following additional output

    Mon Jan 13 20:17:39 2014 192.168.1.6 - - [GET] "/test.asf HTTP/1.1" 200 115s dup=12210 drop=0    
    Mon Jan 13 20:17:39 2014 Codec for stream 0 does not use global headers but container format requires global headers
    Mon Jan 13 20:17:39 2014 Codec for stream 1 does not use global headers but container format requires global headers

    And I get nothing on VLC. I'm not quite sure what is going on or how to fix it, so any enlightning on this would be very welcome.

    Thank you all in advance !

  • X264 : How to compile x264 with swscale support ?

    23 avril 2014, par user1884325

    Objective

    I am trying to build :

    • an x264 static library (.lib) with swscale support. I would like to use this library in a Visual Studio project where 24-bit RGB bitmap images are :

      1. Converted from RGB to YUV2
      2. The converted image is sent to the x264 encoder
      3. and the output of the encoder is streamed to a remote IP-endpoint via UDP.
    • an x264 executable (.exe) with swscale support. I would like to use the executable for the same purpose as described above. In another Visual Studio project, I will start the x264.exe up as a separate process and pipe bitmap data to the x264 process via its stdin and read out the encoded data from the process’s stdout.

    Problem

    I am having some trouble figuring out how to compile with swscale support. I need swscale support for both the executable and the library.

    Status

    So far I have downloaded the latest x264 source from the x264 website.

    I have installed MINGW on my machine and when I run ’configure’ and ’make’ I get the x264 static library - but without swscale support.

    I haven’t been able to find a detailed step-by-step guide on how to include swscale in the x264 library. The closest I’ve come to a description is this discussion :

    http://forum.doom9.org/showthread.php?t=165350

    So I downloaded libpack from :

    http://komisar.gin.by/mingw/index.html

    and extracted it to my harddrive :

    Then I executed ’make’ and ’configure’ (again) in my x264 directory :

    ./configure --extra-cflags="-I/m/somePath/libpack/libpack/libpack/include" --extra-ldflags="-L/m/somePath/libpack/libpack/libpack/lib"

    I have the following in the lib and include directory :

    lib directory

    incl directory

    When I execute the above ’configure’ I get :

    platform:      X86
    system:        WINDOWS
    cli:           yes
    libx264:       internal
    shared:        no
    static:        no
    asm:           yes
    interlaced:    yes
    avs:           avisynth
    lavf:          no
    ffms:          no
    mp4:           lsmash
    gpl:           yes
    thread:        win32
    opencl:        yes
    filters:       crop select_every
    debug:         no
    gprof:         no
    strip:         no
    PIC:           no
    bit depth:     8
    chroma format: all

    You can run 'make' or 'make fprofiled' now.
    bash.exe"-3.1$

    When I execute ’make’ I end up with this error :

    gcc.exe: error: unrecognized command line option '-fomit-frame-poin'
    gcc.exe: fatal error: no input files
    compilation terminated.
    make: *** [.depend] Error 1
    bash.exe"-3.1$

    Question
    What am I doing wrong ??