1 |
Hello, |
2 |
|
3 |
On Fri, 23 Dec 2011, Michael Mol wrote: |
4 |
>I'd suggest you give the other tools a try, too. The other tools |
5 |
>brought up will do essentially the same thing as avidemux; they're |
6 |
>just ripping the audio and video streams out of the source container |
7 |
>files and placing them into a new container file. |
8 |
|
9 |
mkvmerge has the -y option where you can specify |
10 |
|
11 |
- an offset for a specific track (e.g. delay the audio track by |
12 |
1000ms) |
13 |
- and specify a ratio how one track is faster/slower than the other. |
14 |
|
15 |
For example: I recently had a subtitle track declared as PAL (25fps) |
16 |
but it was actually NTSC (23.97fps). Additionally, there was an |
17 |
offset. So, I used: |
18 |
|
19 |
mkvmerge -o output.mkv --language 1:en input1.avi --language 0:de \ |
20 |
-D input_sound2.ac3 \ |
21 |
-y 0:-7000,23.97/25 subtitle1.srt |
22 |
| ^^|^^ ^^^^^^^^- delay ratio / skew |
23 |
| `- absolute offset (-7s) |
24 |
`- track 0 of the input file (i.e. subtitle1.srt), with the |
25 |
usual video+audio in one file, it'd be Track 1: for the |
26 |
audio, use mkvinfo/mediainfo on the input to find out. |
27 |
|
28 |
(or the other way around resp. PAL/NTCS rates, anyway, according to my |
29 |
~/.bash_history the above gave me the correct output ;) |
30 |
|
31 |
By that feature, you can offset one track (e.g. sound or subs) by an |
32 |
absolute time and skew it at a relative ratio (when one track is |
33 |
"faster" than the other, usually PAL vs. NTSC or 24fps. Anyway, try |
34 |
those ratios ,23.97/25 or ,25/23.97 first ;) After determining the |
35 |
"absolute offset" as early in the file as possible. |
36 |
|
37 |
When stitching files together, it might be that just one file has that |
38 |
problem, so, remux that one file with an -y 0:offset,skew into a |
39 |
temp-file and then append the temp to the other input (or vice versa). |
40 |
|
41 |
Takes a bit of testing etc., but you should be able to solve all |
42 |
"stable" desyncronizations. |
43 |
|
44 |
You're lost if the desync varies over one file (e.g. +1s at the start, |
45 |
+2 at 25%, in sync at 50%, +3s at 60%, -2s at 75%, +1s at the end...) |
46 |
|
47 |
HTH, |
48 |
-dnh |
49 |
|
50 |
-- |
51 |
> Good. now let's bash PHP. -- Satya |
52 |
I thought we were talking about programming languages? -- Peter Corlett |