Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using --grid 10x0 ... mode. #83

Open
GuguKatze opened this issue May 18, 2020 · 1 comment
Open

Problem when using --grid 10x0 ... mode. #83

GuguKatze opened this issue May 18, 2020 · 1 comment
Labels

Comments

@GuguKatze
Copy link

GuguKatze commented May 18, 2020

I get this error using the following parameter (probably again an issue with --grid 10x0) ... I got no such errors with the same mp4 file but with a regular 3x3 or 5x4 grid ...

... it seems to be caused by input files not long enough for even a single thumbnail ... i.e. using "--interval 1m" but the input file only being 40 seconds long.

my $cmd = '/usr/local/bin/vcsi ' . $self->mp4;
$cmd .= ' --show-timestamp --width 1920 --grid 10x0 --interval 1m --grid-spacing 0 --background-color 000000';
$cmd .= ' --start-delay-percent 0 --end-delay-percent 1 --metadata-position hidden'; # see #75
$cmd .= ' --timestamp-font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"';
$cmd .= ' --timestamp-format '{H}:{M}'';
$cmd .= ' --timestamp-font-size 10 --timestamp-vertical-padding 2 --format jpg -o ' . $self->{'preview'};

Traceback (most recent call last):
  File "/usr/local/bin/vcsi", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/vcsi/__init__.py", line 3, in main
    vcsi.vcsi.main()
  File "/usr/local/lib/python3.8/dist-packages/vcsi/vcsi.py", line 1518, in main
    process_file(filename, args)
  File "/usr/local/lib/python3.8/dist-packages/vcsi/vcsi.py", line 1646, in process_file
    selected_frames, temp_frames = select_sharpest_images(media_info, media_capture, args)
  File "/usr/local/lib/python3.8/dist-packages/vcsi/vcsi.py", line 677, in select_sharpest_images
    selected_items = select_color_variety(selected_items, args.num_selected)
  File "/usr/local/lib/python3.8/dist-packages/vcsi/vcsi.py", line 686, in select_color_variety
    min_color = avg_color_sorted[0].avg_color
IndexError: list index out of range
@amietn amietn added the bug label Oct 15, 2020
@plambert
Copy link

I see this problem as well; it'd be really nice if we could have the option to, in this case, just grab a frame from the approximate middle of the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants