I have been ripping the audio streams from some old TV rips to synch with HD video.
The TV audio streams are in a language not available on the bluray version.
The tv rips are 25fps and the HD vid runs at 23.98fps.
So, I usually just use ffmpeg to adjust them;
I then open the .wav in an audioeditor, remove any ads, synch it against the HD English audio streamCode:ffmpeg -i File.avi -filter:a "atempo=0.959" -vn File.wav
and save it as an .aac to add as a new audio stream on the HD vid.
This usually works fine. However I have two files that won't synch.
I've checked the TV rip frame rates. They are 25fps.
I've checked the HD vid frame rates. They are 23.98fps
I've checked for ads. I've checked for extra footage in both versions.
I've checked and re-checked everything but I'm obviously missing something.
When I compare the converted .wav streams to the HD English audio streams,
they differ in length suggesting my frame rates are incorrect.
Yet when I double-check the framerates, they always come out the same.
I've even divided the total number of frames by the runtime.
I've no idea why this is happening. As I said, it usually works fine.
If anyone can suggest where I'm going wrong, I would be very grateful.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
Video has framerates. Audio does not - it has sample rates. What they have in common is duration.
What is the total duration of both versions?
If for example clip A lasts 13 minutes and 40 seconds and clip B lasts 15 minutes, AND you know that they don't have any differences in editing (they often do), you would time compress/stretch (stretch in this case) the 1st by 45/41 (aka 900/820) to get the 2nd. Or the reverse to go from the 2nd to the 1st.
If they are still off, it is either that you have an offset that wasn't mentioned, or you DO have differences in edits.
Scott -
As a followup, do you know the frame count of the two sources? If not exactly the same the audio won't synch after doing what you did. If after you're done they're off by the same amount all the way through, then you only have to set a delay. If the out-of-synch is progressive, I'd be willing to bet the frame counts aren't the same.
-
My intuition was that the ratios between the framerate and video (and audio) length would be a linear constant.
I'm still not entirely sure why it isn't, if you double the speed you will half the length, so there is a constant ratio of 1:2
This worked most of the time. (I seem to have been lucky)
But it definitely isn't working for two of them. I get a progessive offset.
(6.5 secs off at the halfway mark and 13 secs off by the end.)
So using atempo=0.959 must be wrong (23.98/25)
I'll try using the ratio between the audio lengths as suggested.
The frame counts don't match exactly as one is a TV rip with (removed) ads and truncated end-credits.
I usually have to make an offset edit at the ad-breaks, so I end up with 4 or 5 chunks of audio.
As longs as the audio speed and video speed is the same, it's not a problem.
I'd sill love to know why the frame rate ratio doesn't work. -
Is the converted audio to long or to short?
Try other ratios g.e. 29.97/25.
(I recently had a 30fps video with a 23.976 fps audio track. Obviously the video track was increased to 30fps. The audio track remained the same.)
NB
You should also use more commas, e.g. 23.976/25=0.95904.
You can also use my clever Ffmpeg-GUI, so you can change the pitch as well as the length.Last edited by ProWo; 21st Nov 2020 at 04:14. Reason: typo
-
Finally matched the lengths and there was still a progressive offset which realligned near the end.
Seems I DO indeed have differences in the edits.
I managed to lay my hands on a 25fps dvd version and the 25fps tv stream matched,
so the bluray and dvd versions have some incredibly minor and difficult to detect differences.
(If I want HD vid, I will have to allign scene by scene which is too much effort.)
Anyway, many thanks for all help and advice recieved.
Much appreciated
Similar Threads
-
how can I mux 25 fps audio into 23.438 fps (1024 spf) ?
By precipizio in forum AudioReplies: 12Last Post: 16th Apr 2020, 15:06 -
Jerky Video - Fps issue??
By vinckles in forum Video ConversionReplies: 2Last Post: 27th Jul 2019, 12:42 -
FPS Upscaling issue
By syrpent in forum EditingReplies: 1Last Post: 8th Apr 2019, 19:24 -
29.97 fps video converted to 23.97 dosent sync with other 23.97
By wesleyandrews in forum Video ConversionReplies: 6Last Post: 17th Dec 2016, 00:21 -
Token Issue with some streams
By boss100 in forum Video Streaming DownloadingReplies: 0Last Post: 22nd Feb 2016, 19:49