mafiosnik777 / enhancr

Video Frame Interpolation & Super Resolution using NVIDIA's TensorRT & Tencent's NCNN inference, beautifully crafted and packaged into a single app
https://dsc.gg/enhancr
GNU General Public License v3.0
585 stars 29 forks source link

Add Support for Other Hardware Encoders and Formats. #2

Closed WoofinaS closed 1 year ago

WoofinaS commented 1 year ago

Due to the massive speedups from Tensor RT it is possible for both CAIN and RIFE to both be bottle necked by transcoding speed instead of the interpolation itself. To Avoid this there is already support for NVENC. However enhancr also supports AMD gpus and soon apple silicon which both don't have NVENC. It would be nice for people on AMD and apple silicon to have hardware encode support to avoid transcoding and cpu bottlenecks.

Currently enhancr only supports HEVC with NVENC as well. It would be nice to support more formats like the older h.264 for compatibility reasons as well as newer formats like AV1 who are file size concerned.

bycloudai commented 1 year ago

Woofina goated

78Alpha commented 1 year ago

Might be a good use for FFMPEG, directing the frames like Waifu2x-ext-gui does, making chunks by time (60 seconds or user choice) to see the progress.

Also, something from the waifu gui, they have the option of a RAM DIsk. Spinning rust seems to be the most likely second bottleneck, and using an SSD for the frames will thrash the poor thing.

I haven't looked over the repo just yet to see what is being used, so my apologies on plugging things like that.

mafiosnik777 commented 1 year ago

Might be a good use for FFMPEG, directing the frames like Waifu2x-ext-gui does, making chunks by time (60 seconds or user choice) to see the progress.

Also, something from the waifu gui, they have the option of a RAM DIsk. Spinning rust seems to be the most likely second bottleneck, and using an SSD for the frames will thrash the poor thing.

I haven't looked over the repo just yet to see what is being used, so my apologies on plugging things like that.

I'm using ffmpeg already, together with vspipe. Effectively reading the frames directly from the file through a Pipe.

78Alpha commented 1 year ago

Just came across the ffmpeg sections, javascript is not something I am familiar, much different project layout

But, for the devices, it should be as simple as switching output codec to the hardware expected format.

Maybe a box that lets you select hardware and then grey's out anything they don't work with in the codec section

Device: CPU, QuickSync, AMF, NVENC

Also, you made a very beautiful interface for this stuff.

mafiosnik777 commented 1 year ago

Just came across the ffmpeg sections, javascript is not something I am familiar, much different project layout

But, for the devices, it should be as simple as switching output codec to the hardware expected format.

  • h265_amf
  • h264_nvenc
  • h264_qsv
  • hevc_amf
  • hevc_nvenc
  • hevc_qsv

Maybe a box that lets you select hardware and then grey's out anything they don't work with in the codec section

Device: CPU, QuickSync, AMF, NVENC

I will keep that in mind for a future update. Thanks for your input. Definitely seems viable.

Also, you made a very beautiful interface for this stuff.

Thanks!

Bubblemint864 commented 1 year ago

catiosnik

mafiosnik777 commented 1 year ago

@78Alpha @WoofinaS Implemented in #e28cd4c.