
Recherche avancée
Autres articles (105)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (12059)
-
Is there a way to (automatically) detect if the channels of a stereo video/audio are out of phase and canceling each other ?
8 mars 2024, par Rhenan BartelsBackground


I've encountered an issue while attempting to convert an audio downloaded from a youtube video into a mono .wav format using
ffmpeg
. Despite using typical conversion commands (code below), the resulting audio is either silent or corrupted, indicating potential stereo channel cancellation.
I tried to load the audio into Python and calculate phase and cross-correlation, but this step uses a lot of memory, especially for a 6-hour-long audio.

Goal


I'm seeking a method, preferably using
ffmpeg
, to detect if stereo channels are canceling each other out due to phase misalignment. Additionally, I aim to automate the process of phase inversion before converting to mono to ensure the integrity of the resulting audio.

Question :


How can I automatically detect if stereo channels are canceling each other and subsequently invert the phase to ensure successful conversion to mono using
ffmpeg
? Any insights, solutions, or alternative approaches would be greatly appreciated.

Steps Taken :


- 

- Downloaded audio from YouTube using
yt-dlp
. - Attempted audio conversion to mono using
ffmpeg
, resulting in silent or corrupted output. - Successfully converted audio to mono by manually inverting the phase of one channel prior to conversion.








Download audio from youtube


yt-dlp -f bestaudio https://www.youtube.com/watch?v=s3QB_rJzH08 -o input.webm



Audio conversion


The resulting file is silent or corrupted


ffmpeg -i input.webm -ac 1 -ar 16000 -c:a pcm_s16le output.wav



Audio conversion to mono .wav with phase inversion


The resulting file has audio


ffmpeg -i input.webm -af "aeval=val(0)|-val(1)" -ac 1 -ar 16000 -c:a pcm_s16le output.wav



- Downloaded audio from YouTube using
-
how to begin streaming while ffmpeg is still transcoding the file in PHP
15 janvier 2013, par JoyalI want to transcode an AVI video to mp4 with ffmpeg, but while is still transcoding, I would like to watch the video transcoded on a flash video player in realtime , Im using jwplayer , I made some test with mp4 and works great , but Im not able to make it work while is transcoding
I made a php script to run the command in background
ffmpeg.exe -threads 1 -y -i "a.avi" -s 1280x720 -f mp4 -vcodec libx264 -b 2000000 -ab 128000 -ar 44100 "a.mp4"
on the jwplayer i have as source "a.mp4"
-
Is async.js needed to process multiple ffmpeg conversions at the same time ?
15 février 2019, par jurelikI’m trying to convert youtube videos to mp3 via my Node.js server, using ’ytdl-core’ and ’fluent-ffmpeg’. Since the server is intended to process multiple requests at the same time, it got me thinking whether or not async.js is needed to convert videos in a time efficient manner.
The interesting thing however, is that upon testing the handling of multiple requests with and without using async.js, the result seems to be the same both ways - the time it takes to convert 3 videos is the same.
Here is the code I’m using without async.js :
server.get('/download/:id', (req, res) => {
const id = req.params.id;
let stream = ytdl(`https://www.youtube.com/watch?v=${id}`);
ffmpeg(stream)
.audioCodec('libmp3lame')
.audioBitrate(128)
.toFormat('mp3')
.save(`public/downloads/${id}.mp3`)
.on('error', err => {
console.log(err);
})
.on('end', () => {
console.log('file downloaded');
send(req, `public/downloads/${id}.mp3`).pipe(res);
});
});And this is the code using async.js :
let queue = async.queue((task, callback) => {
let stream = ytdl(`https://www.youtube.com/watch?v=${task.id}`);
ffmpeg(stream)
.audioCodec('libmp3lame')
.audioBitrate(128)
.toFormat('mp3')
.save(`public/downloads/${task.id}.mp3`)
.on('error', err => {
console.log(err);
callback(err)
})
.on('end', () => {
send(task.req, `public/downloads/${task.id}.mp3`).pipe(task.res);
callback('file sucessfully downloaded');
});
}, 5);
queue.drain = function() {
console.log('all items downloaded');
}
server.get('/download/:id', (req, res) => {
queue.push({req: req, id: req.params.id, res: res}, err => {
console.log(err);
});
});Does anyone have any ideas why both methods seem to finish conversion at roughly the same time ? I would imagine using async.js should finish converting the videos faster due to processing in parallel, but that isn’t the case.
Any thoughts would be much appreciated !