MODE
INPUT
720x480 704x480 352x480 352x240 NTSC 720x576 704x576 352x576 352x288 PALand match within each titleset.
DVD LAYOUT
DVD NAVIGATION
Although lplex has no gui, its basic operation is fairly simple, requiring just drag & drop and a plain-text editor:
Unzip the folder 'lplex-0.3' to a location of your choice.
Double-click on lplex and close it again (this is to create the config file 'lplex.ini').
| skip this step. |
| open 'lplex.ini' in Notepad and change 'splice=seamless ' to
'splice=discrete ', and save. |
Now drop a folder, disc or .iso file onto lplex.
Press CTRL C or just close the console at anytime to cancel the program.
That's it, as long as a one-title black-screen dvd with alphabetically-sorted input files is good enough. If not, using scripts or the command line will allow you to
Lplex maintains an application folder for each user:
| ||
%appdata%\lplex
~/.lplex |
||
which contains 3 application files: | ||
lplex.ini
lplex.conf |
User configuration file. Edit this in a plain-text editor to change the default global program settings. See OPTIONS below. | |
lplex.log |
Log of last run. This file is also copied by default to the 'XTRA' info folder of the dvd after authoring. | |
project.lplex |
Auto-generated project file for last non-project run. | |
lplex [OPTIONS] <files> ... [FLAGS] <files> ...
Examples:
lplex --video=ntsc --create=dvd c:\myAudio
lplex -t pal discrete jpg=c:\a.jpg "c:\My Songs" ts seamless jpg=c:\b.jpg c:\myConcert
lplex --formatout=flac6 --dir="c:\My Flacs" d:
lplex --video=ntsc --create=dvd ~/myAudio
lplex -t pal discrete jpg=a.jpg mySongs ts seamless jpg=b.jpg myConcert
lplex --formatout=flac6 --dir=~/myFlacs /dev/dvd
--dvdpath=C:\myDVDs\
and double backslashes in lplex.ini:
dvdpath=C:\\myDVDs\\
video=palor locally on the command line or in a script with the '--' prefix:
--video=pal
OPTION | VALUES | DESCRIPTION | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
--video (-t) | ntsc
pal secam | use this tv standard. | ||||||||||||
The TV standard must match your dvd player (for the purposes of dvd-video 'pal' and 'secam' are equivalent). | ||||||||||||||
--create (-c) | lpcm
m2v dvdstyler mpeg dvd iso | author to this stage. | ||||||||||||
There is no need to change the 'cleanup' setting for partial
authoring (lpcm
, m2v
, dvdstyler
, or mpeg). The work folder is automatically left intact.
| ||||||||||||||
--name (-n) | <projectname> | name the project this. | ||||||||||||
--md5aware (-m) | yes
no | insert lplex tags into the dvd. | ||||||||||||
Md5 signatures and restoration tags will be embedded in the dvd for future reference during extraction. When extracting, if the dvd is lplex-authored the audio data will be md5-verified and the original filenames and folder structure restored. If not lplex-authored the audio files will be named according to their position in the dvd structure and an md5 value will be calculated. | ||||||||||||||
--splice (-l) |
seamless
discrete padded none |
splice the tracks together this way. | ||||||||||||
How to physically structure the immediate track transition point:
| ||||||||||||||
--shift (-s) | backward
forward nearest | move seamless startpoints in this direction. | ||||||||||||
Direction to shift the track startpoints if 'splice' is 'seamless' (see above). | ||||||||||||||
--infofiles (-x) | yes
no | make an 'XTRA' info folder on dvd. | ||||||||||||
All non-wav/flac files encountered will be copied, with the folder structure intact, to an archive folder named 'XTRA' in the root of the dvd. When extracting, if the dvd is lplex-authored the file/folder structure in the 'XTRA' folder will be copied to the output folder. | ||||||||||||||
--infodir (-i) | <dir> | copy files in this folder to 'XTRA'. | ||||||||||||
--jpeg (-j) | <filename>
black black_# |
- use this jpeg as the background
- or use a default black screen - of this size (# = L,M,S,XS) |
||||||||||||
The accompanying video will be a black screen. Default size is 352x240 NTSC or 352x288 PAL, or you can specify the size using 'black_#', where # is: L M S XS* 720x480 704x480 352x480 352x240 NTSC 720x576 704x576 352x576 352x288 PALYou can substitute your own jpeg image by specifying a valid filename. To use different backgrounds on different tracks or set widescreen backgrounds, see the 'jpg' and 'jpgw' positional flags in the FLAGS section below.
See also note on Windows FILE PATHS above.
| ||||||||||||||
--rescale (-R) | yes
no | rescale jpegs ntsc<->pal if required. | ||||||||||||
If jpegs sized for ntsc are being used to create a pal dvd, rescale them to the nearest legal pal size, and vice-versa. | ||||||||||||||
--media (-z) | dvd+r
dvd-r dl none | don't exceed this disc size. | ||||||||||||
Will verify that output fits on the given media before authoring. This is only a size check. Important: for 'dl' (dual-layer) media, see CAVEATS section below. | ||||||||||||||
--editing (-e) | no
yes absolute relative |
do a demo run and write it as a script.
- using absolute file paths - using relative file paths |
||||||||||||
This option has two qualifiers, 'v' and 'p',
which can be added using a comma, for example
'
| ||||||||||||||
--menu (-M) | <dir> | use these user-supplied menus. | ||||||||||||
lplex doesn't create menus, it will just incorporate your pre-authored custom menus into the dvd, checking first to make sure they're titleset/system-compatible with the lplex-authored dvd. The purpose of this option is to allow packaging of menus and audio files so that the identical dvd can be regenerated later, e.g. when sharing or archiving. If this option is omitted the same result (minus validation tests) can be achieved "by hand" if you simply drop your menus into the VIDEO_TS folder after creating the dvd fileset with lplex. You can create menus using DvdStyler, q-dvdauthor, or similar general purpose dvdauthor frontends. A dvd menu fileset consists of files in the VIDEO_TS folder named as follows
VIDEO_TS(.IFO .VOB .BUP)
VTS_**_0(.IFO .VOB .BUP)
where '**' is the titleset number and '_0' designates it as a menu file. For example,
menu files for a 2 title dvd would be: VIDEO_TS.IFO VTS_01_0.IFO VTS_02_0.IFO VIDEO_TS.VOB VTS_01_0.VOB VTS_02_0.VOB VIDEO_TS.BUP VTS_01_0.BUP VTS_02_0.BUP .BUP (BackUP) files are optional and can be ommitted. Projects with menus aren't automatically universal, meaning that NTSC menus can't automatically be converted to PAL, and vice versa. You will need to create separate menus for each system if you want your package to be universal. Each menu fileset must be in its own separate folder. | ||||||||||||||
--dir (-d) | <dir> | output everything to this directory. | ||||||||||||
--dvdpath (-p) | <dir>
adjacent | output dvd files to this directory. | ||||||||||||
The output folder is by default right next door to the input folder if input is on your hard drive, and named '<input folder name>_DVD', i.e. dropping 'c:\someAudio' will output to 'c:\someAudio_DVD'. You can instead redirect dvd file output globally to any valid path by editing this setting. Note: unless a name is explicitly given using the -d command line switch when the input folder is either an unnamed dvd disc or the dvd is multi-title, output is named '<YYYY-MM-DD_HHMM>_DVD'.
See also note on Windows FILE PATHS above.
| ||||||||||||||
--workpath (-w) | <dir> | use this folder for temporary space. | ||||||||||||
Globally redirects temporary workspace, same as above. This setting defaults to your system 'temp' folder.
| ||||||||||||||
--isopath (-a) | <dir>
adjacent | output disc images to this directory. | ||||||||||||
Globally redirects iso image output, same as above.
See also note on Windows FILE PATHS above.
| ||||||||||||||
--extractpath (-E) | <dir>
adjacent | extract to this directory. | ||||||||||||
Globally redirects extraction output, same as above, except the output folder name suffix will be '_UNPACKED'.
See also note on Windows FILE PATHS above.
| ||||||||||||||
--readonlypath | <dir> | where to output if source is read-only (e.g. a dvd drive). | ||||||||||||
This is by default the current user's home directory, e.g. readonlypath=C:\\Documents and Settings\\buffy\\
but you can edit it to be any valid existing path.
See also note on Windows FILE PATHS above.
| ||||||||||||||
--unauthor (-u) | extract audio from dvd. | |||||||||||||
--formatout (-f) | wav
flac flac#(0-8) raw | extract audio to this format. (flac equals flac8) | ||||||||||||
When extracting, format will be wav (or flac# where # specifies compression level, or raw dvd-order lpcm). 'flac' is the same as 'flac8'. | ||||||||||||||
--restore (-r) | yes
no | restore files to original length. | ||||||||||||
When extracting, if the dvd is lplex-authored track startpoints will be shifted back to their original pre-authored locations, entirely restoring the original fileset, and if set to 'no', output will correspond to the dvd start and end points as-is, excluding any padding. This setting only takes effect if 'md5aware=yes'. | ||||||||||||||
--cleanup (-C) | yes
no | delete interim files when done. | ||||||||||||
All interim files (raw lpcm, m2v, mpg, etc) will be deleted in progress; otherwise these files are left wherever 'workpath' points to (your system's temp directory by default) - make sure you have adequate additional free space (roughly an extra 2x input size). | ||||||||||||||
--verbose (-v) | no
yes | show all messages. | ||||||||||||
If 'verbose=yes' all of lplex's screen messages will be shown in progress. This verbose version is always written to 'lplex.log' in the 'XTRA' folder regardless of this setting. When extracting, same as above, except 'lplex.log' is written to the output folder. | ||||||||||||||
--color (-L) | yes
no dark bright | colorize console output. | ||||||||||||
--pause (-P) | yes
no | pause console before exiting. | ||||||||||||
Defaults to 'no' in linux.
| ||||||||||||||
--version | print out the version and build info. | |||||||||||||
--license | print out the GNU GPL License notice. | |||||||||||||
--help (-h) | print this lot out! | |||||||||||||
Flags are "fall through" settings, applying only to subsequent files and only until the next instance, if any, of the same flag. For instance
lplex jpg=a.jpg x.wav y.wav jpg=b.jpg z.wav
will use a.jpg as the background for x.wav and y.wav, and b.jpg for z.wav.
FLAG | ARG | DESCRIPTION |
---|---|---|
ts | start a new titleset here. | |
jpg | <jpegfile> | use this 4:3 background from now on. |
jpgw | <jpegfile> | use this 16:9 background from now on. |
prj | <projectfile> | merge this .lplex script here. |
seamless discrete padded | use this splice from now on. | |
Multi-channel audio | Lplex produces technically correct dvds containing multi-channel lpcm audio as allowed by
the dvd-video spec. Finding a player that actually supports their proper
playback is another story. In theory multi-channel lpcm output should be available via analog
(not digital, since SPDIF is intentionally limited to stereo), but I know of no player where
analog output isn't remapped to stereo. Please report any players that actually do support this feature. |
20-bit audio | Not supported. |
Dual-layer discs | Dual-layer images are not created correctly, lacking a
properly defined layer break.
You can
try the following workaround to create and burn a dl iso image
(I haven't tested this myself):
|
DVD Menus | Lplex can't generate menus, but it will accept and incorporate user-provided menus
into the dvds it creates (see the 'menu' option). |
Upsampling | There is no facility for upsampling CD audio in lplex. |
Non-canonical wav files | Lplex may reject some non-canonical wav files (wav files with extra chunks of non-audio data). In this case try converting to flac prior to
authoring with lplex, as flac's support for variants of wav is
much more robust. |
Size Estimate | Dvd size is slightly overestimated (on the order 10-20 MB), so a
few borderline cases will end up falsely reported as being too
large for the given media. |
Q: | I have a folder of audio files named in alphabetic order, how do I make a one-title dvd? |
A: |
|
Q: | How do I burn a dvd once lplex is finished? |
A: |
Just open or drop the generated '.iso' image file into/onto your favorite
burning program and press go.
|
Q: | How do I stop lplex while it's running? |
A: |
|
Q: | How do I group my files into separate titles on the dvd? |
A: |
Put a 'ts' (titleset) flag wherever you want the breaks:
lplex a1.flac a2.flac ts b1.flac b2.flac
|
Q: | How do I generate a multi-title dvd corresponding to my input folders? |
A: |
Put a 'ts' (titleset) flag between the folders:
lplex c:\folder1 ts c:\folder2 ts c:\folder3 |
Q: | How do I change backgrounds? |
A: |
Use the 'jpg' flag to change images as you go along:
lplex jpg=A.jpg a.wav jpg=B.jpg b.wav jpg=C.jpg c.wav |
Q: | How do I use widescreen backgrounds? |
A: |
Use the 'jpgw' flag:
lplex jpgw=w1.jpg a.wav jpgw=w2.jpg b.wav |
Q: | How do I create properly rendered widescreen backgrounds? |
A: |
Prepare an oversize true 16:9 jpeg in your favorite image editor, unlock the aspect ratio and resize to a legal dvd image size (e.g. PAL 720x576 or NTSC 720x480).
Thanks to Richard Harvey for this detailed guide |
Q: | How do I preview the auto-generated dvd layout for a folder? |
A: |
From inside your folder type:
lplex -e .,pand the layout will be printed to the screen. |
Q: | How do I start a project called 'foo' from the desktop? |
A: |
Make an empty 'foo.lplex' text file in your source directory,
drop it onto the lplex program icon and then edit it in Notepad.
|
Q: | How do I start a project called 'foo' from the command line? |
A: |
From inside your source directory type (note the dot at the end):
lplex -n foo -e .and then edit 'foo.lplex' in any plain text editor. |
Q: | How do I generate a dvd from my script? |
A: |
Make sure your script sets '--editing=no', then
|
lplex scripts, or project files, are just a command line in the form of a text file, meant as
QUICK HOW-TO
Open up any plain-text editor (e.g. Notepad) and save an empty text file as 'foo.lplex' in the folder containing your audio files, jpegs, etc. (these may be arranged in subfolders if you like).
Drop 'foo.lplex' onto lplex.exe and and then reopen it in notepad afterwards; it should look something like this:
#!/usr/local/bin/lplex -P 1 # lplex version 0.3 beta # Project : foo_DVD # Layout is roughly 54 MB (DVD+R/RW is 1% full) # Settings: --name=foo_DVD --md5aware=yes --infofiles=yes --splice=seamless --shift=backward --create=iso --media=dvd+r --cleanup=yes --jpeg=black --verbose=no --editing=relative # VIDEO_TS # Title 1 - (24 bit 96 khz 2 ch / 352x240 4:3) d1\a.wav d1\b.flac d2\c.flac d2\d.wav # XTRA - Info files img\blue.jpg img\green.jpg "img\red 2.jpg" info.txt foo.lplex
You now have a project called 'foo' with the current lplex settings and a list of the files in that folder; essentially a command line in the form of a text file with one difference: it's interspersed with some unix-style comments to make it more human-readable. The project effectively lists what would have been the result of dropping the parent folder onto lplex, except that the project takes its name from the script rather than the folder name as usual.
The file is organized in 3 main sections representing the dvd's configuration and layout:
# Settings: |
Program options for this dvd.
| # VIDEO_TS |
Audio files, menus, and flags describing the contents of the
dvd's 'VIDEO_TS' folder, grouped by titleset.
| # XTRA - Info files |
Files, if any, to be placed in the dvd's 'XTRA' folder.
|
In this example you can see that lplex has found audio files in the subfolders 'd1' and 'd2', and jpegs in the subfolder 'img' (which by default it considers to be info files that go into the XTRA dvd folder).
Edit this file as desired. You can reorder or delete input files, change the settings, put in positional flags, and so on. In this example we'll split the dvd into two titlesets and define custom backgrounds for each file:
Move the jpg files up into the list of audio files as desired, prefixing each with a 'jpg' or 'jpgw' flag as appropriate. For instance, in the excerpt below 'blue.jpg' will become the background for 'a.wav', 'green.jpg' for 'b.flac', etc. Note also the 'ts' flag added after 'b.flac' (line 4) to start a new titleset, and that this titleset uses 'jpgw' flags to denote widescreen (16:9) backgrounds:
jpg=img\blue.jpg d1\a.wav jpg=img\green.jpg d1\b.flac ts jpgw="img\red 2.jpg" d2\c.flac jpgw=img\green.jpg d2\d.wav
Save the file, drop it onto lplex again, and reopen it. The edited area is rewritten, and you now have a 2-title dvd corresponding to the location of the 'ts' flag:
# Title 1 - (24 bit 96 khz 2 ch / 352x240 4:3) jpg=img\blue.jpg d1\a.wav jpg=img\green.jpg d1\b.flac ts # Title 2 - (24 bit 96 khz 2 ch / 720x480 16:9) jpgw="img\red 2.jpg" d2\c.flac jpgw=img\green.jpg d2\d.wav
Keep cycling through this process until you're satisfied with the layout. Once you're ready to create the dvd, you either delete the --editing=whatever line (at the top of the file, last item under 'settings'), or comment it out by placing a '#' at its beginning, or if you're feeling especially pedantic you can explicitly set the editing mode to 'no' as shown below:
--editing=no
and rerun.
EDITING & SYNTAX
You can always insert more material by typing a valid file or folder path (relative or absolute, it makes no difference) somewhere and rerunning. If your path is a folder, its full listing is inserted wherever you typed it, and its info files, if any, are placed in the 'XTRA' section at the bottom.
You can switch at any time between '--editing=absolute' to see full file paths, or '--editing=relative' to see relative paths.
Using '--editing=relative' makes your project a portable package which can be shared or archived, allowing the identical dvd to be created anywhere. A typical package would be a set of source files and folders containing the various wavs, flacs, jpegs, menus, etc, with a script in the top folder. You can also share just a script by itself with fellow end-users of an existing file-shared set provided by others.
COMMAND LINE
The simplest way to start a project from the command line is, from the source directory, to type
lplex -e.
which means (-e) go into edit mode, and (.) scan the current
directory, using its name as the project name. So in 'c:\myAudio'
you will get a script called 'myAudio_DVD.lplex' which will
in turn generate a dvd labeled 'myAudio_DVD'. Add the -n option if
you want to control naming from the command line, e.g.
lplex -n foo -e .which will give you 'foo.lplex' and use 'foo' as the dvd label. You can also change the dvd label by editing '--name' directly in the generated script, of course.
If you just want to preview the layout without editing, add ',p' to the -e argument, for example
lplex -e .,pwill print the current directory as a project to screen instead of writing a file.
AUDIO
Audio characteristics must match within each titleset. In editing mode lplex performs a 'lax' scan of your input, meaning it will automatically start a new titleset (and warn you about it) anytime it finds an audio file with characteristics differing from the preceding one. This may or may not result in an acceptable layout, so be sure and review the results and rearrange as appropriate. Needless to say audio files must be dvd-compliant.
VIDEO
Jpegs must be dvd-compliant, i.e. one of the acceptable sizes listed in the readme, and the sizes and aspect ratios (i.e. 'jpg' or 'jpgw' flags) must all match within each titleset.
Menuless projects are universal, meaning that the same script can be used to generate either an NTSC or PAL dvd, determined by the end-user's settings in lplex.ini. By default lplex omits the '--video' setting in a script so as to keep it neutral.
PADDING AND PLAYBACK GAPS
Dvd-video imposes a somewhat arbitrary minimum unit of an 'audio frame' onto lpcm data, so unless padded the audio will end up truncated to the nearest full audio frame. Padding ensures that no audio is dropped, though a commensurately tiny (or gigantic depending on your point of view) stretch of silence is introduced as a result. The outside limit for audio frame-completion padding is just short of 150 pts ticks, or 0.00167 seconds.SEAMLESS PLAYBACK
For truly seamless playback of continuous audio lplex's approach is to recut the tracks at 'magic points' where both audio and video frame boundries coincide (somewhat similar to sector boundary alignment in cd-audio). In dvd time is measured in PTS (Presentation Timestamp) ticks. Here's the math:One second = 90000 PTS ticks One lpcm audio frame = 150 PTS ticks One NTSC video frame = 3003 PTS ticks One PAL video frame = 3600 PTS ticksso the system-specific 'magic' cut points are
NTSC: every 50 video frames = 1001 audio frames = 1.66 seconds PAL : every 1 video frame = 24 audio frames = 0.04 secondsand 'universal magic points' occur (unfortunately too far apart for a single universal solution to recutting) at
every 1200 NTSC frames = 1001 PAL frames = 24024 audio frames = 40.04 secondsLplex's 'seamless' audio-splicing moves the track startpoints to an immediate system-specific 'magic point' when authoring (which, to my mind at least, is a tolerable shift), then restores the original startpoints on extraction.
(THEORETICALLY) PERMITTED AUDIO
According to mpeg.org, dvd-video allows the following types of lpcm. Lplex presently attempts to support the varieties marked '+'.Rate Depth : Channels (khz) (bits) : 1 2 5(+1) 8 ------------------------------------------- 48 16 : Yes+ Yes+ Yes+ Yes+ 20 : Yes Yes Yes - 24 : Yes+ Yes+ Yes+ - 96 16 : Yes+ Yes+ - - 20 : Yes Yes - - 24 : Yes+ Yes+ - -
LPLEX TAGS DESCRIPTION
Lplex writes tags at two locations in every dvd program
The tags consist of the following two contiguous pieces:
42 byte flac header (STREAM, METADATA_BLOCK_HEADER and METADATA_BLOCK_STREAMINFO) describing the audio data extracted to wav-order from the dvd as-is. See flac documentation for header details.
Variable-length xml entity of the form
<Lplex ver="*" path="*" id="*" shift="*" md5prev="*"/>where
version of lplex which wrote the tag. | |
path and filename under root folder to use for output. | |
index relative to all authored tracks present on the dvd. | |
number of audio bytes to shift (+)in/(-)out at track end to restore original pre-authored state. | |
32 byte text-form md5 signature for track after shift. |
sudo apt-get install libflac++-dev libdvdread-dev mjpegtools dvdauthor
sudo apt-get install wx2.8-i18n libwxgtk2.8-dev libwxgtk2.8-ansi-dev wx-common libgtk2.0-dev
mkdir wxgtk-ansi cd wxgtk-ansi ../configure --disable-shared make sudo make install
./configure make sudo make install
sudo ln /usr/bin/wx-config /usr/local/bin/wx-config
Lplex was initially modeled on Dave Chapman and Fabrice Nicol's excellent open source utility dvda-author, which creates dvd-audio discs, and wav2lpcm, which converts lpcm from wav to dvd order. Dvd-audio is admittedly superior to dvd-video in the sense that it handles a far wider range of lpcm audio (from 16-bit 44khz mono up to 24-bit 96khz 6ch and 24-bit 192khz 2ch), but has the one drawback of requiring a dvd-audio player for playback, which in the real world remains a relatively rare bird. Dvd-video players are everywhere, on the other hand, and offer identical digital quality for their narrower range of supported lpcm audio types, which is where lplex comes in. Dvd navigation and extraction was modeled primarily on dvdunauthor by Scott Smith and Ralf Engels, another great open source utility.
|
|
Lplex is free software distributed under the GNU GPL License. |