From f700bcdb1a7a8fae78ac2cb95ab239126b1af72d Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 18 Jul 2020 18:43:27 +0200 Subject: [PATCH] add help --- src/main.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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; -- 2.39.5