add help
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 18 Jul 2020 16:43:27 +0000 (18:43 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 18 Jul 2020 16:43:27 +0000 (18:43 +0200)
src/main.rs

index cba0b054e9d17ebe38fb9bf0b3afcaacc4aabf0c..3f5023a1ddbf9097059e96de5407ce444a92f838 100644 (file)
@@ -74,7 +74,23 @@ fn main() {
     let args: Vec<_> = env::args().collect();
 
     if args.len() == 1 {
     let args: Vec<_> = env::args().collect();
 
     if args.len() == 1 {
-        println!("usage: nihav-tool [-noout] [-vn] [-an] input [lastpts]");
+        println!("usage: nihav-tool [-noout] [-vn] [-an] input [endtime]");
+        println!(" or invoke nihav-tool --help for more detailed information");
+        return;
+    }
+    if args.len() == 2 && args[1] == "--help" {
+        println!("usage: nihav-tool [options] input [endtime]");
+        println!("available options:");
+        println!(" -noout     - decode but do not write output");
+        println!(" -an        - do not decode audio streams");
+        println!(" -vn        - do not decode video streams");
+        println!(" -nm={{count,pktpts,frmpts}} - use counter/frame PTS/decoded PTS as output image number");
+        println!(" -skip={{key,intra}} - decode only reference frames (I-/P-) or intra frames only");
+        println!(" -seek time - try seeking to the given time before starting decoding");
+        println!(" -apfx/-vpfx prefix - use given prefix when creating output audio/video files instead of default 'out'");
+        println!(" -ignerr    - keep decoding even if decoding error is encountered");
+        println!(" -dumpfrm   - dump raw frame data for all streams");
+        println!(" endtime    - decoding end time, can be given either as time (hh:mm:ss.ms) or as a timestamp (e.g. 42pts)");
         return;
     }
     let mut lastpts = NATimePoint::None;
         return;
     }
     let mut lastpts = NATimePoint::None;