As I'm the only one in the family with a modicum of computer knowledge I have been given a very old home video that has been digitised and the audio which has also been digitised - unfortunately approximately the first 2 minutes of the audio are missing so I'm going to have to leave the first two minutes of the video silent which isn't a major problem.
I currently have the video in an .MP4 file (this is how the owner supplied it) and the audio is just a .aac file. They seem like strange file format selections to me - I would have assumed that they would be .avi and .mp3, but I have to work with what I've got!
Is there a simple to use (and free!) tool (which works under Windows 7) out there which will allow me to manually sync the audio to the video? Something which will allow me to view/hear both simultaneously and perhaps move a few sliders/timer settings to manually sync them up? Then of course I need to dump them to one file (.mp4, .avi, whatever).
Thanks for any help anyone can offer - I'm a total 'noob' at this kind of thing.
+ Reply to Thread
Results 1 to 17 of 17
Last edited by CompVid; 24th May 2013 at 10:34.
If the audio and video are just s few seconds off and the difference between the two is constant throughout the video....someone may be able to help you further.
I'm afraid it's more than a few seconds as apparently the original audio tape was mangled, so there's over 2 minutes missing from the start of the digital file that was created from what remained.
Yes, if it's just an offset problem most basic editors can do what you need. The job is made easier in an editor that can display an expanded audio waveform, which makes it possible to visually match up video and audio events. Free tools I know from experience that can do this are Movie Maker 2.x and 6.0 (there are downloads for the latter on the Internet). I haven't used Movie Maker Live at all. VideoPad can also do this I suspect, and there will definitely be others.
To prevent generational quality loss try to have your editor copy video and audio to the output without re-encoding. In this respect the Movie Maker versions above aren't suitable, since they do not support MPEG4 and AAC output as far as I recall.
Thanks very much, I'll give those a shot.
Just remux with a ~120000 ms audio delay. You can do it with MMG (part of MkvToolNix) if you can live with an MKV file.
Last edited by jagabo; 24th May 2013 at 11:54.
ffmpeg now and not one of my players respected the offset.
So the solution (as from that thread) is to mux in a delay in a container format like MKV, or when outputing to MP4 to physically move audio on the timeline, effectively padding with silence. I suspect ffmpeg can do the latter in a single command line because it provides a null audio source filter, but my experience of its use doesn't extend to timeline editing. If an ffmpeg fundi could confirm this it would be great.
EDIT: It turns out that my ffmpeg command line for delaying audio doesn't work for MKV either, so I'm probably doing something wrong. I'll ask on the ffmpeg email list, but in the meantime here's another option that will work:
1. In an audio editor, add 2s of silence to the beginning of your .aac file, taking care to output in the same format as your input to minimise quality loss
2. Remux with ffmpeg:
ffmpeg -i video.mp4 -i audio.aac -codec:v copy -codec:a copy output.mp4
Last edited by fvisagie; 25th May 2013 at 04:45.
Thanks very much for the all of the suggestions - will have a good play this weekend.
ffmpeg -i invideo.mp4 -itsoffset 00:00:02.000 -i inaudio.aac -codec:v copy -codec:a copy out.mkv
I would first apply the estimated 2 minute (or whatever you've estimated it to be) offset, then watch the result to more accurately determine the exact offset. Many media players have ability to shift the sound during playback -- that will help you out. Then go back and remux with the newly calculated offset. Fine tune again if necessary.
Here's how to delay audio by 2s in the MP4 container. It involves re-encoding audio:
ffmpeg -i invideo.mp4 -i inaudio.aac -codec:v copy -codec:a libvo_aacenc -af aresample=resampler=swr:first_pts=96000 out.mp4
From the ffmpeg mailing list there is a way of pre/appending audio without re-encoding, but for the faint-at-heart it's even more daunting than any of the options suggested to date! For completeness' sake:
To generate silence with ffmpeg, use the aevalsrc audio filter
Then, you can use either the concat demuxer (for which you'll have to generate the sound separately, ad then prepend it to your existing audio in two distinct commands) or the concat filter (requires re-encoding, but will allow you to work with a single ffmpeg command).
ffmpeg -filter_complex 'aevalsrc=0:d=2' silence.aac ffmpeg -f concat -i <(for f in silence.aac audio.aac; do echo file "'$f'"; done) -c copy out-audio.aac
ffmpeg -i audio.aac -filter_complex
'aevalsrc=0:d=2[slug];[slug]concat=n=2:v=0:a=1[out]' -map '[out]'
-c:a libfdk_aac -vbr 3 out-audio.aac
(change depending on the AAC encoder you have)
http://ffmpeg.org/trac/ffmpeg/wiki/How to concatenate (join, merge) media files
‘flags, swr_flags’ Set flags used by the converter. Default value is 0. It supports the following individual flags: ‘res’ force resampling, this flag forces resampling to be used even when the input and output sample rates match.
Perhaps someone handy with audio metrics can confirm this for us?
Personally , I`d import it into a NLE , move the audio (as smrpix) suggests to align audio/video , get two datum points - one at the start and one right at the end , measure the exact offset required at the start , scrub to the end of the video and ensure the audio is still aligned * and then import the audio into an audio editor , add the offset time and save as aac (but that is my workflow which I`m very used to now) .
* If the audio is out at the end of the video , you work out the time difference (by moving the audio again) , select the waveform between the 2 datum points and shrink or stretch by that difference , add the 2minutes(ish) and then save as aac . Then remux .
I`ve redubbed 3 music concerts this way and countless old music videos with mono sounds from the ealry 80s .
Your 2 minutes is only approximate , a few tenths of a second shows as out of sync , if you use the methods above to determine the exact offset , you`ll be there a good while longer .
If you are very conversant with command line as methods noted above , then use that method .Llamas are for life , not just for christmas
I don't even know how you could go about creating a video file with audio 2 minutes shorter that the video.
You don`t touch the video , you just add silence of (in this case) 2 minutesish of silence to the front of the audio and then remux it to the original video . The audio won`t be shorter then , it`ll just be 2 minutes of silence - you can recreate the effect by shooting a home video and every just mimes for the first 2 minutes .Llamas are for life , not just for christmas