From: Kostya Shishkov Date: Sat, 18 Jul 2020 16:43:27 +0000 (+0200) Subject: add help X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=f700bcdb1a7a8fae78ac2cb95ab239126b1af72d;p=nihav-tool.git add help --- diff --git a/src/main.rs b/src/main.rs index cba0b05..3f5023a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,23 @@ fn main() { 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;