
Recherche avancée
Autres articles (48)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 ) (...)
Sur d’autres sites (6663)
-
avcodec/mpeg4videodec : Sync sprite_warping_accuracy between threads
12 octobre 2022, par Andreas Rheinhardt -
ffmpeg audio out of sync with video stacking
3 avril 2024, par s0mbreThe problem


When trying to do horizontal stacking of two videos in
ffmpeg
, the combined audio track loses sync with the video on the second input. As far as I've look it up, this problem is very common, not to say notorious withffmpeg
.

I do hstack muxing like this :


ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex \
"[0:v]scale=1280:-2,crop=w=640:h=720:x=0[v1]; \
[1:v]scale=1280:-2,crop=w=640:h=720:x=0[v2]; \
[v1][v2]hstack=shortest=1[v]; \
[0:a][1:a]amix=duration=shortest[a]" \
-map [v] -map [a] -c:v libx264 -c:a libmp3lame -r 30 -y stuff/out.mp4



It encodes just fine as far as the hsplit goes. But the resulting video is out of sync with the audio : the second input (located on the right side in the resulting split) demonstrates about 3 sec. audio off-syncking, where the audio track is ahead of the picture. I realize this is somehow connected with the source videos' timestamps, but no popular remediation recipes helped (see below).


What I expect


I'd expect a resulting stacked video where the audio track is muxed with exact correspondence to the original input pictures.


What I tried (all in vain !)


Something I've tried but to no avail :


- 

- Appending
-async 1
option as suggested here and here - Using the
aresample=async=1
oraresample=async=1000
filter on each audio input as suggested here and here - Padding each audio track with
apad
as suggested here - Using the
adelay=0
andadelay=[delay]s
filters on the failing input - Changing the audio codec to a number of alternatives (aac etc.)
- Infinite combinations of 1-5 above...














What seems indeed to work is manual passing a delay value to the
-itsoffset
filter as suggested here and in the docs and using the offset track as an extra (pure audio) input. But how do I find the exact offset with a different set of videos ?

In short, I am at a standstill after 7+ days of ravenous search-and-try.


- Appending
-
Révision 23647 : Nouveau logo pour la 3.2
10 juillet 2017, par nicolas.dorigny@gmail.com