Skip to content

Commit 5b6ae74

Browse files
Bruno LenziBruno Lenzi
Bruno Lenzi
authored and
Bruno Lenzi
committed
VideoSplitter: adding option min-frames to command-line
1 parent 0c381ae commit 5b6ae74

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

VideoSplitter.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,15 @@ def test_loadCaptions(self):
318318
parser.add_argument('--captions', default=None,
319319
help='Pickle file or directory containing captions (optional)')
320320
parser.add_argument('--no-print', help='Do not print sequences', action='store_true')
321-
parser.add_argument('--max-frames', help='Maximum frames to process', default=200,
322-
type=int)
321+
parser.add_argument('--min-frames', help='Minimum frames to write a sequence (default: 10)',
322+
default=10, type=int)
323+
parser.add_argument('--max-frames', help='Maximum frames to process (default: 200)',
324+
default=200, type=int)
323325
args = parser.parse_args()
324326

325327
for fname in args.filenames:
326328
vs = VideoSplitter(fname, captions=args.captions, max_frames=args.max_frames)
327-
vs.writeSequences(args.outputdir)
329+
vs.writeSequences(args.outputdir, min_frames=args.min_frames)
328330
if not args.no_print:
329331
vs.printSequences()
330332
vs.writeInfo(args.outputdir)

0 commit comments

Comments
 (0)