diascope: settings

Settings

Diascope allows you to change some default settings, like the resolution, the working directory or the title specifications. Some settings, such as the title font, can be modified throughout the slideshow. These settings are introduced by the set keyword. Other settings, such as the video resolution, can obviously not be modified and need to be specified before the first image. These settings are specified by their own keywords.

Format specification

Specify the resolution, frame rate, quality and encoding parameters of the slideshow. It is recommended to have a format statement at the beginning of each slideshow description file.

The syntax is

format <pal|ntsc|WxH@FPS> [options] [encoding [encoding [...]]]

where pal and ntsc set the encoding targets to pal-dvd or ntsc-dvd, respectively, in the call to ffmpeg. If a user-defined format is desired it can be specified to have width W and height H and play at FPS frames per second.

Options:

quality=x
interlaced
twopass
aspect=<1:1|4:3|16:9>
mpeg2sound=<mp2|ac3>

The quality option is useful during the design of the slideshow. Use, for example, quality=0.1 during your first experiments with the slideshow and quality=1 (default) for the final rendering.
If interlaced is specified then the pan and zoom ("Ken Burns effect") will be interlaced lower field first to look better on a vintage TV screen. This takes more than twice longer to render but it is definitely recommended for smooth horizontal pans on the TV. If twopass is specified ffmpeg will be called with the two-pass feature.

The aspect currently defaults to 4:3 if pal or ntsc is given, and the pixel ratio is automatically chosen correctly. The same holds for 16:9 when given. When WxH@FPS is explicitly specified the aspect defaults to the ratio of W/H with square pixels, as would be the right choice for flv video. This can be overridden by specifying aspect anyway (if you know what you're doing).
mpeg2sound defaults to mp2. Note that according to the standard an ntsc mpeg2 stream for dvd must have mp2 audio while a pal mpeg2 for dvd can have either mp2 or ac3.

Encodings:

dv
mpeg2[=q,ab]
mpeg4[=q,ab]
flv[=q,ab]

For DV there are no further options. For MPEG2, MPEG4 and FLV (flash video) encoding you can specify ffmpeg's quality scale parameter ranging from q=0 (best) to 31 (worst), and the audio bitrate in kbit/s. The default values are q=3 and ab=192 for MPEG2 and MPEG4, and q=3 and ab=64 for FLV.

A word of caution: not every combination of a format specification and an encoding is valid. I'm not very knowledgeable in video encoding, so don't expect advice but here are examples for what should work:

format <pal|ntsc> mpeg2 mpeg4 aspect=<4:3|16:9>
format 360x288@25 mpeg2=3,192 mpeg4=3,192 aspect=4:3
format 360x240@29.97 mpeg2=3,192 mpeg4=3,192 aspect=4:3
format 320x240@10 flv=8,64

While many other combinations will work on your computer there is no guarantee that they will play on an external device.

Back to top

Base name

Specify the base name of the output files and the temporary directory.

Syntax:

base filename [tmpdir]

This will name the video files filename.dv, filename.mpeg, etc as requested. If tmpdir is not given a directory named filename_TMP is created in the present directory. If tmpdir is given the directory tmpdir/filename_TMP is created and used to store diascope's temporary files.

Back to top

Image titles

Specify settings for subsequent image titles.

Syntax:

set font=Fontname size=n fill=Colourname
set stroke=Colourname strokewidth=n
set label=<off|Colourname>
set title_area=<off|x%> title_hold=x%
set title_offset=x%,y% title_offset_x=x% title_offset_y=y%

The font must be known to your ImageMagick installation. Try

$ convert -list font | cut -d " " -f 1

or, on older ImageMagick installations,

$ convert -list type | cut -d " " -f 1

to see which ones you have. The pointsize is given by the size argument, fill specifies the colour of the title, stroke specifies the colour of the outline and strokewidth the width (in points) of the outline. If a colour for the label is specified then a transparent bar will be displayed behind the title.

The settings beginning with "title_" refer to the new title generator with image overlays as of diascope 0.2: title_area (1-100%) specifies the image area the overlay should be scaled to. If set to off, the original size of the overlay is retained (and it may thus not fit onto the screen).

title_hold is only relevant for the cases of dir=<tm|mt|bm|mb> (see general syntax) where it specifies the percentage of the time that the title should be held at rest. For example, if title_hold=70% and dir=bm, then 30% of the time will be spent on sliding the title from the bottom to the middle of the screen and 70% of the time to hold it at rest at the middle.

title_offset, finally, specifies the offset into the screen (measured from the top left corner) for the position of the center of the overlay. For example, title_offset=50%,80% positions the title overlay horizontally centered just above the bottom of the screen. title_offset_x and title_offset_y allow to change the two offsets individually. Note that for sliding titles only the offset along the non-sliding direction is used.

$ convert -list color | cut -d " " -f 1

to see their names. Have a look at the title and image overlay example and the title settings example and to get a better idea of the possibilities.

Back to top

Further settings

The following settings are currently implemented and more may follow.

Syntax:

set dur=<frm|sec>
set resize=<resize|sample>
set debug=<on|off>

The dur setting specifies whether the duration values given for the actions, transitions and sound files should be interpreted as frames or as seconds. Have a look at the examples to get a better idea of the title options.
If resize is set to sample then the frame scaling during a pan and zoom action and during the import of a sequence will use convert's -sample option rather than -resize which is considerably faster but comes at a small quality reduction. If set to resize then the -resize option is used.
When the debug setting is on, diascope will not suppress output from the commands which it calls.

Back to top