Quantcast
Channel: VideoHelp Forum
Viewing all articles
Browse latest Browse all 45844

ffmpeg audio delay - how to get the video to start before the audio ?

$
0
0
for testing the effect I took a synch avi(xvid,mp3) file and remuxed it using:
1.
Code:

ffmpeg -y -itsoffset 00:00:10.000 -i "test.avi" -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test1.avi"
-> Audio starts 10sec before video (this is like I expected)
2.
Code:

ffmpeg -y -i "test.avi"  -itsoffset -00:00:10.000 -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test3.avi"
-> Audio starts 10sec before video (this is like I expected)
3.
Code:

ffmpeg -y -itsoffset -00:00:10.000 -i "test.avi" -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test2.avi"
-> Audio and video start at the same time (I expected that the video would start before the audio)
4.
Code:

ffmpeg -y -i "test.avi"  -itsoffset 00:00:10.000 -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test4.avi"
-> Audio and video start at the same time (I expected that the video would start before the audio)

=> How to handle negative audio delays with ffmpeg?

Also all of these calls give me:
Quote:

[avi @ 000001f1b4b8e280] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
=> How to do it properly to avoid this warning and be save for the future?


Thanks.

Cu Selur

Viewing all articles
Browse latest Browse all 45844

Trending Articles