Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (33)

  • 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 (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (2546)

  • Discord Voice Bot cannot play the audio file

    7 avril 2023, par Jakub Nawrocki

    I tried to write a bot that will join the voice channel and play a audio at 20:00.

    


    Currently the bot joins the channel, but immediately after that it disconnects without making a single sound with this message :

    


    2023-04-07 17:58:01 INFO     discord.player ffmpeg process 18258 has not terminated. Waiting to terminate... 2023-04-07 17:58:01 INFO     discord.player ffmpeg process 18258 should have terminated with a return code of -9. 2023-04-07 17:58:01 INFO     discord.voice_client The voice handshake is being terminated for Channel ID 1093533451778523241 (Guild ID 1093533451778523237) 2023-04-07 17:58:01 INFO     discord.voice_client Disconnecting from voice normally, close code 1000. Audio file loaded:  Audio could not be played:

    


    Code :

    


    import discord
import asyncio
import datetime

TOKEN = 'TOKEN HERE' 
CHANNEL_ID = CHANNEL ID HERE

client = discord.Client(intents=discord.Intents.all())

async def play_sound(voice_client):
    try:
        source = discord.FFmpegPCMAudio('audio.mp3')
        print(f"Audio file loaded: {source}")
        voice_client.play(source)
        while voice_client.is_playing():
            await asyncio.sleep(1)
    except Exception as e:
        print(f"Audio could not be played: {e}")

@client.event
async def on_ready():
    print('Bot is ready')
    now = datetime.datetime.now()
    target_time = datetime.time(hour=20, minute=00)
    if now.time() >= target_time:
        print(f"Current time: {now.time()}. Bot did not join channel.")
        return
    else:
        print(f"Current time: {now.time()}. Bot has joined at {target_time}.")
        await asyncio.sleep((datetime.datetime.combine(datetime.date.today(), target_time) - now).total_seconds())
        channel = client.get_channel(CHANNEL_ID)
        if channel is not None:
            try:
                voice_client = await channel.connect()
                print(f'{client.user} joined voice chat.')
                await asyncio.sleep(1)
                await play_sound(voice_client)
                await voice_client.disconnect()
                print(f'{client.user} left voice chat.')
            except Exception as e:

                print(f"Error during joining channel : {e}")
        else:
            print(f"Did not find a channel of ID {CHANNEL_ID}.")

client.run(TOKEN)


    


    Any ideas ?

    


    ffmpeg has been installed properly.

    


  • FFMPEG Error : Command not found - -c:v libx264

    26 juin 2023, par Mash

    I have a https input that I want to crop the top (control) and side (chat bar).

    


    I am using the -vf "crop=1600:980:0:1080" and this works fine.

    


    When I want to scale my cropped input by using
-vf "crop=1600:980:0:180,scale=1920:1080"

    


    I get an Error : Command not found - -c:v libx264

    


    Any ideas on what i am doing wrong here.

    


    Here is the ffmpeg part of the script :

    


    ffmpeg \
  -hide_banner -loglevel error \
  -nostdin \
  -s ${CAPTURE_SCREEN_RESOLUTION} \
  -r ${VIDEO_FRAMERATE} \
  -draw_mouse 0 \
  -f x11grab \
    -i ${DISPLAY} \
  -f pulse \
    -ac 2 \
    -i default \
    -vf "crop=1600:980:0:1080,scale=1920:1080" \
  -c:v libx264 \
    -pix_fmt yuv420p \
    -profile:v main \
    -preset slow \
    -x264opts "nal-hrd=cbr:no-scenecut" \
    -minrate ${VIDEO_BITRATE} \
    -maxrate ${VIDEO_BITRATE} \
    -g ${VIDEO_GOP} \
  -c:a aac \
    -b:a ${AUDIO_BITRATE} \
    -ac ${AUDIO_CHANNELS} \
    -ar ${AUDIO_SAMPLERATE} \
  -f flv ${RTMP_URL}


    


    I have also tried to -vf "crop=1600:980:0:1080;scale=1920:1080"

    


  • gcc is unable to create an executable file

    1er juin 2023, par Abhinandan Madaan

    I'm trying to compile ffmpeg cloned from ffmpeg github (with gpu support using CUDA) in my windows instance. I'm using msys2 mingw64 commandline to run the following command. The configure script is present in the root of the cloned ffmpeg codebase mentioned above.

    


    ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags=-I/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/include --extra-ldflags=-L/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/lib/x64


    


    But I get the following error :

    


    gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.


    


    config.log file looks something like this(I have removed most of the unnecessary lines in between the logs) :

    


    # ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags='-I/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/include' --extra-ldflags='-L/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib/x64'
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
ALLUSERSPROFILE='C:\ProgramData'
ALL_COMPONENTS='
    
    aac_adtstoasc_bsf
av1_frame_merge_bsf
.
.
.
.
gcc -I/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/include -c -o /tmp/ffconf.b4kwCEqD/test.o /tmp/ffconf.b4kwCEqD/test.c
gcc.exe: warning: Files/NVIDIA: linker input file unused because linking not done
gcc.exe: error: Files/NVIDIA: linker input file not found: No such file or directory
gcc.exe: warning: GPU: linker input file unused because linking not done
gcc.exe: error: GPU: linker input file not found: No such file or directory
gcc.exe: warning: Computing: linker input file unused because linking not done
gcc.exe: error: Computing: linker input file not found: No such file or directory
gcc.exe: warning: Toolkit/CUDA/v12.1/include: linker input file unused because linking not done
gcc.exe: error: Toolkit/CUDA/v12.1/include: linker input file not found: No such file or directory
C compiler test failed.


    


    It looks like it is unable to recognise the directory names with spaces included. I've tried escaping using \ as well as with double quotes and single quotes too. I've tried the following commands, but the result is the same :

    


    ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags=-I /c/"Program Files"/"NVIDIA GPU Computing Toolkit"/CUDA/v12.1/include --extra-ldflags=-L /c/"Program Files"/"NVIDIA GPU Computing Toolkit"/CUDA/v12.1/lib/x64


    


    ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags="-I/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/include" --extra-ldflags="-L/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib/x64"


    


    ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags="-I'/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/include'" --extra-ldflags="-L'/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib/x64'"


    


    ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp --enable-nonfree --extra-cflags=-I/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/include --extra-ldflags=-L/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/lib/x64