| 68 | }; |
| 69 | |
| 70 | void PrintUsage() { |
| 71 | std::cout << |
| 72 | "FFmpegSource2 indexing app\n" |
| 73 | "Usage: ffmsindex [options] inputfile [outputfile]\n" |
| 74 | "If no output filename is specified, inputfile.ffindex will be used.\n" |
| 75 | "\n" |
| 76 | "Options:\n" |
| 77 | "-f Force overwriting of existing index file, if any (default: no)\n" |
| 78 | "-v Set FFmpeg verbosity level. Can be repeated for more verbosity. (default: no messages printed)\n" |
| 79 | "-p Disable progress reporting. (default: progress reporting on)\n" |
| 80 | "-c Write timecodes for all video tracks to outputfile_track00.tc.txt (default: no)\n" |
| 81 | "-k Write keyframes for all video tracks to outputfile_track00.kf.txt (default: no)\n" |
| 82 | "-t N Set the audio indexing mask to N (-1 means index all tracks, 0 means index none, default: 0)\n" |
| 83 | "-s N Set audio decoding error handling. See the documentation for details. (default: 0)\n" |
| 84 | "-u N Set the progress update frequency in seconds. Set to 0 for every percent. (default: 1)\n" |
| 85 | "-o string Set demuxer options to be used in the form of 'key=val:key=val'. (default: none)\n" |
| 86 | "\n" |
| 87 | "FFmpeg Demuxer Options:\n" |
| 88 | "--enable_drefs\n" |
| 89 | "--use_absolute_path\n" |
| 90 | << std::endl; |
| 91 | } |
| 92 | |
| 93 | int64_t getTimeInMicroSeconds() { |
| 94 | static std::chrono::time_point<std::chrono::steady_clock> StartTime = std::chrono::steady_clock::now(); |