k4yt3x / video2x

A lossless video/GIF/image upscaler achieved with waifu2x, Anime4K, SRMD and RealSR. Started in Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
9.82k stars 955 forks source link

The .yaml of 4.x.x is .yaml method has become inconvenient compared to 3.0.0. #399

Closed ghost closed 3 years ago

ghost commented 3 years ago

Description

I downloaded it to update video2x after a long time, but .yaml method has become inconvenient compared to 3.0.0.

  1. You cannot work with webp. (caused by the extracted_frame_format)
  2. Unlike 3.0.0 an error occurs when you remove an unwanted command line.
  3. In video2x 4.x.x version, the latest version of waifu2x-ncnn-vulkan cannot be used to utilize multi-GPU.

Request .yaml method in the same way as 3.0.0.

Sources

I copied the .yaml file based on video2x 3.0.0. for waifu2x-caffe. The .yaml written in the vulkan way was accidentally deleted and needs to be rewritten.

ffmpeg:
  ffmpeg_path: video2x
  video_to_frames:
    -hwaccel: cuda
    -y: true
    output_options:
      -vcodec: libwebp
      -pix_fmt: yuv420p
      -q: 100
      -compression_level: 6
      -an: true
      -sn: true
  frames_to_video:
    -hwaccel: cuda
    -y: true
    input_options:
      -f: null
    output_options:
      -vcodec: libx265
      -crf: 17
      -preset: placebo
      -pix_fmt: yuv420p
      -an: true
      -sn: true
  migrating_tracks:
    -hwaccel: cuda
    -y: true
    output_options:
      -c: copy
      -map:
      - 0:v?
      - 1:d?
      - 1:t?
      -pix_fmt: yuv420p
waifu2x_caffe:
  path: waifu2x-caffe\waifu2x-caffe-cui.exe
  model_dir: waifu2x-caffe\models\cunet
  scale_height: null
  scale_ratio: null
  scale_width: null
  crop_h: null
  crop_w: null
  input_path: null
  output_path: null
  output_depth: null
  noise_level: null
  process: gpu
  input_extention_list: 'webp:png'
  output_extention: webp
  batch_size: 1
  crop_size: 384
  gpu: 0
  mode: scale
  output_quality: 100
  tta: 1
video2x:
  image_format: webp
  preserve_frames: true
  video2x_cache_directory: D:\video2x\temp
k4yt3x commented 3 years ago

You cannot work with webp. (caused by the extracted_frame_format)

WebP is not a format universally supported by all drivers, but PNG is. It will require some extra work to specify the supported format for each of the drivers. This is technically possible, but I won't have time for this right now.

Unlike 3.0.0 an error occurs when you remove an unwanted command line.

3.0.0 doesn't necessarily have any error detection methods. It really depends on what you remove. It's very hard for Video2X to detect if you have removed something critical. The point of having the configuration file is to give the users more freedom over how they want this software to behave. The trade-off here is its integrity. If you're modifying the configuration file directly, you're expected to know what you're doing.

In video2x 4.x.x version, the latest version of waifu2x-ncnn-vulkan cannot be used to utilize multi-GPU.

Originally, the GPU ID was an integer. With the recent changes done to it, the format can now be something like 0,1,2. The GPU ID field, therefore, needs to be parsed as a string. I can make the necessary changes to make v2x support *-ncnn-vulkan's multi-GPU features.

ghost commented 3 years ago

webp works fine with caffe and ncnn-vulkan. However, caffe needed to add webp in input_extention_list. Anime4K and Gifski are not used, so webp support is unknown. There is no need to quickly support webp.