Verify the original videos
Run this command for both original files:
ffprobe -v error \
-show_entries stream=index,codec_type,codec_name,width,height,r_frame_rate,avg_frame_rate,duration:format=duration \
-of default=noprint_wrappers=1 \
"video1.mkv"
Convert the Danish audio speed
The exact conversion factor from 25 FPS to 23.976 FPS (24000/1001) is:
24000 / (1001 × 25) = 0.959040959
Extract and slow down the Danish audio:
ffmpeg -i "video1.mkv" \
-map 0:a:0 \
-af "atempo=0.959040959" \
-c:a flac \
"danish_audio.mka"
Combine the HD video and Danish audio
ffmpeg -i "video2.mkv" \
-i "danish_audio.mka" \
-map 0:v:0 \
-map 1:a:0 \
-c:v copy \
-c:a copy \
-metadata:s:a:0 language=dan \
-metadata:s:a:0 title="Danish" \
"movie_danish.mkv"
Adjust the audio synchronization
If the Danish audio needs to start 2.5 seconds later:
ffmpeg -i "video2.mkv" \
-itsoffset 2.500 -i "danish_audio.mka" \
-map 0:v:0 \
-map 1:a:0 \
-c copy \
-metadata:s:a:0 language=dan \
-metadata:s:a:0 title="Danish" \
"movie_danish.mkv"
Calculate the exact speed using matching scenes
If the standard PAL conversion factor doesn’t work, you can calculate the correct factor manually using two identical scenes.
For example:
| Scene | Video 1 (Danish) | Video 2 (HD) |
|---|---|---|
| Scene A | 00:01:00 | 00:01:10 |
| Scene B | 01:01:00 | 01:03:43.75 |
| Elapsed time | 3600 seconds | 3753.75 seconds |
Calculate:
Audio speed = elapsed time Video 1 / elapsed time Video 2
Audio speed = 3600 / 3753.75
Audio speed = 0.959040959
The advantage of this method is that any difference in the opening scenes is eliminated from the calculation.
