public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Haller <gentoo@dhaller.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Video editing advice on formats and size of file
Date: Fri, 4 May 2012 01:30:00 +0200	[thread overview]
Message-ID: <20120503233000.GB26579@grusum.endjinn.de> (raw)
In-Reply-To: <CA+czFiDi0ArsLnE0as1LTd-KdrpwSf_GGSsz_KQG2=ij7kp0sg@mail.gmail.com>

Hello,

On Fri, 23 Dec 2011, Michael Mol wrote:
>I'd suggest you give the other tools a try, too. The other tools
>brought up will do essentially the same thing as avidemux; they're
>just ripping the audio and video streams out of the source container
>files and placing them into a new container file.

mkvmerge has the -y option where you can specify

- an offset for a specific track (e.g. delay the audio track by
  1000ms)
- and specify a ratio how one track is faster/slower than the other.

For example: I recently had a subtitle track declared as PAL (25fps)
but it was actually NTSC (23.97fps). Additionally, there was an
offset. So, I used:

mkvmerge -o output.mkv --language 1:en input1.avi --language 0:de \
    -D input_sound2.ac3 \
    -y 0:-7000,23.97/25 subtitle1.srt
       | ^^|^^ ^^^^^^^^- delay ratio / skew
       |   `- absolute offset (-7s)
       `- track 0 of the input file (i.e. subtitle1.srt), with the
          usual video+audio in one file, it'd be Track 1: for the
          audio, use mkvinfo/mediainfo on the input to find out.

(or the other way around resp. PAL/NTCS rates, anyway, according to my
~/.bash_history the above gave me the correct output ;)

By that feature, you can offset one track (e.g. sound or subs) by an
absolute time and skew it at a relative ratio (when one track is
"faster" than the other, usually PAL vs. NTSC or 24fps. Anyway, try
those ratios ,23.97/25 or ,25/23.97 first ;) After determining the
"absolute offset" as early in the file as possible.

When stitching files together, it might be that just one file has that
problem, so, remux that one file with an -y 0:offset,skew into a
temp-file and then append the temp to the other input (or vice versa).

Takes a bit of testing etc., but you should be able to solve all
"stable" desyncronizations.

You're lost if the desync varies over one file (e.g. +1s at the start,
+2 at 25%, in sync at 50%, +3s at 60%, -2s at 75%, +1s at the end...)

HTH,
-dnh

-- 
> Good. now let's bash PHP.                                    -- Satya
I thought we were talking about programming languages? -- Peter Corlett



  parent reply	other threads:[~2012-05-03 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23 14:18 [gentoo-user] Video editing advice on formats and size of file Dale
2011-12-23 14:45 ` Michael Mol
2011-12-24  1:52   ` Dale
2011-12-24  3:26     ` Dale
2011-12-24  3:50       ` Michael Mol
2011-12-24  8:54         ` Dale
2011-12-24 10:36           ` Dale
2011-12-24 15:41             ` Michael Mol
2011-12-24 17:42               ` pk
2012-05-03 23:30         ` David Haller [this message]
2011-12-23 14:49 ` [gentoo-user] " Grant Edwards
2011-12-24  1:55   ` Dale
2012-01-01 18:56     ` Mick
2012-01-04  3:14       ` Claudio Roberto França Pereira
2012-05-03 23:07       ` David Haller
2011-12-23 16:29 ` [gentoo-user] " David Haller
2011-12-24  1:57   ` Dale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120503233000.GB26579@grusum.endjinn.de \
    --to=gentoo@dhaller.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox