
Recherche avancée
Autres articles (22)
-
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 -
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 -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (6124)
-
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 !!
-
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"
}
} -
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 ?