
Recherche avancée
Autres articles (65)
-
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 (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (11425)
-
How to overwrite file with ffmpeg when opened with pygame.mixer.music
11 février 2015, par LewistrickI have this interesting situation in which I want to convert a lot of audio fragments using
ffmpeg
viasubprocess.check_call()
and then play them usingpygame.mixer.music.play()
.
But because there would be a lot of small files when converting all of them, I want to overwrite the file every time, calling ittmp.wav
.Converting goes as follows :
outfilename = "tmp.wav"
proc_args = ["ffmpeg"]
proc_args += ["-ss", str(begin / 1000)]
proc_args += ["-i", os.path.join(audiodir, infilename)]
proc_args += ["-to", str(duration / 1000)]
proc_args += ["-ar", str(AUDIORATE)] # sample frequency (audio rate)
proc_args += ["-y"]
proc_args += [outfilename]
DEVNULL = open(os.devnull, 'wb')
try:
subprocess.check_call(proc_args, stdout = DEVNULL, stderr = DEVNULL)
# print "Converting audio succeeded."
except subprocess.CalledProcessError as e:
print "Converting audio failed."
return 0.Playing goes as follows :
pygame.mixer.music.load(outfilename)
pygame.mixer.music.play()Now, a problem arises. The first file is converted and played correctly. But when skipping to the next file,
tmp.wav
can’t be overwritten. I think this is due to the fact that the file is still opened in the music module, but that doesn’t say how to close the file. I already triedpygame.mixer.music.stop()
,pygame.mixer.quit()
andpygame.mixer.stop()
before converting the new file, but none of them works.How do I solve this problem ?
-
How to use FFmpeg to get lyrics ?
14 février 2018, par XChyFFmpeg version:3.3.2
I try to use stream to get lyrics,but that cannot.
Code :
AVFormatContext* fmt_ctx = NULL;
int ret;
av_register_all();
if ((ret = avformat_open_input(&fmt_ctx, "media path", NULL, NULL))){
printf("Fail to open file");
return;
}
if (fmt_ctx->iformat->read_header(fmt_ctx) < 0) {
printf("No header format");
return;
}
for (uint i = 0; i < fmt_ctx->nb_streams; i++){
auto stream=fmt_ctx->streams[i];
if(stream->disposition==AV_DISPOSITION_LYRICS){
printf("lyrics!");//"will not print"
}
} -
FFMPEG stream separate video and music files
10 janvier 2018, par KulcanhezI want to stream using FFMPEG some random nature videos and have some random music playing under it, by other words, playing some video files and some music files at the same time. I already searched but I found no solutions. I’m using Ubuntu currently. I said FFMPEG because I didn’t found any other solution. Thanks !!