for testing the effect I took a synch avi(xvid,mp3) file and remuxed it using:
1.
-> Audio starts 10sec before video (this is like I expected)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"
2.
-> Audio starts 10sec before video (this is like I expected)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"
3.
-> Audio and video start at the same time (I expected that the video would start before the audio)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"
4.
-> Audio and video start at the same time (I expected that the video would start before the audio)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"
=> How to handle negative audio delays with ffmpeg?
Also all of these calls give me:
=> How to do it properly to avoid this warning and be save for the future?[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
Thanks.
Cu Selur
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 7 of 7
			
		- 
	users currently on my ignore list: deadrats, Stears555, marcorocchini
- 
	I believe the problem is the AVI container. You have to re-encode the audio and fill it with actual silence (or do a complicated extra step of attaching 10 mp3 seconds before - probably easier with something like delaycut). 
- 
	Other tools can handle this properly (for example mencoder, avi-mux gui, virtual dub,...) so I doubt it's a general problem of the .avi container. users currently on my ignore list: deadrats, Stears555, marcorocchini
- 
	IIRC: 
 VirtualDub creates kinda "b0rked" data to prepend
 Avi Mux GUI inserts actual silence
 don't know about mencoder
- 
	Not without re-encoding, yes. That said, ffmpeg can do so many things, often badly or not documented at all, that I would not 100% rule it out. 
 
 You could do something crazy like keep a silence.wav or sth. and encode it to the delay length (with identical parameters) and prepend it in an extra step. Or let ffmpeg create it on-the-fly: https://ffmpeg.org/ffmpeg-filters.html#anullsrc
Similar Threads
- 
  How to Delay or fix audio in videoBy Aashik Alam in forum AudioReplies: 7Last Post: 6th Mar 2016, 15:08
- 
  MeGUI x264 Encode Video delay ~3secs to startBy diegobh in forum Video ConversionReplies: 15Last Post: 3rd Aug 2014, 06:18
- 
  Global Audio/video Delay SettingsBy eedwards86 in forum Newbie / General discussionsReplies: 2Last Post: 5th Nov 2013, 15:30
- 
  Insert Audio Delay With ffmpegBy bhurt in forum LinuxReplies: 7Last Post: 11th May 2013, 18:06
- 
  H.264 TS -> MKV, AviSynth+DGAVCDecode+ffmpeg, trim recording + delay audio?By Matchay in forum Video ConversionReplies: 3Last Post: 28th Jun 2012, 06:13


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 Visit Homepage
				Visit Homepage
			 
 
			
			
 Quote
 Quote