
Recherche avancée
Autres articles (111)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Contribute to documentation
13 avril 2011Documentation 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 (...)
Sur d’autres sites (8151)
-
Warn users when using —(psnr|ssim) without —tune (psnr|ssim)
12 avril 2011, par Jason Garrett-GlaserWarn users when using —(psnr|ssim) without —tune (psnr|ssim)
-
Pydub dir error . dynamic file path dosent play sound but with specific file path the code works fine
20 avril 2021, par anshul rajhello developers idk whats wrong with this code it works fine when i give exact file path to the music file but if i pass it in dynamic way it doesnt work . actually my code is that user give a music file name it get downloaded then with the meta id it find the file in downloads dir then play it


def songplayer(self,meta):
 def playmmusic(name):
 from pydub.playback import play
 from pydub import AudioSegment
 AudioSegment.converter = "C:\\ffmpeg\\bin\\ffmpeg.exe"
 AudioSegment.ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg.exe"
 AudioSegment.ffprobe = "C:\\ffmpeg\\bin\\ffprobe.exe"
 sound = AudioSegment.from_file(name)
 play(sound)

 print(colored("Currently Playing : " + meta['title'],'yellow'))
 r=meta['id']
 tt='./downloads/'+r
 playmmusic(tt)



-
Pydub dir error . dynamic file path doesn't play sound but with specific file path the code works fine
20 avril 2021, par anshul rajI don't know what's wrong with this code - it works fine when I provide an exact file path to the music file, but if I pass it in a dynamic way, it doesn't work.


Actually my code is that user give a music file name it get downloaded then with the meta id it find the file in downloads dir then play it


def songplayer(self,meta):
 def playmmusic(name):
 from pydub.playback import play
 from pydub import AudioSegment
 AudioSegment.converter = "C:\\ffmpeg\\bin\\ffmpeg.exe"
 AudioSegment.ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg.exe"
 AudioSegment.ffprobe = "C:\\ffmpeg\\bin\\ffprobe.exe"
 sound = AudioSegment.from_file(name)
 play(sound)

 print(colored("Currently Playing : " + meta['title'],'yellow'))
 r=meta['id']
 tt='./downloads/'+r
 playmmusic(tt)