Skip to content

Commit

Permalink
fix doc formatting and README
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Beatty committed Nov 26, 2013
1 parent b8cfad4 commit ee538d2
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 179 deletions.
25 changes: 14 additions & 11 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ mkvtomp4
========
Gavin Beatty <[email protected]>

<http://code.google.com/p/mkvtomp4/>

mkvtomp4: Uses mpeg4ip or GPAC's MP4Box, mkvtoolnix and ffmpeg to convert
troublesome mkv files to mp4.
Uses existing tools to convert troublesome mkv files to mp4.
The conversion does not re-encode the video and only re-encodes the audio if
it doesn't use AAC codec (one can override this behaviour using
`--audio-codec`).
They will be playable on the Sony PS3.
The resulting mp4 will be playable on the Sony PS3.

We depend on: *mkvtoolnix*, *mpeg4ip* or GPAC's *MP4Box* for the conversion.
*ffmpeg* is optional but required for audio transcoding.

Check the manual in `doc/mkvtomp4.1.txt`.

Expand All @@ -18,13 +18,16 @@ Dependencies
------------

Tools:
* mkvtoolnix
* mpeg4ip or GPAC's MP4Box
* ffmpeg

On Linux, use your package manager to install.
On Mac OS X, use MacPorts to install.
On Windows, go to the tools' individual websites and find windows binaries.
* *mkvtoolnix*
* *mpeg4ip* or GPAC's *MP4Box*
* *ffmpeg*

To install these tools:

* On Linux, use your package manager.
* On Mac OS X, use MacPorts or homebrew.
* On Windows, go to each tools' individual websites.

Everything else is written using only fully cross-platform python, except:

Expand Down
115 changes: 61 additions & 54 deletions doc/mkvtomp4.1
Original file line number Diff line number Diff line change
@@ -1,102 +1,109 @@
.TH "MKVTOMP4" "1" "November 24, 2013" "" ""
.SH NAME
.PP
mkvtomp4 \- convert H.264 mkv files to mp4 files playable on the PS3
mkvtomp4.py \- convert H.264 mkv files to mp4 files playable on the PS3
.SH SYNOPSIS
.PP
\f[I]mkvtomp4\f[] [\f[I]OPTIONS\f[]] [\-\-] \f[I]<mkvfile>\f[]
\f[I]mkvtomp4.py\f[] [OPTIONS] [\-\-] <mkvfile>
.PP
\f[I]mkvtomp4\f[] \f[I]\-\-correct\-profile\-only\f[] [\-\-]
\f[I]<rawh264file>\f[]
\f[I]mkvtomp4.py\f[] \-\-correct\-profile\-only [\-\-] <rawh264file>
.SH DESCRIPTION
.PP
Uses mpeg4ip or GPAC\[aq]s MP4Box, mkvtoolnix and ffmpeg to convert
troublesome mkv files to mp4.
Uses existing tools to convert troublesome mkv files to mp4.
The conversion does not re\-encode the video and only re\-encodes the
audio if it doesn\[aq]t use AAC codec (one can override this behaviour
using \f[C]\-\-audio\-codec\f[]).
They will be playable on the Sony PS3.
The resulting mp4 will be playable on the Sony PS3.
.PP
We depend on: \f[I]mkvtoolnix\f[], \f[I]mpeg4ip\f[] or GPAC\[aq]s
\f[I]MP4Box\f[] for the conversion.
\f[I]ffmpeg\f[] is optional but required for audio transcoding.
.SH OPTIONS
.TP
.B \-\-use\-mp4creator, \-\-use\-mp4box
Specify which mp4 backend to use.
mp4creator is the default.
.B \-o, \-\-output=<outfile>
Put the completed mp4 into \f[C]<outfile>\f[].
.RS
.RE
.TP
.B \-\-mp4creator=\f[I]<mp4creator>\f[]
Use <mp4creator> as the mp4creator command.
.B \-\-keep\-temp\-files
Keep all temporary files created while converting.
.RS
.RE
.TP
.B \-\-mp4box=\f[I]<mp4box>\f[]
Use <mp4box> as the mp4box command.
.B \-v, \-\-verbose
Print info about what is happening.
.RS
.RE
.TP
.B \-\-mkvinfo=\f[I]<mkvinfo>\f[]
Use <mkvinfo> as the mkvinfo command.
.B \-n, \-\-dry\-run
Don\[aq]t run any commands, but print them in a shellquoted format that
can be safely copy\-pasted by the user.
.RS
.RE
.PP
\-\-mkvextract=** : Use <mkvextract> as the mkvextract command.
.PP
\-\-video\-track=** : Use <video_track> from the mkv file instead of
trying to parse it.
.PP
\-\-audio\-track=** : Use <audio_track> from the mkv file instead of
trying to parse it.
.TP
.B \-\-audio\-delay\-ms=\f[I]<delay_ms>\f[]
When importing the audio track, delay by \f[C]\\<delay_ms>\f[]
milliseconds.
e.g., \f[C]\-\-audio\-delay\-ms\f[]=\f[C]1000\f[] delays by 1 second.
Not supported by mp4creator.
.B \-\-use\-mp4creator, \-\-use\-mp4box
Specify which mp4 backend to use.
mp4creator is the default.
.RS
.RE
.TP
.B \-\-audio\-bitrate=\f[I]<bitrate>\f[]
If/When converting audio, use the given bitrate.
e.g., \f[C]128\f[].
.B \-\-mp4creator=<mp4creator>
Use \f[C]<mp4creator>\f[] as the mp4creator command.
.RS
.RE
.TP
.B \-\-audio\-channels=\f[I]<channels>\f[]
If/When converting audio, use \f[C]\\<channels>\f[] channels in the
output.
e.g., \f[C]5.1\f[].
.B \-\-mp4box=<mp4box>
Use \f[C]<mp4box>\f[] as the mp4box command.
.RS
.RE
.TP
.B \-\-audio\-codec=\f[I]<codec>\f[]
If/When converting audio, convert to \f[C]\\<codec>\f[].
Default is \f[C]libfaac\f[].
This should be something supported by \f[I]ffmpeg\f[].
.B \-\-mkvinfo=<mkvinfo>
Use \f[C]<mkvinfo>\f[] as the mkvinfo command.
.RS
.RE
.TP
.B \-o, \-\-output=\f[I]<outfile>\f[]
Put the completed mp4 into \f[C]\\<outfile>\f[].
.B \-\-mkvextract=<mkvextract>
Use \f[C]<mkvextract>\f[] as the mkvextract command.
.RS
.RE
.TP
.B \-\-keep\-temp\-files
Keep all temporary files created while converting.
.B \-\-video\-track=<video_track>
Use \f[C]<video_track>\f[] from the mkv file instead of trying to parse
it.
.RS
.RE
.TP
.B \-v, \-\-verbose
Print info about what is happening.
.B \-\-audio\-track=<audio_track>
Use \f[C]<audio_track>\f[] from the mkv file instead of trying to parse
it.
.RS
.RE
.TP
.B \-n, \-\-dry\-run
Don\[aq]t run any commands, but print them in a shellquoted format that
can be safely copy\-pasted by the user.
.B \-\-audio\-delay\-ms=<delay_ms>
When importing the audio track, delay by \f[C]<delay_ms>\f[]
milliseconds.
e.g., \f[C]\-\-audio\-delay\-ms\f[]=\f[C]1000\f[] delays by 1 second.
Not supported by mp4creator.
.RS
.RE
.TP
.B \-\-audio\-bitrate=<bitrate>
If/When converting audio, use the given bitrate.
e.g., \f[C]128\f[].
.RS
.RE
.TP
.B \-\-audio\-channels=<channels>
If/When converting audio, use \f[C]<channels>\f[] channels in the
output.
e.g., \f[C]5.1\f[].
.RS
.RE
.TP
.B \-\-audio\-codec=<codec>
If/When converting audio, convert to \f[C]<codec>\f[].
Default is \f[C]libfaac\f[].
This should be something supported by \f[I]ffmpeg\f[].
.RS
.RE
.TP
Expand All @@ -106,7 +113,7 @@ Only correct the profile
.RE
.TP
.B \-\-stop\-before\-extract\-video
Exit before extracting video from \f[C]\\<mkvfile>\f[].
Exit before extracting video from \f[C]<mkvfile>\f[].
.RS
.RE
.TP
Expand All @@ -116,7 +123,7 @@ Exit before correcting profile of raw H.264 stream.
.RE
.TP
.B \-\-stop\-before\-extract\-audio
Exit before extracting audio from \f[C]\\<mkvfile>\f[].
Exit before extracting audio from \f[C]<mkvfile>\f[].
.RS
.RE
.TP
Expand All @@ -142,12 +149,12 @@ mp4 container.
.RS
.RE
.TP
.B \f[C]\\<mkvfile>\f[]
.B <mkvfile>
The Matroska (.mkv) file you wish to convert.
.RS
.RE
.TP
.B \f[C]\\<rawh264file>\f[]
.B <rawh264file>
The raw H.264 stream file that will have its profile corrected for use
on the PS3.
.RS
Expand All @@ -157,7 +164,7 @@ on the PS3.
Gavin Beatty <[email protected]>
.SH RESOURCES
.PP
Website: <http://code.google.com/p/mkvtomp4/>
Website: <http://github.com/gavinbeatty/mkvtomp4/>
.SH REPORTING BUGS
.PP
Please report all bugs and wishes to <[email protected]>
Expand Down
78 changes: 41 additions & 37 deletions doc/mkvtomp4.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,71 @@ <h2 class="author">Gavin Beatty</h2>
<h3 class="date">November 24, 2013</h3>
</div>
<h1 id="name">NAME</h1>
<p>mkvtomp4 - convert H.264 mkv files to mp4 files playable on the PS3</p>
<p>mkvtomp4.py - convert H.264 mkv files to mp4 files playable on the PS3</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p><em>mkvtomp4</em> [<em>OPTIONS</em>] [--] <em>&lt;mkvfile&gt;</em></p>
<p><em>mkvtomp4</em> <em>--correct-profile-only</em> [--] <em>&lt;rawh264file&gt;</em></p>
<p><em>mkvtomp4.py</em> [OPTIONS] [--] &lt;mkvfile&gt;</p>
<p><em>mkvtomp4.py</em> --correct-profile-only [--] &lt;rawh264file&gt;</p>
<h1 id="description">DESCRIPTION</h1>
<p>Uses mpeg4ip or GPAC's MP4Box, mkvtoolnix and ffmpeg to convert troublesome mkv files to mp4. The conversion does not re-encode the video and only re-encodes the audio if it doesn't use AAC codec (one can override this behaviour using <code>--audio-codec</code>). They will be playable on the Sony PS3.</p>
<p>Uses existing tools to convert troublesome mkv files to mp4. The conversion does not re-encode the video and only re-encodes the audio if it doesn't use AAC codec (one can override this behaviour using <code>--audio-codec</code>). The resulting mp4 will be playable on the Sony PS3.</p>
<p>We depend on: <em>mkvtoolnix</em>, <em>mpeg4ip</em> or GPAC's <em>MP4Box</em> for the conversion. <em>ffmpeg</em> is optional but required for audio transcoding.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>-o, --output=&lt;outfile&gt;</dt>
<dd><p>Put the completed mp4 into <code>&lt;outfile&gt;</code>.</p>
</dd>
<dt>--keep-temp-files</dt>
<dd><p>Keep all temporary files created while converting.</p>
</dd>
<dt>-v, --verbose</dt>
<dd><p>Print info about what is happening.</p>
</dd>
<dt>-n, --dry-run</dt>
<dd><p>Don't run any commands, but print them in a shellquoted format that can be safely copy-pasted by the user.</p>
</dd>
<dt>--use-mp4creator, --use-mp4box</dt>
<dd><p>Specify which mp4 backend to use. mp4creator is the default.</p>
</dd>
<dt>--mp4creator=<em>&lt;mp4creator&gt;</em></dt>
<dd><p>Use &lt;mp4creator&gt; as the mp4creator command.</p>
<dt>--mp4creator=&lt;mp4creator&gt;</dt>
<dd><p>Use <code>&lt;mp4creator&gt;</code> as the mp4creator command.</p>
</dd>
<dt>--mp4box=<em>&lt;mp4box&gt;</em></dt>
<dd><p>Use &lt;mp4box&gt; as the mp4box command.</p>
<dt>--mp4box=&lt;mp4box&gt;</dt>
<dd><p>Use <code>&lt;mp4box&gt;</code> as the mp4box command.</p>
</dd>
<dt>--mkvinfo=<em>&lt;mkvinfo&gt;</em></dt>
<dd><p>Use &lt;mkvinfo&gt; as the mkvinfo command.</p>
<dt>--mkvinfo=&lt;mkvinfo&gt;</dt>
<dd><p>Use <code>&lt;mkvinfo&gt;</code> as the mkvinfo command.</p>
</dd>
</dl>
<p>--mkvextract=*<mkvextract>* : Use &lt;mkvextract&gt; as the mkvextract command.</p>
<p>--video-track=*<video_track>* : Use &lt;video_track&gt; from the mkv file instead of trying to parse it.</p>
<p>--audio-track=*<audio_track>* : Use &lt;audio_track&gt; from the mkv file instead of trying to parse it.</p>
<dl>
<dt>--audio-delay-ms=<em>&lt;delay_ms&gt;</em></dt>
<dd><p>When importing the audio track, delay by <code>\&lt;delay_ms&gt;</code> milliseconds. e.g., <code>--audio-delay-ms</code>=<code>1000</code> delays by 1 second. Not supported by mp4creator.</p>
</dd>
<dt>--audio-bitrate=<em>&lt;bitrate&gt;</em></dt>
<dd><p>If/When converting audio, use the given bitrate. e.g., <code>128</code>.</p>
<dt>--mkvextract=&lt;mkvextract&gt;</dt>
<dd><p>Use <code>&lt;mkvextract&gt;</code> as the mkvextract command.</p>
</dd>
<dt>--audio-channels=<em>&lt;channels&gt;</em></dt>
<dd><p>If/When converting audio, use <code>\&lt;channels&gt;</code> channels in the output. e.g., <code>5.1</code>.</p>
<dt>--video-track=&lt;video_track&gt;</dt>
<dd><p>Use <code>&lt;video_track&gt;</code> from the mkv file instead of trying to parse it.</p>
</dd>
<dt>--audio-codec=<em>&lt;codec&gt;</em></dt>
<dd><p>If/When converting audio, convert to <code>\&lt;codec&gt;</code>. Default is <code>libfaac</code>. This should be something supported by <em>ffmpeg</em>.</p>
<dt>--audio-track=&lt;audio_track&gt;</dt>
<dd><p>Use <code>&lt;audio_track&gt;</code> from the mkv file instead of trying to parse it.</p>
</dd>
<dt>-o, --output=<em>&lt;outfile&gt;</em></dt>
<dd><p>Put the completed mp4 into <code>\&lt;outfile&gt;</code>.</p>
<dt>--audio-delay-ms=&lt;delay_ms&gt;</dt>
<dd><p>When importing the audio track, delay by <code>&lt;delay_ms&gt;</code> milliseconds. e.g., <code>--audio-delay-ms</code>=<code>1000</code> delays by 1 second. Not supported by mp4creator.</p>
</dd>
<dt>--keep-temp-files</dt>
<dd><p>Keep all temporary files created while converting.</p>
<dt>--audio-bitrate=&lt;bitrate&gt;</dt>
<dd><p>If/When converting audio, use the given bitrate. e.g., <code>128</code>.</p>
</dd>
<dt>-v, --verbose</dt>
<dd><p>Print info about what is happening.</p>
<dt>--audio-channels=&lt;channels&gt;</dt>
<dd><p>If/When converting audio, use <code>&lt;channels&gt;</code> channels in the output. e.g., <code>5.1</code>.</p>
</dd>
<dt>-n, --dry-run</dt>
<dd><p>Don't run any commands, but print them in a shellquoted format that can be safely copy-pasted by the user.</p>
<dt>--audio-codec=&lt;codec&gt;</dt>
<dd><p>If/When converting audio, convert to <code>&lt;codec&gt;</code>. Default is <code>libfaac</code>. This should be something supported by <em>ffmpeg</em>.</p>
</dd>
<dt>--correct-profile-only</dt>
<dd><p>Only correct the profile</p>
</dd>
<dt>--stop-before-extract-video</dt>
<dd><p>Exit before extracting video from <code>\&lt;mkvfile&gt;</code>.</p>
<dd><p>Exit before extracting video from <code>&lt;mkvfile&gt;</code>.</p>
</dd>
<dt>--stop-before-correct-profile</dt>
<dd><p>Exit before correcting profile of raw H.264 stream.</p>
</dd>
<dt>--stop-before-extract-audio</dt>
<dd><p>Exit before extracting audio from <code>\&lt;mkvfile&gt;</code>.</p>
<dd><p>Exit before extracting audio from <code>&lt;mkvfile&gt;</code>.</p>
</dd>
<dt>--stop-before-convert-audio</dt>
<dd><p>Exit before converting audio previously extracted. This will stop even if the audio does not need to be converted.</p>
Expand All @@ -90,10 +94,10 @@ <h1 id="options">OPTIONS</h1>
<dt>--stop-before-audio-mp4</dt>
<dd><p>Exit before adding the extracted (and possibly converted) audio to the mp4 container.</p>
</dd>
<dt><code>\&lt;mkvfile&gt;</code></dt>
<dt>&lt;mkvfile&gt;</dt>
<dd><p>The Matroska (.mkv) file you wish to convert.</p>
</dd>
<dt><code>\&lt;rawh264file&gt;</code></dt>
<dt>&lt;rawh264file&gt;</dt>
<dd><p>The raw H.264 stream file that will have its profile corrected for use on the PS3.</p>
</dd>
</dl>
Expand All @@ -105,7 +109,7 @@ <h1 id="author">AUTHOR</h1>
// -->
</script><noscript>&#x67;&#x61;&#118;&#x69;&#110;&#98;&#x65;&#x61;&#116;&#116;&#x79;&#32;&#x61;&#116;&#32;&#x67;&#x6d;&#x61;&#x69;&#108;&#32;&#100;&#x6f;&#116;&#32;&#x63;&#x6f;&#x6d;</noscript></p>
<h1 id="resources">RESOURCES</h1>
<p>Website: <a href="http://code.google.com/p/mkvtomp4/">http://code.google.com/p/mkvtomp4/</a></p>
<p>Website: <a href="http://github.com/gavinbeatty/mkvtomp4/">http://github.com/gavinbeatty/mkvtomp4/</a></p>
<h1 id="reporting-bugs">REPORTING BUGS</h1>
<p>Please report all bugs and wishes to <script type="text/javascript">
<!--
Expand Down
Loading

0 comments on commit ee538d2

Please sign in to comment.