
--------------------------------------------------------------------
Video Configuration (gimprc)
--------------------------------------------------------------------

There are optional configuration values for the GIMP-GAP video plug-ins.
Those values are stored in your personal gimprc file (located in $HOME/.gimp-2.2/gimprc)
or in the system-wide gimprc file (usually located at /usr/local/etc/gimp/2.2/gimprc)

If you edit gimprc files by hand, you must do this before you startup GIMP.


# configure where to find the executable mplayer program.
# use the full name including the absolute path. 
# This is required if mplayer is NOT found in one of the directories
# specified in PATH but is installed somewhere else.
# (relevant only on UNIX systems)
(mplayer_prog "/usr/local/bin/mplayer")

# configure where to find the executable wavplay program.
# use the full name including the absolute path. 
# This is required if wavplay is NOT found in one of the directories
# specified in PATH but is installed somewhere else.
# (relevant only on UNIX systems)
(wavplay_prog "/usr/X11R6/bin/wavplay")


# there are 2 Values to define direcory and basename
# for Video Copy/Cut/Paste operations      
(video-paste-dir "/home/hof/gap_video_paste_dir")
(video-paste-basename "gap_video_paste_")

# the video-confirm-frame-delete can have values "yes" or "no"
# where "no" does not show the confirm dialog windows when the user
# tries to delete video frames of the video.
# (default is "yes")
(video-confirm-frame-delete "yes")


# the gap video API keeps an internal cache for
# the specified number of frames at read access from
# videofiles.
(video-max-frames-keep-cached 50)


# the gap player supports caching of frames
# (both image sequences or frames fetched from videofiles)
# to achieve fast playback speed when playback
# is repeated in loops or pingpong mode.
# a cache size of 0 turns caching OFF.
# the cache size can be set in kilobytes (K) or megaytes (M)
(video_playback_cache "100M")

# the gap player has several widgets to set the
# position (e.g. the currently displayed framenumber)
#
# - the "Go Buttons" are an array of buttons that allow
#   positioning by simply moving the mouse over the buttons.
#   in some situations this may be annoying to some users
#   therefore this optional way of positioning can be turned
#   on/off
#   via the gimprc option video_player_show_go_buttons  "yes" or "no"
#   (default is "yes")
# - the position scale widget can be turned on/off  
#   via the gimprc option video_player_show_position_scale  "yes" or "no"
#   (default is "yes")
(video_player_show_go_buttons "yes")
(video_player_show_position_scale "yes")


# videoindexes are files that store seekoffsets for keyframes
# and enable fast and frame exact random access to frames in a videofile.
# if gimp-gap should create such files automatically when needed
# you should configure the value "yes".
# 
# if you want gimp-gap to ask each time before creating videoindex file
# then configure value "ask".
# if you want GIMP_GAP to ask even in case where creating a videoindex is not required
# because native timecodebased seek works, then configure "ask-always".
# Note: the "ask-always" setting is rather annoying for productive usage, but
# useful for testing and development purpose.
# (ask is the default when nothing is configured)
# if gimp-gap should not create such videoindex files at all
# configure value "no"
(video-index-creation "ask")

# configure where to store and check for video index files
# if video-index-dir is not configured
# the GAP video API uses a directory named gvaindexes
# in your gimpdirectory by default
(video-index-dir "/path/to/writeable/directory")

# If the gimp-gap videoapi uses libmpeg3 there is a built-in
# workaround for a libmpeg decoder specific bug that sometimes 
# causes crashes when MPEG1 videos are closed.
# The workaround is implemented for UNIX OS only and 
# forks a child process with its own sgnal handler.
# the child process tries open/close. Crashes are then caught
# in the signal handler of the child process to tell the parent
# process (via retcode) that this videofile cant be handled safe by libmpeg3.
#
# This workaround makes open videofiles safer but slow.
# (mainly caused by additional open/close rather than by forking).
# setting the gimprc parameter 
#   (video-workaround-for-libmpeg3-close-bug "no")
# can skip the workaround, and makes opening of viedofiles faster 
# with some risk of crashing  when libmpeg3 is used.
#
# per default (without this gimprc parameter) the workaround is enabled.
#
(video-workaround-for-libmpeg3-close-bug "no")


# optional external audioconverter program
# must be able to handle the same parameters as the
# standard converter script audioconvert_to_wav.sh
# There is NO need for the audioconvert_program gimprc configuration
# if you use the standard converter script.
(audioconvert_program "/usr/local/bin/my_private_audioconverter")


# NON-XCF frame save behaviour:
# -----------------------------
# if you want to use GIMP-GAP with other fileformats than XCF
# for your frames, you will get a warning dialog at the first
# attempt (per GIMP-session) to save one of the frames with GIMP-GAP plug-ins.
# If you dont want this warning dialog, you can use the gimprc
# file to configure how GIMP-GAP should save frames depending on the
# extension. 
# for all configured fileformat extensions GIMP-GAP uses the configuration from the
# gimprc file and does not show the warning dialog.
# Here are recommanded gimprc configuration settings
# for some common used fileformats:

(video-save-flattened-jpg    "yes")
(video-save-flattened-jpeg   "yes")
(video-save-flattened-bmp    "yes")
(video-save-flattened-png    "yes")
(video-save-flattened-ppm    "yes")
(video-save-flattened-xjt    "no")
(video-save-flattened-gif    "no")



# video storyboard layout options
# --------------------------------
# layout options for the storyboard dialog including
# number of rows/column and thumbnail sizes for both
# cliplist (upper) and storyboard (lower) thumbnail area.
#
# thumbnail_size supported values are:
#  "large"
#  "medium"  (default)
#  "small"
#
# row and column settings:
(video-storyboard-thumbnail_size    "medium")
(video-storyboard-columns           "5")
(video-storyboard-rows              "6")
(video-cliplist-thumbnail_size      "medium")
(video-cliplist-columns             "12")
(video-cliplist-rows                "2")

# force storyboard clip playbacks to the aspect defined
# in the storyboard file properties.
# if turned off plaback clips according to their original pixelsize.
(video-storyboard-force-aspect-playback "yes")

# maximal number of open videofiles for storyboard render
# processor. The storyboard processor typically keeps more than
# one videofile open when processing multiple input video clip
# references within a storyboard. This is done for performance reasons.
# But if there are too many open videofiles this may lead to
# run out of memory and other resources. Therefore the number
# of simultaneous open videofiles is limited to a default
# of 12.
# If you have less than 1GB of memory, you may use a smaller
# value (minimum is 2) when you are running out of memory
# while storyboard processing.
# You still are able to process storyboards with many different
# videoclips but this will be slower because there will be more
# open, seek and close operations required with a smaller limit.
(video-storyboard-max-open-videofiles 12)


# the video-libavformat-seek-gopsize parameter
# enables native (fast) seek operations in the ffmpeg (libavformat) 
# video read access api.
# values <= 0 disables native seek operations.
# values > 4 define how many frames shall be sequentially read
# after seek operation. 
# For some videofiles libavformat positioning
# to keyframe seems not to work properly. This will result
# in some trash frames when positioning to B or P frame, because
# the related keyframe required for proper decoding may be skiped
# by the seek operation.
# If you get trashed frames after seek operations you may
# increase the video-libavformat-seek-gopsize parameter
# (values upto 128 can make sense). Note that a high value
# increases the chance to pre-read the releated keyframe and fixes
# the problem with trashed frames, but makes seek significantly slower.
#
# libavformat native seek operates timecode based while gimp-gap
# operates frame number based. therefore positioning via native seek
# may deliver wrong frame positions for videos with individual timing
# per frame. For frame exact operation on such (rare) videofiles
# you should disable native seek by setting the video-libavformat-seek-gopsize
# parameter to 0 and let gimp-gap create a videoindex.
# (videoindex creation requires an initial full scann of the video,
# but offers exact positioning.
# positioning via vidoeindex is slower than native seek)
# 
# an internal default value of 8 is used if no other value is configured.
# (this should be OK for most videofiles, if you work with mpeg2 dvd stuff
# .vob files, a value of 4 shall be enough and give optimal positioning performace)
#
(video-libavformat-seek-gopsize "8")


# The gimprc parameter video-libavformat-timecodelog
# triggers additional timecode logging at video index creation
# it creates a logfile with same name as the videoindex + ".timelog"
#
# The gimprc parameter video-libavformat-timecodelog
# defaults to "0" where no .timelog file is written.
# *.timelog files are useful for developers 
# to analyze and verify native timcode based
# seek operations. *.timelog files contain timecodes and stepsize differences
# for each frame of the analyzed video and CRITICAL warnings where
# variable or non-plausible timecodes were detected.
#
(video-libavformat-timecodelog "1")

# (video-gva-libavformat-video-analyse-persistent "yes")
# the ffmpeg video access api performs
# analyses on videofiles to detect parameters that
# are required for fast native timecodebased seek
# access and to detect if seek support generally works for a videofile.
# This analyse is normally triggered at the 1st seek attempt
# and takes some time (usually less than 10 secs) because probereads
# and seek tests are performed.
# If the parameter 
# video-gva-libavformat-video-analyse-persistent
# is set to value "yes" the results of the analyse is saved to
# a file (located in gimprc subdirectory gvaindexes)
# If the same video is opened another time, the analyse can be skipped
# if the required parameters can be successfully fetched from the file.
# (if the video file was modified since creation of the analyse result
# file the fetched parameters are not used and analyse is NOT skipped)
# 
#
# Setting this parameter to value "no" ignores
# anaylse results files (even if they are still valid)
# 
(video-gva-libavformat-video-analyse-persistent "yes")
