anchor.diff:            bucfile:remove_recursive(SpritesPath),
             {error, In, OutName, output_vtt_error}
         end;
  -    {{ok, _}, Error} ->
  -      error_logger:error_msg("Failed to retrieve video duration when generating thumbnails: ~p", [Error]),
  -      bucfile:remove_recursive(SpritesPath),
  -      {error, In, OutName, source_duration_unavailable};
  -    {Error, _} ->
  +    Error ->
         error_logger:error_msg("Failed to retrieve sprite infos when generating thumbnails: ~p", [Error]),
         bucfile:remove_recursive(SpritesPath),
         {error, In, OutName, sprite_creation_error}
  
positive.code:                      Other ->
                         Other
                     end,
    case bucfile:make_dir(SpritesPath) of
      ok ->
        SpritesFiles = filename:join(SpritesPath, "%016d.png"),
        CmdOptions = [{ref, erlang:make_ref()}, {on, get_stages_number(Sprite)}],
        case vice:convert(Movie, SpritesFiles, [{output_format, "image2"},
                                                {video_filtergraph, <<"fps=1/", (bucs:to_binary(Every))/binary, ",scale=", (bucs:to_binary(Width))/binary, ":-1">>},
                                                {type, video},
                                                {cmd_options, [{stage, 1}|CmdOptions]}
                                                |allowed_extensions(Movie)],
                          {fun ?MODULE:thumbnails_finalize/2, {Movie, OutName, Options, ResultFunOrPid, CmdOptions}}) of
          {async, Ref} ->
            case is_pid(ResultFunOrPid) of
              true ->
                receive
                  {ok, _In, Out} -> {ok, Out};
                  {error, _In, _Out, Code} -> {error, Code};
                  Unknow -> {error, {invalid_response, Unknow}}
                end;
              false ->
                {async, Ref}
            end;
          Error ->
            Error
        end;
      Error ->
        Error
    end.
  
  
negative.code: get_stages_number(_) -> 1.
  
  % @hidden
  thumbnails_finalize({ok, In, _Out}, {Duration, OutName, Options, FunOrPid, CmdOptions}) ->
    Every = buclists:keyfind(every, 1, Options, 1),
    OutPath = buclists:keyfind(out_path, 1, Options, "."),
    AssetsPath = buclists:keyfind(assets_path, 1, Options, ""),
  