
Recherche avancée
Autres articles (53)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (7257)
-
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 ?