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;