Tranquillity Base > AV Sync Fix > User Guide

User Guide

Opening Files

Choose File > Open and select the file(s). Or drag the file(s) to the application icon.

MOV, MP4 (mp4, m4v) File Structure

A rough understanding of the file structure will be useful for editing.

A file has sound and video media data and a playback information that consists of tracks for each media.

A track has one or more track-segment that consists of a time-mapping that specifies the starting time within the media data, playback duration and speed rate. Movie players play the media data in the order of the track-segments. The sum of playback duration of track-segments is the track duration.

You can set an empty track-segment that plays nothing. The last one in a track should never be an empty.

AV Sync Fix is an app for adjusting time-mapping in track-segment to fix out of sync audio and video.

The track-segment specification is defined in the "QuickTime File Format Specification", so movie players should play videos according to them. But there are few movie players that completely support it except Apple's ones.

Times in Time Scale Unit

In MOV and MP4 files, time data is recorded as two integer values called Time Value and Time Scale. That is the relation of the denominator and the numerator to indicate time. Time scale is the number of time units in one second. if a time scale is 600, each unit represents a six-hundredth of a second.

For example, a time vale 638472, a time scale 600. this is 638472/600 seconds. So 17m44s and 72/600 seconds. The time edit fields show it 00:17:44.072 in AV Sync Fix. And take note that the fractional value “.072” is not 72/1000 seconds.

You do not pay attention to the Time Value when editing hours, minutes, and seconds, but you must pay attention to the Time Scale when editing fractional value.

For example, If a time scale is 600, you can enter fractional value from .000 to .599. If a time scale is 2997, you can enter fractional value from .0000 to .2996.
And if you want to enter it as 0.5 seconds, enter .300 when a time scale 600. But when a time scale is 2997, enter .1498 or .1499. You cannot enter as the exact 0.5 seconds if the time scale is odd.

Editing in not-millisecond unit makes you confused. But conversion errors may occur if editing in millisecond unit. So AV Sync Fix edits times in time scale unit to get the exact results user expected.

Time Scale is not editable.

Two Time Scales

MOV and MP4 have two types of Time Scale. They can be the same or different.

Main Window
Track-Segment Editor

Movie Info

  • Duration:
    The duration of the movie. This time is editable. But normally it corresponds to the duration of the longest track in the movie.
    Editing Movie Duration
  • Time Scale:
    Movie Time Scale. All time-values are in this time unit except ones of media data.

Track Info

  • Play Time Range:
    If you enter a time in the Start field, an empty track-segment will be inserted at the first track-segment.
    Changing the End time will change the duration of the last track-segment.
  • Speed Rate:
    You can change the speed rate of the track-segment. But it's not recommended settings other than 1.00 because there are few movie players that support it except Apple's ones.
  • Duration:
    The playback duration of the track-segment.
    Changing the duration of the last track-segment will change the track duration.
    Changing an other than the last one will not change the track duration due to the expansion or contraction of the duration of the next of it. But if you change it with pressing the shift key, the duration of the next track-segment will not expand or contract. So the track duration will be changed.
  • Media Time:
    The time to start playing within the media data (in Media Time Scale units).
  • Media Data:
    The duration of the media data and its Time Scale (Media Time Scale).
Button Option

Modifier key options of decrease (<) and increase (>) buttons.

Dragging Track-Segment

Dragging a track-segment edits its Media Time. If you want to edit for multiple track-segments, select track-segments you want to with command key and drag.

If you drag the track-segment to the right and the beginning of the media data leaves the left side of the track-segment, a new empty track-segment will be inserted.
If the dragging track-segment is the first one, the duration time of the inserted empty track-segment is the start time of the track.

Entering time in the "Start" field is the same as inserting an empty track-segment at the beginning or editing the duration of the existing first empty track-segment.

Dragging with shift key:
Dragging a second or any later track-segment with the shift key edits the duration of its previous one. It's not change the Media Time and the end time of the track-segment. In many cases, you don't want to change the Media Time by dragging.

For example, if the first track-segment is emty, the Media Time of the second track-segment is the start time of the track, such as Figure 1.
Dragging the second track-segment will change the Media Time, such as Figure 1 to 2.
If you don't want to change the Media Time, drag with the shift key, such as Figure 1 to 3.

Figure 1:

Figure 2: Dragged without shift key.
The time that the sound comes out is not changed. The sound of the beginning is changed.

Figure 3: Dragged with shift key.
The time that the sound comes out brings forward. The sound of the beginning is not changed.

Dragging Border of Track-Segments

Dragging a border of the track-segments edits the Durations of them.

When you drag the border of the segments, the duration of one increases and the other decreases. That does not affect the track duration.

Dragging with shift key:
If you drag the border with the shift key, the duration of the right side track-segment will not be changed. And that affects the track duration.
In the Track-Segment Editor, you'll get the same result when you edit by entering the time with the shift key in the "Duration" field.

Marking on Timeline

You can use a marker on the timeline as a guide when dragging to fix.

  • Mark:
    Mark the time indicated by the Fixed Playhead.
  • Align:
    Align the time marked with the time marked on the other track.
    The top Align button aligns the video's marked time with the sound's one.
    The bottom Align button aligns the sound's marked time with the video's one.
  • Skip to Marker:
    Skip the playing time to the time marked.
Editing Movie Duration

Normally a movie duration corresponds to the duration of the longest track in the movie.

It can be editable. Enter a time in the Duration field or choose a time of track duration from the Duration pop-up menu.
If "Always Fitting to Longest Track" is checked, the movie duration will be the same as the longest track duration automatically by editing track duration.

Play Selection Only

To select a portion of a movie, choose Controls > Play Selection Only to appear the In / Out selection markers, and then move the markers. To fine-tune the selection, select a marker and move it with the left or right arrow key.

When you choose Controls > Deselect, the selection markers move to the playhead.

Play Control Keyboard Shortcuts

Space bar or returnPlay or Stop
command (⌘) + ↑Go to the beginning of a movie
command (⌘) + ↓Go to the end of a movie
option (⌥) + command (⌘) + ↑Go to the selection start
option (⌥) + command (⌘) + ↓Go to the selection end
Go back one frame
Go forward one frame
command (⌘) + ←Go back 5 seconds (Default)
command (⌘) + →Go forward 5 seconds (Default)
option (⌥) + command (⌘) + ←Go back 30 seconds (Default)
option (⌥) + command (⌘) + →Go forward 30 seconds (Default)
option (⌥) + ←Go back 1 second (Default)
option (⌥) + →Go forward 1 second (Default)
control (⌃) + option (⌥) + ←Go back 0.5 seconds (Default)
control (⌃) + option (⌥) + →Go forward 0.5 seconds (Default)
JSpeed down
KNormal speed
LSpeed up
MReverse play
Customizing Skip Times

Choose Controls > Customize Skip Times...
You can set them to 0.5, 1, 3, 5, 10, 15, 20, or 30 seconds.