
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (68)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6585)
-
Discord.py bot joins voice channel but when using voicechannel.play i get error:Command raised an exception : ClientException : Not connected to voice
25 mai 2023, par AudibleDruidSo i've managed to get my discord bot to join a voice channel but when i use the play command it gives me an error that its not conencted to voice
Command raised an exception: ClientException: Not connected to voice.


Here is my code :


import discord
import random
import glob
from discord.ext import commands

##discord intents 
intents = discord.Intents()
intents.members = True
intents.messages = True
intents.guilds = True
intents.voice_states = True



connect the bot to a voice channel :



##called when user wants bot to join voice channel
@bot.command(name ='join', help = 'Make the bot join a voice channel')
async def join(context):
 
 botVoice = context.message.guild.voice_client
 if context.guild.voice_client:
 botvoicechannel = context.message.guild.voice_client.channel
 else:
 botvoicechannel = None
 authorVoice = context.author.voice
 if context.author.voice:
 authorvoicechannel = context.author.voice.channel
 else:
 authorvoicechannel = None
 
 ##await context.reply('bot voice channel: {}\n\nbot voice:\n{}\n\nauthor voice channel: {}\n\nauthor voice voice:\n{}\n\n'.format(botvoicechannel, botVoice, authorvoicechannel, authorVoice))
 
 if not authorVoice and not botVoice:
 await context.reply('Connect to a voice channel first.')
 return
 elif authorVoice and not botVoice:
 await context.reply('Connecting to {}'.format(authorvoicechannel))
 await authorvoicechannel.connect()
 return
 elif not authorVoice and botVoice:
 await context.reply("You aren't in a channel, I'm in {}".format(botvoicechannel))
 return
 elif authorVoice and botVoice:
 if (botvoicechannel == authorvoicechannel):
 await context.reply("I'm already in here.")
 return
 else:
 await context.reply('Moving to you!')
 await botVoice.move_to(authorvoicechannel)
 return
 return



and have it play a url :


@bot.command(name ='play', help = 'Make the bot play a url')
async def play(context, url):
 botVoice = context.message.guild.voice_client
 audioSource = discord.FFmpegPCMAudio(url, executable="ffmpeg")
 botVoice.play(audioSource, after = None)



the code works and the bot joins the voice channel. i see it in the voice channel with me, however i get an error when it gets to
botVoice.play(audioSource, after = None)


the error message is :

error: Command raised an exception: ClientException: Not connected to voice.


i changed
botVoice = context.message.guild.voice_client
frombotVoice = context.guild.voice_client
but that didnt seem to change anything. not sure what to try next. It seems like it wants to play the url the bot just doesnt realize its in the voice channel with me.

maybe a related error. if i kill my python script the bot remains in the channel even though its not running. then when i start it up and do the !join command it says its joining even though its already in the channel with me. its weird because on the join command it checks to see if its already in a voice channel so it should know that its in there with me. idk what to try next. thanks for any suggestions. i only posted relevant code. let me know if you think im missing something else.


thanks for the help


-
Can ffmpeg write metadata encoder when transcoding alac/flac to aac audio file ?
11 juin 2022, par David II have a collection of alac and flac files from Bandcamp and an ffmpeg instance compiled with libfdk_aac https://trac.ffmpeg.org/wiki/CompilationGuide/Centos#libfdk_aac and am trying to convert these to lossy audio aac files for non-critical listening.


With
ffmpeg -i Liholesie\ -\ Shamanic\ Twilight\ -\ 09\ Gray\ Wings.m4a -c:a libfdk_aac -vbr 4 -c:v copy 09_Gray_wings_vbr4.m4a
an expected aac .m4a audio file is produced, album art included, works well. There's one slight detail missing :

During the ffmpeg conversion process ffmpeg says :


Output #0, ipod, to '09_Gray_wings_vbr4.m4a':
 Metadata:
 major_brand : M4A 
 minor_version : 512
 compatible_brands: M4A isomiso2
 title : Gray Wings
 artist : Liholesie
 album_artist : Liholesie
 album : Shamanic Twilight
 comment : Visit https://liholesie.bandcamp.com
 date : 2021
 track : 9
 encoder : Lavf59.24.100
 Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 700x700 [SAR 72:72 DAR 1:1], q=2-31, 90k tbr, 90k tbn (attached pic)
 Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16 (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.33.100 libfdk_aac 
..





and the file produced looks like that when ffprobed except that the Metadata : encoder field is missing :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '09_Gray_wings_vbr4.m4a':
 Metadata:
 major_brand : M4A 
 minor_version : 512
 compatible_brands: M4A isomiso2
 title : Gray Wings
 artist : Liholesie
 album_artist : Liholesie
 album : Shamanic Twilight
 date : 2021
 encoder : Lavf59.24.100
 comment : Visit https://liholesie.bandcamp.com
 track : 9
 Duration: 00:06:57.78, start: 0.000000, bitrate: 155 kb/s
 Stream #0:0[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 152 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 700x700 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn (attached pic)



Is there a way to write the encoder field in the Metadata section when transcoding (or is "encoder" not supported for aac m4a ? That would be weird since ffmpeg says what it says when specifying output during transcoding) .


Any hints on how to write a self-defined text to said tag during transcoding are also welcome.


-
Strange error with ffmpeg and unoconv in python script
27 mai 2015, par Avery Ripoll CrockerI am creating a python script that can be used by other people to convert files. However when I use this script I keep getting a weird error when I run the subprocess for unoconv, this error is :
Traceback (most recent call last):
File "conversion.py", line 15, in <module>
check_call(["unoconv", "-f", Fileextension, filename])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['unoconv', '-f', '.pdf', 'journal.doc']' returned non-zero exit status 1
</module>I have looked through various resources for this, but the one answer I have been receiving is that I must have set up the unoconv line incorrectly. I have checked several times that the code is correct, and it is. The other peculiar thing is that my code for ffmpeg works. Does anybody have an idea as to why this happens.
Here is my program :
print "If at any point you wish to quit the program hit Ctrl + C"
filetype = raw_input("What kind of file would you like to convert? Audio, Image, Video or Document: ")
if filetype == "Document":
path = raw_input("Please drag and drop the directory in which the file is stored into the terminal:")
os.chdir(path[1:-2])
filename = raw_input("Please enter the name of the file you would like to convert, including the file-type. e.g. test.txt, however please do make sure that the file-name does not have any spaces:")
Fileextension = raw_input("What filetype would you like the program to convert your file to. E.g. .txt: ")
from subprocess import check_call
check_call(["unoconv", "-f", Fileextension, filename])
elif filetype == "Audio":
path = raw_input("Please drag and drop the directory in which the file is stored into the terminal:")
os.chdir(path[1:-2])
filename = raw_input("Please enter the name of the file you would like to convert, including the file-type. e.g. test.txt, however please do make sure that the file-name does not have any spaces:")
Fileextension = raw_input("What filetype would you like the program to convert your file to. E.g. .mp3: ")
body, ext = os.path.splitext("filename")
from subprocess import check_call
check_call(["ffmpeg" ,"-i", filename, body + Fileextension])
elif filetype == "Video":
path = raw_input("Please drag and drop the directory in which the file is stored into the terminal:")
os.chdir(path[1:-2])
filename = raw_input("Please enter the name of the file you would like to convert, including the file-type. e.g. test.txt, however please do make sure that the file-name does not have any spaces:")
Fileextension = raw_input("What filetype would you like the program to convert your file to. E.g. .mp4: ")
body, ext = os.path.splitext("filename")
from subprocess import check_call
check_call(["ffmpeg" ,"-i", filename, body + Fileextension])
elif filetype == "Image":
path = raw_input("Please drag and drop the directory in which the file is stored into the terminal:")
os.chdir(path[1:-2])
filename = raw_input("Please enter the name of the file you would like to convert, including the file-type. e.g. test.txt, however please do make sure that the file-name does not have any spaces:")
Fileextension = raw_input("What filetype would you like the program to convert your file to. E.g. .Jpeg: ")
body, ext = os.path.splitext("filename")
from subprocess import check_call
check_call(["ffmpeg" ,"-i", filename, body + Fileextension])