* Allow invocation without filename, in fact no options at all.
authorUrban Wallasch <urban.wallasch@freenet.de>
Thu, 13 May 2021 08:44:59 +0000 (10:44 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Thu, 13 May 2021 08:44:59 +0000 (10:44 +0200)
* Some additions to REAMDE and sample configuration.
* Removed unused entry in cfg[].

README.md
ffpreview.conf.sample
ffpreview.py

index 51580c2b9469ae3c759997e9f9d51a8622259341..70de2508e5211815b5cf59d96bf52a427d6438a8 100644 (file)
--- a/README.md
+++ b/README.md
@@ -25,9 +25,10 @@ for that purpose too, should `ffprobe` fail.
 
 ## Configuration
 
-All options available from the command line (see below) as well as the
-invocations used to start external programs can be specified in the
-configuration file, see `ffpreview.conf.sample`.
+With few exceptions all options available from the command line (see
+below) plus the invocations to start external programs can be specified
+in the configuration file, for details see the `ffpreview.conf.sample`
+example configuration.
 
 
 ## Usage
@@ -85,12 +86,24 @@ window controls:
   Alt+Enter       open the context menu
 ```
 ### Examples
+
+#### Start ffpreview with file open dialog:
+```
+$ ./ffpreview.py
+$ ./ffpreview.py /path/to/some/directory
 ```
-$ ./ffpreview.py my_video.mp4
 
+#### Start ffpreview and show thumbnails for a single file:
+```
+$ ./ffpreview.py my_video.mp4
 $ ./ffpreview.py -t ~/scratch -w 256 -g 8x4 -N 10 some_movie.mkv
 ```
 
+#### Run ffpreview in batch mode:
+```
+$ ./ffpreview.py -b movie1.mkv movie2.mp4 another.mpg
+```
+
 ## License
 
 Ffpreview is distributed under the Modified ("3-clause") BSD License.
index 7699837586257dfdc18e2bb9e4329573a5a7f2f1..c9d77417197f20caf8e184d683b3d66285456559 100644 (file)
@@ -70,6 +70,7 @@ frame_skip=200
 time_skip=60
 
 # Custom ffmpeg filter string for method 'customvf'.
+# For more information on filter expressions refer to the ffmpeg man page.
 customvf=scdet=s=1:t=12
 
 # EOF
index 5a66cd0a69bab6376b321ef6d2fa94aebc6b29e3..e71c4112bf2818d0b334e1add2eb3457c3630fbe 100755 (executable)
@@ -94,7 +94,6 @@ def sig_handler(signum, frame):
 def configure():
     # set defaults
     cfg = {
-        'home': expanduser("~"),
         'conffile': 'ffpreview.conf',
         'vid': '',
         'outdir': '',
@@ -145,7 +144,7 @@ def configure():
                '  Shift+Enter     play video starting at selected position\n'
                '  Alt+Enter       open the context menu\n'
     )
-    parser.add_argument('filename', nargs='+', default=os.getcwd(), help='input video file')
+    parser.add_argument('filename', nargs='*', default=os.getcwd(), help='input video file')
     parser.add_argument('-b', '--batch', action='count', help='batch mode, do not draw window')
     parser.add_argument('-c', '--config', metavar='F', help='read configuration from file F')
     parser.add_argument('-g', '--grid', metavar='G', help='set grid geometry in COLS[xROWS] format')