
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (22)
-
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site
Sur d’autres sites (3607)
-
How to change or modify pitch of audio file (music etc like .mp3 file)using FFMPEG ?
18 octobre 2022, par syed kashifullahI want to change and modify pitch an .mp3 audio file using FFMPEG.
But I am unable to use FFMPEG to change or modify pitch of that sound.
what command (exact command) should be exactly use for changing pitch of an audio file ?


String outPutPath = new File("/storage/emulated/0/Share it Application/Over_the_HorizonTemp.wav").getPath();
 
 String[] strFfmpeg = {"ffmpeg","-i" ,strInputPath,"-af", "rubberband=tempo=1.0:pitch=1.5:pitchq=quality" ,outPutPath};
 execffmpegBinary(strFfmpeg);



execffmpegBinary Function :


public void execffmpegBinary(String[] command) {
 Config.enableLogCallback(new LogCallback() {
 @Override
 public void apply(LogMessage message) {
 Log.e(Config.TAG, message.getText());
 Log.e("TAG", "apply: " +message.getText());
 }
 });
 Config.enableStatisticsCallback(new StatisticsCallback() {
 @Override
 public void apply(Statistics statistics) {

 }
 });

 long executionId = FFmpeg.executeAsync(command, new ExecuteCallback() {
 @Override
 public void apply(long executionId, int returnCode) {
 if (returnCode == RETURN_CODE_SUCCESS) {
 
 Log.e("1TAG", "apply:return code "+returnCode );
 Log.e("1TAG", "apply:execution Id "+executionId );
 Log.e("1TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));


 } else if (returnCode == RETURN_CODE_CANCEL) {
 Log.e("2TAG", "apply:return code "+returnCode );
 Log.e("2TAG", "apply:execution Id "+executionId );
 Log.e("2TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));

 } else {
 Log.e("3TAG", "apply: returnCode"+ returnCode);
 Log.e("3TAG", "apply:return code "+returnCode );
 Log.e("3TAG", "apply:execution Id "+executionId );
 Log.e("3TAG", "apply:execution Id "+ new FFmpegExecution(executionId,command));

 }
 }
 });
}



-
I have a audio in 128kbps that was read 16KB every second, but it seems that I am getting more than 1 seconds of the music each time. Why ?
23 décembre 2022, par HexonaSo I have a new stream to which I will push 2048 bytes of audio buffer every 128ms (i.e. 16KB every second) but I seem to have more than 1 second of data pushed to the stream. (I think so by finding ffmpeg is still streaming sound even tens of seconds after I stop pushing data in it)


When I changed it to 1024 bytes/128ms (8KB/s), the sound stop right after I stop pushing data.


Please correct me if I do anything wrong !


Some background story


I am using ffmpeg to stream to a rtp server. It is one-time used, so I can't stop ffmpeg and start again. I don't want to use the ZeroMQ way because of latency. The target I am trying to archive is to have the same readable stream to ffmpeg and change the audio content on the go by stop pushing chunks of previous audio file and switch to the new one.


If you know some other ways to archive the goal, I would be very pleased to know. Thank you in advance !


My current code


const stream = new Stream.Readable();

// ...
// (send stream to ffmpeg)
// ...

fileP = fs.createReadStream(input);
fileP.on('readable', async () => {
 var chunk;
 while (previousStream && (chunk = fileP?.read(16 * 128))) {
 if (!previousStream) break;
 stream.push(chunk);
 await delay(125);
 }
});



-
FFMPeg command to combine images with audio and then add background music
3 mars 2023, par John SmithSo, I have a series of corresponding image and audio files "0.mp3", "0.png", "1.mp3", "1.png", etc...
I want to have it so the image shows for the duration of the audio file. I also want music to play in the background. The command will also eventually be generated programmatically, so it needs to be able to handle an arbitrary amount of sources.


Here is first part working


ffmpeg -i 0.png -i 0.mp3 -i 1.png -i 1.mp3 -i 2.png -i 2.mp3 -i 3.png -i 3.mp3 -i 4.png -i 4.mp3 -i 5.png -i 5.mp3 -i 6.png -i 6.mp3 -i m.mp3 -filter_complex "[0][1][2][3][4][5]concat=n=7:v=1:a=1[vv][a];[vv]format=yuv420p[vout]" -map [vout] -map [a] video.mp4



and here is my attempt to get the music working :


ffmpeg -i 0.png -i 0.mp3 -i 1.png -i 1.mp3 -i 2.png -i 2.mp3 -i 3.png -i 3.mp3 -i 4.png -i 4.mp3 -i 5.png -i 5.mp3 -i 6.png -i 6.mp3 -i m.mp3 -filter_complex "[0][1][2][3][4][5][6]concat=n=7:v=1:a=1[vv][aout];[vv]format=yuv420p[v];[7][aout]amerge[mout]" -map [v] -map "[mout]" video.mp4



The first and third audio files end up getting merged and then the audio stops, but all of the images play for the expected duration.