copy-edit chapter 23. yo videotimeline :)

This commit is contained in:
Jörn Nettingsmeier 2014-02-05 23:26:06 +01:00
parent 8a9d65511e
commit b386ec9a70
4 changed files with 185 additions and 177 deletions

View File

@ -3,50 +3,46 @@ layout: default
title: Video Timeline and Monitoring
---
<h2>Introduction</h2>
<p>
The integration of a video timeline and video monitoring into Ardour 3.2 allows for convenient audio mixing and editing to video ie soundtracks, music videos, TV post production etc.
Ardour offers a <dfn>video timeline</dfn> and <dfn>video monitoring</dfn>
for convenient audio mixing and editing to video, in order to produce
film soundtracks and music videos, or perform TV postproduction tasks.
</p>
<p>
Ardour 3.2 (and later) facilities to:
The video capabilities are:
</p>
<ul>
<li>Import a single video and optionally extract the soundtrack from it.
</li>
<li>Provide a Video-monitor window, or full-screen display, of the imported video in sync with any of the available Ardour timecode sources.
</li>
<li>Display a frame-by-frame (thumbnail) timeline of the video.
</li>
<li>time-offset the video.
</li>
<li><em>Lock</em> audio-regions to the video: Move audio-regions with the video at video-frame granularity.
</li>
<li>Export the video, cut start/end, add blank frames and/or mux it with the soundtrack of the current-session.
</li>
<li>Import a single video and optionally extract the soundtrack from it.</li>
<li>Provide a video monitor window, or full-screen display, of the
imported video in sync with any of the available Ardour timecode
sources.</li>
<li>Display a frame-by-frame (thumbnail) timeline of the video.</li>
<li>Allow for a configurable timecode offset.</li>
<li><em>Lock</em> audio regions to the video.</li>
<li>Move audio regions with the video at video-frame granularity.</li>
<li>Export the video, trim start and end, add blank frames and/or
multiplex it with the soundtrack of the current session.</li>
</ul>
<p>
Furthermore, the setup is modular and can be configured in different ways, including:
The setup of the video subsystem is modular and can be configured
in different ways, including:
</p>
<ul>
<li>One machine: all video decoding, video monitoring and Ardour audio
</li>
<li>Two machines: separate video-monitor and Ardour
</li>
<li>Three machines: separate video-server (for timeline decoding and file-archive), dedicated video-monitor and Ardour
</li>
<li>One machine for all video decoding, video monitoring and audio editing
tasks</li>
<li>Two machines, one for video monitoring, one for Ardour</li>
<li>Three machines, separate video server (for timeline decoding
and file archive), dedicated video monitor, and Ardour</li>
</ul>
<p>
Ardour does <strong>not</strong> :
Ardour does <em>not</em>:
</p>
<ul>
<li>allow for more than one video to be loaded at a time.
</li>
<li>provide video editing capabilities
</li>
<li>allow for more than one video to be loaded at a time.</li>
<li>provide video editing capabilities</li>
</ul>
{% children %}

View File

@ -4,82 +4,82 @@ title: Video Timeline Setup
---
<p>
No configuration is required if you intend to run everything on a single machine, and if you acquired Ardour from <a href="http://www.ardour.org" title="http://www.ardour.org">http://www.ardour.org</a>, everything is pre-configured and included with the download/install.
No configuration is required if you intend to run everything on a single
machine, and if you acquired Ardour from
<a href="http://www.ardour.org"
title="http://www.ardour.org">http://www.ardour.org</a>.
Everything is pre-configured and included with the download/install.
</p>
<h2>Single Machine</h2>
<p>
If you compile Ardour from source, or have installed it from a 3rd party repository, additional tools will need to be installed manually.
</p>
<p>
There are three separate standalone tools which are used by Ardour to provide video features.
</p>
<ul>
<li>xjadeo the video monitor window<a href="http://xjadeo.sf.net" title="http://xjadeo.sf.net" rel="nofollow">http://xjadeo.sf.net</a>
</li>
<li>harvid a video decoder used for the thumbnail timeline <a href="http://x42.github.com/harvid/" title="http://x42.github.com/harvid/" rel="nofollow">http://x42.github.com/harvid/</a>
</li>
<li>ffmpeg, ffprobe used to import/export video, extract soundtracks and query video information <a href="http://ffmpeg.org" title="http://ffmpeg.org" rel="nofollow">http://ffmpeg.org</a>
</li>
If you compile Ardour from source, or have installed it from a 3rd party
repository, three additional tools will need to be installed manually,
which are used by Ardour to provide video features:
</p>
<ul>
<li>xjadeo (the video monitor application): <a href="http://xjadeo.sf.net"
title="http://xjadeo.sf.net" rel="nofollow">http://xjadeo.sf.net</a></li>
<li>harvid (a video decoder used for the thumbnail timeline): <a
href="http://x42.github.com/harvid/" title="http://x42.github.com/harvid/"
rel="nofollow">http://x42.github.com/harvid/</a></li>
<li>ffmpeg, ffprobe (used to import/export video, extract soundtracks and
query video information): <a href="http://ffmpeg.org" title="http://ffmpeg.org"
rel="nofollow">http://ffmpeg.org</a></li>
</ul>
<p>
Ardour requires xjadeo &ge; version 0.6.4, harvid &ge; version 0.7.0 and ffmpeg = 1.2.
Ardour requires xjadeo &ge; version 0.6.4, harvid &ge; version 0.7.0 and ffmpeg = 1.2.
</p>
<p>
The Ardour development team is <em>in control</em> of the first two applications. ffmpeg can be a bit of a problem.
To avoid conflicts with distribution packages, Ardour looks for <code>ffmpeg_harvid</code> and <code>ffprobe_harvid</code>.
The Ardour development team is in control of the first two applications. ffmpeg
however can be a bit of a problem. To avoid conflicts with distribution packages,
Ardour looks for <code>ffmpeg_harvid</code> and <code>ffprobe_harvid</code>.
</p>
<p>
All four applications need to be found in <code>$PATH</code> (e.g. <code>$HOME/bin</code> or <code>/usr/local/bin</code>). For convenience the binary releases of harvid include ffmpeg_harvid and ffprobe_harvid, but if your distribution provides suitable ffmpeg commands you can also just create a symbolic link from ffmpeg → ffmpeg_harvid and ffprobe → ffprobe_harvid.
All four applications need to be found in <code>$PATH</code> (e.g.
<code>$HOME/bin</code> or <code>/usr/local/bin</code>). For convenience the
binary releases of harvid include ffmpeg_harvid and ffprobe_harvid, but if
your distribution provides suitable ffmpeg commands you can also just create
symbolic links:
</p>
<kbd class="cmd lin">sudo ln -s /usr/bin/ffmpeg /usr/bin/ffmpeg_harvid</kbd>
<kbd class="cmd lin">sudo ln -s /usr/bin/ffprobe /usr/bin/ffprobe_harvid</kbd>
<p>
Binary releases are available from ardour.org as well as an installer script: <a href="https://github.com/Ardour/ardour/blob/master/tools/videotimeline/install_video_tools.sh" title="https://github.com/Ardour/ardour/blob/master/tools/videotimeline/install_video_tools.sh" rel="nofollow">install_video_tools.sh</a>.
Binary releases are available from ardour.org as well as an installer script:
<a href="https://github.com/Ardour/ardour/blob/master/tools/videotimeline/install_video_tools.sh"
title="https://github.com/Ardour/ardour/blob/master/tools/videotimeline/install_video_tools.sh"
rel="nofollow">install_video_tools.sh</a>.
</p>
<p>
The easiest way to install the video-utilities is by running the following line in a terminal:
The easiest way to install the video-utilities is by running the following
line in a terminal:
</p>
<pre class="code">sh -c &quot;$(curl -s -L http://git.io/tVUCkw)&quot;</pre>
<kbd class="cmd lin">sh -c &quot;$(curl -s -L http://git.io/tVUCkw)&quot;</kbd>
<h2>Studio Setup</h2>
<p>
Please read the info in the previous section to familiarize yourself with the tools involved first.
Setting up a proper A/V post-production studio can be a complicated task. As much as we streamline and simply the <em>single machine</em> setup, the studio-setup is focused on modularity.
Please read the info in the previous section to familiarize yourself with
the tools involved first. Setting up a proper A/V post-production studio
can be a complicated task. As much as we streamline and simplify the
<em>single machine</em> setup, the <dfn>studio setup</dfn> is focused on modularity.
</p>
<p>
<em>TODO</em>
</p>
<ul class="fixme">TODO</p>
<ul>
<li>Synchronization ardour → video-display-box should be accomplished by external means jack-transport(netjack), MTC, LTC (<abbr title="Open Sound Control - &quot;postmodern MIDI&quot;">OSC</abbr> and/or ssh-pipe work but introduce additional latency + jitter)
</li>
</ul>
<ul>
<li>Synchronization ardour → video-display-box should be accomplished by external
means jack-transport(netjack), MTC, LTC
(<abbr title="Open Sound Control - &quot;postmodern MIDI&quot;">OSC</abbr> and/or
ssh-pipe work but introduce additional latency + jitter)</li>
<li>Ardour launches <code>XJREMOTE</code> (environment variable, default &#039;xjremote&#039; which comes with xjadeo).
</li>
</ul>
<ul>
<li>Either use a custom shell script that ssh&#039;es into the remote box and launches/controls xjadeo there, selects the sync-source and passes though communication between ardour ⇔ xjadeo via ssh (xjadeo is launched stopped with the session).
</li>
</ul>
<ul>
<li>..or override xjremote&#039;s behavior instead of IPC with a local running xjadeo-process, using <abbr title="Open Sound Control - &quot;postmodern MIDI&quot;">OSC</abbr> for example. xjadeo would run permanently and Ardour will just tell it to load files and set offsets via <acronym title="Open Sound Control - &quot;postmodern MIDI&quot;">OSC</acronym>. see <a href="http://xjadeo.git.sourceforge.net/git/gitweb.cgi?p=xjadeo/xjadeo;a=blob_plain;f=contrib/xjremote-osc" title="http://xjadeo.git.sourceforge.net/git/gitweb.cgi?p=xjadeo/xjadeo;a=blob_plain;f=contrib/xjremote-osc" rel="nofollow">xjremote-osc</a> example script.
</li>
</ul>
<ul>
<li>If the video server runs remotely, Ardour needs to be configured in Ardour &gt; Preference &gt; Video (hostname of the video-server).
</li>
</ul>
<p>
<li>
Ideally the machines have a common shared folder (NFS or similar). Ardour&#039;s import (audio-extract) and export (mux) functionality depends on having access to the video file. Also Ardour's video-import transcodes the file into a suitable proxy-format that allows reliable seeking to any frame…
</p>
</li>
</ul>

View File

@ -3,46 +3,60 @@ layout: default
title: Transcoding, Formats &amp; Codecs
---
<h2>Video Formats and Codecs</h2>
<p>
A short primer on video-files, formats and codecs because it is often cause for confusion:
This chapter provides a short primer on video files, formats and
codecs because it is often cause for confusion:
</p>
<p>
A video file is a <em>container</em>. It usually contains one video-track and one or more audio-tracks.
A video file is a <dfn>container</dfn>. It usually contains one
<dfn>video track</dfn> and one or more <dfn>audio tracks</dfn>.
How these tracks are stored in the file is defined by the
<dfn>file format</dfn>. Common formats are
avi, mov, ogg, mkv, mpeg, mpeg-ts, mp4, flv, or vob.
</p>
<p>
How these tracks are stored in the file is defined by the <em>file-format</em>. Common formats are avi, mov, ogg, mkv, mpeg, mpeg-ts, mp4, flv, vob
Each of the tracks by itself is encoded using a <abbr
title="Coder-Decoder"><dfn>Codec</dfn></abbr>. Common video codecs
are h264, mpeg2, mpeg4, theora, mjpeg, wmv3. Common audio codecs are
mp2, mp3, dts, aac, wav/pcm.
</p>
<p>
Each of the tracks by itself in <em>encoded</em> - using a <abbr title="Coder-Decoder">Codec</abbr>. Common Video-Codecs are h264, mpeg2, mpeg4, theora, mjpeg, wmv3. Audio-Codecs: mp2, mp3, dts, aac, wav/pcm.
Not all codecs can be packed into a given format. For example the
mpeg format is limited to mpeg2, mpeg4 and mp3 codecs (not entirely true).
DVDs do have stringent limitations as well. The opposite would be .avi;
pretty much every audio/video codec combination can be contained in an avi
file-format.
</p>
<p>
Not all codecs can be packed into a given format. For example the &#039;mpeg&#039; format is limited to mpeg2, mpeg4 and mp3 codecs (not entirely true). DVDs do have stringent limitations as well. The opposite would be .avi; pretty much every audio/video codec combination can be contained in an avi file-format.
To make things worse, naming conventions for video codecs and formats are
often identical (especially MPEG ones) which leads to confusion.
All in all it is a very wide and deep field. Suffice there are different
uses for different codecs and formats.
</p>
<h2>Ardour specific issues</h2>
<p>
To make things worse, naming conventions for video codecs and formats are often identical (esp mpeg ones) which leads to confusion.
All in all it is a very wide and deep field. Suffice there are different uses for different codecs and formats.
Ardour supports a wide variety of video file formats codecs. More
specifically, Ardour itself actually does not support any video at all
but delegates handling of video files to <a
href="http://ffmpeg.org">ffmpeg</a>, which supports over 350 different
video codecs and more than 250 file formats.
</p>
<h2>Ardour specific</h2>
<p>
Ardour supports a wide variety of video file-formats and video-codecs. More specifically, Ardour itself actually does not support any video at all but delegates handling of video files to <a href="http://ffmpeg.org">ffmpeg</a> which supports over 350 different video-codecs and more than 250 file-formats.
When importing a video into Ardour, it will be <dfn>transcoded</dfn>
(changed from one format and codec to another) to avi/mjpeg for internal
use (this allows reliable seeking to frames at low CPU cost &mdash; the
file size will increase, but hard disks are large and fast).
</p>
<p>
When importing a video into Ardour, it will be <em>transcoded</em> (transcoding: change from one format and codec to another) to avi/mjpeg for internal use (this allows reliable seeking to frames at low CPU cost - the file-size will increase, but hard-disks are large and fast).
The export dialog includes presets for common format and codec
combinations (such as DVD, web-video,..). If in doubt use one of the
presets.
</p>
<p>
The export dialog includes presets for common format &amp; codec combinations (such as DVD, web-video,..). If in doubt use one of the presets.
</p>
<p>
As last note: Every time a video is transcoded the quality can only get worse. Hence for the final mastering/<abbr title="Multiplexing Audio and Video">muxing</abbr> process, one should always to back and use the original source of the video.
As last note: every time a video is transcoded, the quality can only get
worse. Hence for the final mastering/<abbr
title="Multiplexing Audio and Video">muxing</abbr> process, one should
always to back and use the original source of the video.
</p>

View File

@ -5,116 +5,114 @@ title: Workflow &amp; Operations
<h2>Overview of Operations</h2>
<dl class="narrower-table">
<dt>Session &gt; Open Video</dt><dd>Add/replace a video to/on the timeline</dd>
<dt>Window &gt; View Monitor</dt><dd>Open/close external video monitor window</dd>
<dt>View &gt; Video Monitor &gt;</dt><dd>Various settings of the video monitor</dd>
<dt>Session &gt; Export &gt; Video</dt><dd>Export session and multiplex with video-file</dd>
<dt>Drag the video in the timeline</dt><dd>Re-align video and move 'locked' audio-regions along</dd>
<dt>Context-menu on the video-timeline: &#039;lock&#039;</dt><dd>Prevent accidental drags</dd>
<dt>Audio-Region &gt; context-menu &gt; Position &gt; Lock to video</dt><dd>Mark audio-region(s) to be moved along with the video.</dd>
<dl class="wide-table">
<dt><kbd class="menu">Session &gt; Open Video</kbd></dt>
<dd>Add/replace a video to/on the timeline</dd>
<dt><kbd class="menu">Window &gt; View Monitor</kbd></dt>
<dd>Open/close external video monitor window</dd>
<dt><kbd class="menu">View &gt; Video Monitor &gt;</kbd></dt>
<dd>Various settings of the video monitor</dd>
<dt><kbd class="menu">Session &gt; Export &gt; Video</kbd></dt>
<dd>Export session and multiplex with video-file</dd>
<dt><kbd class="mouse">Left</kbd>-drag the video in the timeline</dt>
<dd>Re-align video and move 'locked' audio-regions along</dd>
<dt>Context-menu on the video-timeline: <kbd class="menu"> &#039;lock&#039;</kbd></dt>
<dd>Prevent accidental drags</dd>
<dt>Audio region context menu: <kbd class="menu">Position &gt; Lock to video</kbd></dt>
<dd>Mark audio region(s) to be moved along with the video.</dd>
</dl>
<h2>Adding Video</h2>
<p>
Adding video is a two-step process.
Adding video is a two-step process: select a video file, and choose
import mode and optionally select an audio track to extract.
</p>
<ol>
<li>Select video file
</li>
<li>Choose import-mode and optionally select an audio-track to extract
</li>
</ol>
<p>
<br/>
The first step is rather straight-forward. The panel on the right side
allows to seek through the video and displays basic file information.
It is also useful to check if the video format/codec is supported:
</p>
<p>
The first step is rather straight forward: The panel on the right side allows to seek through the video and displays basic file information. It is also useful to check if the video format/codec is supported:
</p>
<p>
<img src="/files/a3/a3_video_open.png" alt="video-open-dialog" width="300" />
</p>
<p>
<br/>
The second step analyzes the video file in more detail and offers import options:
</p>
<dl>
<dt><kbd class="menu">Import/Transcode to Session</kbd></dt>
<dd>This is the default. The video will be imported in a suitable
video format/codec for the timeline and video monitor and saved inside the
session folder. A location other than the session folder can also be
chosen (external disk, or network storage of the video server on a different
machine).</dd>
<dt><kbd class="menu">Reference from Current Location</kbd>
<dd>Only useful for opening files that were previously encoded (are already
in a good format/codec). Use with care.</dd>
<dt><kbd class="menu">Do not Import Video</kbd></dt>
<dd>Useful for extracting audio only.</dd>
</dl>
<p>
The second step analyzes the video file in more detail and offers import options:
</p>
<ul>
<li><strong>Import/Transcode to Session</strong>. This is the default. The video will be imported in a suitable video-format/codec for the timeline and video monitor and saved inside the session folder. A location other than the session folder can also be chosen (external disk, network storage of the video server on a different machine…).
</li>
<li><strong>Reference from Current Location</strong>. Only useful for opening files that were previously encoded (are already in a good format/codec) use with care.
</li>
<li><strong>Do not Import Video</strong> - useful for extracting audio only.
</li>
</ul>
<p>
<img src="/files/a3/a3_video_import.png" alt="Video Import Dialog" width="300" />
</p>
<p>
<br/>
</p>
<p>
By default the video is imported using the original width/height.
If it is a large video (e.g. full-HD) it makes sense to scale it down to decrease the CPU load and disk I/O which required to decode and play the file.
A small, low-quality representation of the image is usually sufficient for editing sound-tracks.
The default bitrate in kbit/sec is set to use 0.7 bits per pixel. (compare: the average DVD medium uses 5000kbit/sec; at PAL resolution this is about 0.5 bits per pixel - but the DVD is using the <em>mpeg2</em> - a denser compression algorithm than the <em>mjpeg</em> codec used by Ardour.)
By default the video is imported using the original width/height.
If it is a large video (e.g. full-HD) it makes sense to scale it down
to decrease the CPU load and disk I/O required to decode and play the
file.<br />
A small, low-quality representation of the image is usually sufficient
for editing soundtracks. The default bitrate in kbit/sec is set to use
0.7 bits per pixel. (Compare: the average DVD medium uses 5000&nbsp;kbit/s;
at PAL resolution this is about 0.5 bits per pixel. But the DVD is
using the <dfn>mpeg2</dfn> &mdash; a denser compression algorithm than the
<dfn>mjpeg</dfn> codec used by Ardour.)
</p>
<h2>Working with A/V</h2>
<p>
Well now,..
Well now,..
</p>
<p>
<img src="/files/a3/a3_videotimeline.png" alt="Video Timeline" width="600" />
</p>
<h2><a id="export" name="export"></a>Exporting Video</h2>
<h2 id="export">Exporting Video</h2>
<p>
The video-export will take audio from the current Ardour session and multiplex it with a video-file.
The video export will take audio from the current Ardour session and
multiplex it with a video file. The soundtrack of the video is taken from
an audio export of Ardour's master bus.
</p>
<p>
An arbitrary video file can be chosen. For high quality exports, the
original file (before it was imported into the timeline) should be used.
This is the default behaviour if that file can be found. If not, Ardour
will fall back to the imported proxy-video which is currently in use
on the timeline. Any existing audio tracks on this video file are stripped.
</p>
<p>
The range selection allows to cut or extend the video. If the session is
longer than the video duration, black frames are prefixed or appended to
the video. (Note: this process may fail with non-standard pixel aspect
ratios). If Ardour's session range is shorter, the video will be cut accordingly.
</p>
<p>
The soundtrack of the video is taken from an audio-export of Ardour's master bus.
Audio samplerate and normalization are options for Ardour's audio exporter.
The remaining settings are options that are directly passed on to ffmpeg.
</p>
<p>
The video file can be chosen freely, For high quality exports, the original file (before it was imported in the timeline) should be used. This is also the default if the file can be found, if not Ardour will suggest to use the imported proxy-video which is currently in use on the timeline. Any existing audio tracks on the video-file are stripped.
The file format is determined by the extension that you choose for it
(.avi, .mov, .flv, .ogv, .webm,...)
Note: not all combinations of format, codec, and settings produce files
which are according to specifications. For example, flv files require
sample rates of 22.1&nbsp;kHz or 44.1&nbsp;kHz, mpeg containers can not
be used with ac3 audio-codec, etc. If in doubt, use one of the built-in
presets.
</p>
<p>
The range selection allows to cut or extend the video. If the session is longer than the video duration, black frames are prefixed or appended to the video (Note: this process may fail with non-standard pixel-aspect-ratios). If Ardour&#039;s session range is shorter the video will be cut accordingly.
</p>
<p>
Audio-samplerate and normalize-audio are options for Ardour's audio exporter. The remaining settings are options that are directly passed on to ffmpeg.
</p>
<p>
The file-format is determined by the file-extension that you choose for the output file (.avi, .mov, .flv, .ogv, .webm,...)
Note: not all combinations of format+codec+settings produce files which are according so spec. e.g. flv files require sample-rates of 22.1kHz or 44.1kHz, mpeg containers can not be used with ac3 audio-codec, etc. If in doubt, use one of the built-in presets
</p>
<p>
<img src="/files/a3/a3_video_export.png" alt="Video Export Dialog" width="300" />
</p>
<p>
Ardour video export is not recommended for mastering!\nWhile 'ffmpeg' (which is used by Ardour) can produce high-quality files, this export lacks the possibility to tweak many settings. We recommend to use 'winff', 'devede' or 'dvdauthor' to mux &amp; master. Nevertheless this video-export comes in handy to do quick snapshots, intermediates, dailies or online videos.
Ardour video export is not recommended for mastering! While ffmpeg
(which is used by Ardour) can produce high-quality files, this export
lacks the possibility to tweak many settings. We recommend to use winff,
devede or dvdauthor to mux &amp; master. Nevertheless this video-export c
omes in handy to do quick snapshots, intermediates, dailies or online videos.
</p>