
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (40)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (5164)
-
Unable to use Multithread for librosa melspectrogram
15 avril 2019, par Raven CheukI have over 1000 audio files (it’s just a initial development, in the future, there will be even more audio files), and would like to convert them to melspectrogram.
Since my workstation has a Intel® Xeon® Processor E5-2698 v3, which has 32 threads, I would like to use multithread to do my job.
My code
import os
import librosa
from librosa.display import specshow
from natsort import natsorted
import numpy as np
import sys
# Libraries for multi thread
from multiprocessing.dummy import Pool as ThreadPool
import subprocess
pool = ThreadPool(20)
songlist = os.listdir('../opensmile/devset_2015/')
songlist= natsorted(songlist)
def get_spectrogram(song):
print("start")
y, sr = librosa.load('../opensmile/devset_2015/' + song)
## Add some function to cut y
y_list = y
##
for i, y_i in enumerate([y_list]): # can remove for loop if no audio is cut
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000)
try:
np.save('./Test/' + song + '/' + str(i), S)
except:
os.makedirs('./Test/' + song)
np.save('./Test/' + song + '/' + str(i), S)
print("done saving")
pool.map(get_spectrogram, songlist)My Problem
However, my script freezes after finished the first conversion.
To debug what’s going on, I commented out
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000)
and replace it byS=0
.
Then the multi-thread code works fine.What’s wrong with the
librosa.feature.melspectrogram
function ? Does it not support multi-thread ? Or is it a problem of ffmpeg ? (When using librosa, it asks me to install ffmpeg before.) -
How can i use ffmpeg to add voice note to another mp3 at specific time , let everything play without reducing the original mp3
29 juin 2020, par Adike maduabuchiI have used some code which does not give me what I want, I used PHP shell to execute the code


$var = 'ffmpeg -y -i ' . $voice_note_tag . ' -i ' . $original_music_path . ' -filter_complex "[0]asplit[a][b]; [a]atrim=duration=' . $time_come_vioce . ',volume=\'1-max(0*(t-1),0)\':eval=frame[pre]; [b]atrim=start=' . $time_come_vioce . ',asetpts=PTS-STARTPTS[song]; [song][1]amix=inputs=2:duration=first:dropout_transition=2[post]; [pre][post]concat=n=2:v=0:a=1[mixed]" -map "[mixed]" ' . $output . ' 2>&1';
 shell_exec($var);



-
Returns wrong frame while seeking in FFMPEG Player
5 février 2015, par user543I have implemented an audio player which supports all the formats using FFMPEG. But while seeking the audio, the application is getting the wrong frame at that target duration. Here is my code for the seek functionality.
int64_t seekTime = av_rescale_q(seekValue * AV_TIME_BASE,
AV_TIME_BASE_Q,
fmt_ctx->streams[seekStreamIndex]->time_base);
int64_t seekStreamDuration =
fmt_ctx->streams[seekStreamIndex]->duration;
int flags = AVSEEK_FLAG_BACKWARD;
if (seekTime > 0 && seekTime < seekStreamDuration)
flags |= AVSEEK_FLAG_ANY;
int ret = av_seek_frame(fmt_ctx, seekStreamIndex, seek_target,
flags);
if (ret < 0)
ret = av_seek_frame(fmt_ctx, seekStreamIndex, seekTime,
flags);
avcodec_flush_buffers(dec_ctx);It is working fine for most of the songs.
But some of the mp3 songs are getting the wrong timespan.For instance : If the song total duration is 2 minutes, if I play the song without seeking it works fine. But while playing, if we seek the song to some position, this will make the song ends with 2 mins and 10 seconds.
I am getting this issue with only mp3 songs. I am using FFMPEG 2.1. The code for the seek functionality is working fine on FFMPEG 0.11.1.
Please provide any information about this issue.