
Recherche avancée
Autres articles (55)
-
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (4682)
-
ydl erroring on download only getting partial download and an error on ydl.download([url])
11 septembre 2022, par newtbootbuilding an audio stream bot command for my custom discord bot but it keep throwing errors on
ydl.download([url])
and only fetches a partial download assuming it disconnects from server before finishing download i'm not sure how to fix this error or if its just a syntax thing

import discord
import aiohttp
import random
import youtube_dl
import os
from discord.ext import commands

@bot.command()
async def play(ctx, url : str):
 song_there = os.path.isfile("song.mp3")
 try:
 if song_there:
 os.remove("song.mp3")
 except PermissionError:
 await ctx.send("wait for current audion to finish or use the 'stop' command")
 return

 voiceChannel = discord.utils.get(ctx.guild.voice_channels, name='moosic')
 voice = discord.utils.get(bot.voice_clients, guild=ctx.guild)
 if voice is None or not voice.is_connected():
 await voiceChannel.connect()
 ydl_opts = {
 'format': 'bestaudio/best',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 }
 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([url])
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file, "song.mp3")
 voice.play(discord.FFmpegPCMAudio("song.mp3"))



-
ffmpeg h264_nvenc error [Cannot init Cuda] on NVidia Quadro p620
13 septembre 2018, par Vitor Silva de DeusI’ve installed the nv-codec-headers from https://git.videolan.org/git/ffmpeg/nv-codec-headers.git. whit :
cd nv-codec-headers && make && sudo make install
Then I got ffmpeg from https://git.ffmpeg.org/ffmpeg.git and compiled with :
cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 && PATH="$HOME/bin:$PATH" make && make install && hash -r
When I run :
ffmpeg -hex -rtsp_transport tcp -t 1800 -r 30 -i rtsp://stream_url -c:v h264_nvenc -s:v 360x180 -vsync 0 -preset slow outfile.mp4
ffmpeg breaks and logs :
[aac @ 0x5636a2d9f540] Too many bits 8832.000000 > 6144 per frame
requested, clamping to max[swscaler @ 0x5636a33e7840] deprecated pixel format used, make sure
you did set range correctly[h264_nvenc @ 0x5636a2da2880] Cannot init CUDA
Error initializing output stream 0:0 — Error while opening encoder
for output stream #0:0 - maybe incorrect parameters such as bit_rate,
rate, width or height[aac @ 0x5636a2d9f540] Qavg : -nan
[aac @ 0x5636a2d9f540] 1 frames left in the queue on closing
Conversion failed !OS : Ubuntu Server 18.04
ffmpeg version : N-91936-g776cdd1dc8 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)CUDA version : 9.2
GPU Device : Dual NVIDIA Quadro P620, 2 GB, 4 mDP
Any suggestion on how can i debug or what I’m doing wrong ?! Many thanks !
-
My discord music bot is not playing the entire music
21 décembre 2024, par james12My discord music bot based on discord.py, yt_dlp and ffmpeg is not working.
I downloaded every module that is required and added environmental variables.
But, my discord bot is not working properly.
The bot plays the music properly at first, but the music ends before the song finishes.


Full code below :


import discord
from discord.ext import commands
import yt_dlp

app = commands.Bot(command_prefix='!', intents=discord.Intents.all())
ydl_opts = {
 'format': 'bestaudio/best',
 'extractaudio': True,
 'audioformat': 'mp3',
 'outtmpl': 'downloads/%(title)s.%(ext)s',
 'quiet': True,
}

@app.event
async def on_ready():
 print('Done')
 await app.change_presence(status=discord.Status.online, activity=None)

@app.command()
async def play(ctx, *, search: str):
 channel = ctx.author.voice.channel
 voice_client = discord.utils.get(app.voice_clients, guild=ctx.guild)

 if not voice_client:
 voice_client = await channel.connect()

 with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 info = ydl.extract_info(f"ytsearch:{search}", download=False)['entries'][0]
 url = info['url']
 title = info['title']

 # 음악 재생
 voice_client.play(discord.FFmpegPCMAudio(url, executable="ffmpeg"), after=lambda e: print("재생 완료"))
 await ctx.send(f"{ctx.author.mention}님이 요청하신 {title} 노래 재생 중")

@app.command()
async def stop(ctx):
 voice_client = discord.utils.get(app.voice_clients, guild=ctx.guild)
 if voice_client and voice_client.is_playing():
 voice_client.stop()
 await voice_client.disconnect()
 
app.run('token')



I tried to add options in FFmpeg like this :
options="-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5"

but it doesn't work.
I also added extra yt-dlp options.
I hope the bot properly plays the full version of music from youtube in discord.