我正在使用 video2x 将一个大约 4GB 的视频文件从 1080p 分辨率升级到电影级 4K,并使用 Anime4KCPP。
硬件方面我正在使用:
- 处理器:Ryzen 5950X
- GPU:RTX 3090,稍微超频
- 存储:非常快的 2TB SSD
- 内存:快速 64GB RA
所以我怀疑 Anime4KCPP 是否存在硬件瓶颈。我的 FPS 创建率大约为 2 多一点。
根据video2x.exe
显示日志(打印到终端会话)的 Video2X 可执行文件 ( ),如果我没记错的话,使用 ffmpeg 将源分离为帧 + 创建新帧的部分花费了我的机器大约 30 分钟。完整的日志附在本期底部。
它已经运行了大约4个小时从那个阶段开始,根据日志显示,目前处于卡住/执行此操作的状态:
[+] INFO: Converting extracted frames into video
2022-02-04 17:23:56.475034 [+] INFO: Executing: C:\Windows\system32\dependencies\ffmpeg\bin\ffmpeg -r 23.976023976023978 -hwaccel auto -y -f image2 -i C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68\extracted_%d.png -vcodec libx264 -pix_fmt yuv420p -crf 17 -vf pad=ceil(iw/2)*2:ceil(ih/2)*2 -tune animation C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68\intermediate.mkv
2022-02-04 17:23:56.675062 [+] INFO: Main process waiting for subprocesses to exit
我想理解,这样我就能找到一种方法来完成它(或者只是在你的帮助下让它完成):
- 这个子进程在做什么?我阅读了一些 ffmpeg 文档和一些我不知道的技术术语,我想我现在明白了 ffmpeg 的完整命令的作用:创建一个由导出/放大的图像 + 源文件中的音轨组成的最终文件。但我不明白为什么要花这么长时间。与此相反的过程(从原始文件中提取图像 + 音轨)花费的时间要少得多 - 我认为大约只需几分钟。
- 它的计算是否非常复杂,所以我的机器需要花很长时间才能完成?
- 或者卡住了?如果是,原因何在?
- 我只是假设将一个视频拼接在一起所花的时间与“分解”一个视频所花的时间大致相同,但我并不真正了解,而且在我的计算机上也没有得到类似的性能结果,任何具有相似计算能力和速度的机器也没有得到类似的性能结果,一般来说也没有其他机器得到过类似的性能结果——这是我第一次这样做。
*我的机器上没有运行太多其他程序,我的 GPU 几乎处于空闲状态,而 CPU 被 ffmpeg 利用率约为 46%。
以下是完整日志video2x.exe
:
[+] INFO: Loading files into processing queue
2022-02-04 16:50:01.122942 [+] INFO: Input path(s): C:\Users\GalGr\OneDrive\Desktop\Attack on Titan The Final Season 1080p Dual Audio BD Remux FLAC-TTGA\S04E01-The Other Side of the Sea.mkv
2022-02-04 16:50:01.123443 [+] INFO: File MIME type: video/x-matroska
[+] INFO: Loaded files into processing queue
2022-02-04 16:50:01.125443 [+] INFO: Input file: C:\Users\GalGr\OneDrive\Desktop\Attack on Titan The Final Season 1080p Dual Audio BD Remux FLAC-TTGA\S04E01-The Other Side of the Sea.mkv
[+] INFO: Reading file information
2022-02-04 16:50:01.136470 [+] INFO: Executing: C:\Windows\system32\dependencies\ffmpeg\bin\ffprobe -v quiet -print_format json -show_format -show_streams -i C:\Users\GalGr\OneDrive\Desktop\Attack on Titan The Final Season 1080p Dual Audio BD Remux FLAC-TTGA\S04E01-The Other Side of the Sea.mkv
2022-02-04 16:50:01.354509 [+] INFO: Extracted frames are being saved to: C:\Users\GalGr\AppData\Local\Temp\video2x\tmpd4ezw2e1
2022-02-04 16:50:01.355009 [+] INFO: Upscaled frames are being saved to: C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68
[+] INFO: Starting upscaling video/GIF
[+] INFO: Getting total number of frames in the file
2022-02-04 16:50:01.355509 [+] INFO: Executing: C:\Windows\system32\dependencies\ffmpeg\bin\ffprobe -v quiet -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 C:\Users\GalGr\OneDrive\Desktop\Attack on Titan The Final Season 1080p Dual Audio BD Remux FLAC-TTGA\S04E01-The Other Side of the Sea.mkv
[+] INFO: Calculating scaling parameters
2022-02-04 16:56:11.777316 [+] INFO: Framerate: 23.976023976023978
2022-02-04 16:56:11.777815 [+] INFO: Width: 1920
2022-02-04 16:56:11.777815 [+] INFO: Height: 1080
2022-02-04 16:56:11.777815 [+] INFO: Total number of frames: 34440
2022-02-04 16:56:11.778316 [+] INFO: Output width: 3840
2022-02-04 16:56:11.778316 [+] INFO: Output height: 2160
2022-02-04 16:56:11.778316 [+] INFO: Required scale ratio: 2.0
2022-02-04 16:56:11.778316 [+] INFO: Upscaling jobs queue: [2.0]
2022-02-04 16:56:11.778816 [+] INFO: Executing: C:\Windows\system32\dependencies\ffmpeg\bin\ffmpeg -hwaccel auto -y -i C:\Users\GalGr\OneDrive\Desktop\Attack on Titan The Final Season 1080p Dual Audio BD Remux FLAC-TTGA\S04E01-The Other Side of the Sea.mkv -pix_fmt rgb24 C:\Users\GalGr\AppData\Local\Temp\video2x\tmpd4ezw2e1\extracted_%0d.png
2022-02-04 16:56:11.939845 [+] INFO: Main process waiting for subprocesses to exit
2022-02-04 17:04:10.948366 [+] INFO: Subprocess 7208 exited with code 0
[+] INFO: Starting to upscale extracted frames
2022-02-04 17:04:11.389849 [+] INFO: [upscaler] Subprocess 11588 executing: C:\Windows\system32\dependencies\anime4kcpp\CLI\Anime4KCPP_CLI\Anime4KCPP_CLI --passes 2 --pushColorCount 2 --strengthColor 0.3 --strengthGradient 1.0 --zoomFactor 2.0 --threads 16 --preprocessing --postprocessing --preFilters 4 --postFilters 40 --GPUMode --CNNMode --HDN --HDNLevel 1 --platformID 0 --deviceID 0 --codec mp4v --forceFps 0.0 --input C:\Users\GalGr\AppData\Local\Temp\video2x\tmpd4ezw2e1 --output C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68
2022-02-04 17:04:11.407785 [+] INFO: Starting progress monitor
2022-02-04 17:04:11.408786 [+] INFO: Starting upscaled image cleaner
2022-02-04 17:04:11.409286 [+] INFO: Main process waiting for subprocesses to exit
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 2%|6 | 629/34440 [00:19<17:21, 32.47it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 2%|7 | 735/34440 [00:22<16:40, 33.68it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 2%|7 | 768/34440 [00:23<16:54, 33.18it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 2%|7 | 804/34440 [00:24<16:34, 33.81it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 2%|8 | 840/34440 [00:25<16:22, 34.20it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 3%|8 | 876/34440 [00:26<16:14, 34.43it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 6%|#8 | 1960/34440 [00:58<16:09, 33.50it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 6%|#8 | 2000/34440 [00:59<15:30, 34.87it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 6%|#8 | 2038/34440 [01:00<15:13, 35.48it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 8%|##7 | 2914/34440 [01:25<15:11, 34.60it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 10%|###1 | 3412/34440 [01:39<14:24, 35.89it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 10%|###2 | 3479/34440 [01:42<15:27, 33.37it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 10%|###2 | 3516/34440 [01:43<15:13, 33.86it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 12%|###7 | 4043/34440 [01:58<14:19, 35.35it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 12%|###7 | 4077/34440 [01:59<14:47, 34.21it/s]libpng error: IDAT: CRC error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 13%|####2 | 4576/34440 [02:13<13:47, 36.09it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 14%|####6 | 4986/34440 [02:25<14:16, 34.39it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 16%|##### | 5461/34440 [02:39<14:41, 32.89it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 16%|#####1 | 5496/34440 [02:40<14:49, 32.54it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 18%|#####8 | 6284/34440 [03:02<13:20, 35.15it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 20%|######4 | 6966/34440 [03:23<14:31, 31.51it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 25%|########1 | 8756/34440 [04:14<12:11, 35.11it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 28%|######### | 9754/34440 [04:43<12:19, 33.40it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 30%|#########4 | 10459/34440 [05:03<11:10, 35.75it/s]libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 100%|##############################9| 34406/34440 [16:33<00:01, 33.54it/s]2022-02-04 17:20:45.787420 [+] INFO: Subprocess 15064 exited with code 0
2022-02-04 17:20:45.895939 [+] INFO: Killing progress monitor
Processing: S04E01-The Other Side of the Sea.mkv (pass 1/1): 100%|##############################9| 34406/34440 [16:34<00:00, 34.59it/s]
2022-02-04 17:20:46.205994 [+] INFO: Killing upscaled image cleaner
[+] INFO: Upscaling completed
[+] INFO: Average processing speed: 34.55391372262986 seconds per frame
[+] INFO: Lanczos downscaling frames
Downscaling: 100%|##############################################################################| 34440/34440 [01:54<00:00, 301.05it/s]
[+] INFO: Converting extracted frames into video
2022-02-04 17:23:56.475034 [+] INFO: Executing: C:\Windows\system32\dependencies\ffmpeg\bin\ffmpeg -r 23.976023976023978 -hwaccel auto -y -f image2 -i C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68\extracted_%d.png -vcodec libx264 -pix_fmt yuv420p -crf 17 -vf pad=ceil(iw/2)*2:ceil(ih/2)*2 -tune animation C:\Users\GalGr\AppData\Local\Temp\video2x\tmpv42p9c68\intermediate.mkv
2022-02-04 17:23:56.675062 [+] INFO: Main process waiting for subprocesses to exit