akai-katto / dandere2x

Dandere2x - Fast Waifu2x Video Upscaling.
https://www.reddit.com/r/Dandere2x/
GNU General Public License v3.0
1.43k stars 79 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'config_files/output_options.yaml' #169

Closed andykais closed 3 years ago

andykais commented 3 years ago

The docker image is failing with the following error:

 andrew  Gash Bell  docker run --rm -it -v $PWD:/host --workdir=/host akaikatto/dandere2x -p singleprocess -ws ./workspace/ -i ./Gash\ Bell\ 01.mkv -o gash-bell-01-dandere2x-upscale.mkv
Traceback (most recent call last):
  File "/dandere2x/dandere2x/src/main.py", line 44, in <module>
    main()
  File "/dandere2x/dandere2x/src/main.py", line 39, in main
    cli_start()
  File "/dandere2x/dandere2x/src/main.py", line 10, in cli_start
    root_service_request = Dandere2xServiceRequest.load_from_args(args=args)
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service_request.py", line 96, in load_from_args
    with open("config_files/output_options.yaml", "r") as read_file:
FileNotFoundError: [Errno 2] No such file or directory: 'config_files/output_options.yaml'
Press key to exit.

I have nvidia-container-toolkit version 1.4.0-2 installed. Note I had to remove the flag --gpus all since my computer does not have an nvidia graphics card and adding the flag was giving errors:

 andrew  Gash Bell  docker run --rm -it -v $PWD:/host --workdir=/host --gpus all akaikatto/dandere2x -p singleprocess -ws ./workspace/ -i ./Gash\ Bell\ 01.mkv -o gash-bell-01-dandere2x-upscale.mkv
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown.
akai-katto commented 3 years ago

Would you mind sharing your distribution you're using? This is an odd error, I thought Dockers should all behave the same.

akai-katto commented 3 years ago

I found the error, unset workdir=/host since this is re-routing the workdir to be outside of the dandere2x directory that it needs to operate out of. I'll update the instructions.

I've updated the instructions on the repo to be a bit more intuitive, since I didn't really explain how to properly use one's own video.

andykais commented 3 years ago

Ack! So it was me messing with the docker configuration. I removed workdir and it appears to be working? The container is outputting this

 andrew  Zatch Bell  docker run --rm -it -v $PWD:/host akaikatto/dandere2x -p singleprocess -ws ./workspace/ -i /host/Season\ 1/Zatch\ Bell\ Episode\ 001\ English\ Dubbed.flv -o gash-bell-01-dandere2x-upscale.mp4
workspace : /dandere2x/dandere2x/src/workspace
scale_factor : 2
quality_minimum : 85
denoise_level : 3
block_size : 30
output_file : /dandere2x/dandere2x/src/gash-bell-01-dandere2x-upscale.mp4
input_file : /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
output_options : {'realsr_ncnn_vulkan': {'output_options': {'-g': None, '-load-proc-save_threads': None, '-model-path': None, '-tile-size': 200, '-verbose': None}}, 'ffmpeg': {'-hwaccel': True, 'pre_process_video': {'output_options': {'-pix_fmt': None, '-vsync': 'cfr', '-crf': 17, '-vf': ['noise=c1s=8:c0f=u']}}, 'convert_video_to_gif': {'output_options': {'-pix_fmt': 'yuv420p', '-r': 15}}, 'pipe_video': {'output_options': {'-loglevel': 'panic', '-y': '-f', 'image2pipe': True, '-i': '-', '-vcodec': 'libx264', '-preset': 'medium', '-qscale': 5, '-crf': 17, '-vf': [' deband=range=8:blur=false, pp7=qp=2:mode=medium']}}}, 'waifu2x_ncnn_vulkan': {'output_options': {'-g': None, '-load-proc-save_threads': None, '-tile-size': 200, '-verbose': None}}, 'waifu2x_converter': {'output_options': {'--block-size': None, '--disable-gpu': None, '--force-OpenCL': True, '--image-quality': None, '--jobs': None, '--mode': None, '--model-dir': None, '--output-format': None, '--png-compression': None, '--processor': None, '--silent': True}}, 'waifu2x_caffe': {'output_options': {'-batch_size': None, '-crop_size': None, '-gpu': None, '-model_dir': None, '-output_depth': None, '-output_quality': None, '-process': 'cudnn', '-tta': None}}}
name : Master Service Request
processing_type : ProcessingType.SINGLE_PROCESS
upscale_engine : UpscalingEngineType.VULKAN
attempting to make or clear /dandere2x/dandere2x/src/workspace
setting json {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Constrained Baseline', 'codec_type': 'video', 'codec_time_base': '50/2997', 'codec_tag_string': 'avc1', 'codec_tag': '0x31637661', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '4:3', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'refs': 1, 'is_avc': 'true', 'nal_length_size': '4', 'r_frame_rate': '2997/100', 'avg_frame_rate': '2997/100', 'time_base': '1/11988', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 15119200, 'duration': '1261.194528', 'bit_rate': '400452', 'bits_per_raw_sample': '8', 'nb_frames': '37798', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'und', 'handler_name': 'VideoHandler'}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': 'mp4a', 'codec_tag': '0x6134706d', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 2, 'channel_layout': 'stereo', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 60536832, 'duration': '1261.184000', 'bit_rate': '95808', 'max_bit_rate': '96000', 'nb_frames': '59119', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SoundHandler'}}, {'index': 2, 'codec_name': 'bin_data', 'codec_long_name': 'binary data', 'codec_type': 'data', 'codec_tag_string': 'text', 'codec_tag': '0x74786574', 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 1261194, 'duration': '1261.194000', 'nb_frames': '4', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SubtitleHandler'}}], 'format': {'filename': '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv', 'nb_streams': 3, 'nb_programs': 0, 'format_name': 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name': 'QuickTime / MOV', 'start_time': '0.000000', 'duration': '1261.206000', 'size': '79324600', 'bit_rate': '503166', 'probe_score': 100, 'tags': {'major_brand': 'isom', 'minor_version': '512', 'compatible_brands': 'isomiso2avc1mp41', 'encoder': 'Lavf55.19.104'}}}
setting json {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Constrained Baseline', 'codec_type': 'video', 'codec_time_base': '50/2997', 'codec_tag_string': 'avc1', 'codec_tag': '0x31637661', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '4:3', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'refs': 1, 'is_avc': 'true', 'nal_length_size': '4', 'r_frame_rate': '2997/100', 'avg_frame_rate': '2997/100', 'time_base': '1/11988', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 15119200, 'duration': '1261.194528', 'bit_rate': '400452', 'bits_per_raw_sample': '8', 'nb_frames': '37798', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'und', 'handler_name': 'VideoHandler'}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': 'mp4a', 'codec_tag': '0x6134706d', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 2, 'channel_layout': 'stereo', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 60536832, 'duration': '1261.184000', 'bit_rate': '95808', 'max_bit_rate': '96000', 'nb_frames': '59119', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SoundHandler'}}, {'index': 2, 'codec_name': 'bin_data', 'codec_long_name': 'binary data', 'codec_type': 'data', 'codec_tag_string': 'text', 'codec_tag': '0x74786574', 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 1261194, 'duration': '1261.194000', 'nb_frames': '4', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SubtitleHandler'}}], 'format': {'filename': '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv', 'nb_streams': 3, 'nb_programs': 0, 'format_name': 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name': 'QuickTime / MOV', 'start_time': '0.000000', 'duration': '1261.206000', 'size': '79324600', 'bit_rate': '503166', 'probe_score': 100, 'tags': {'major_brand': 'isom', 'minor_version': '512', 'compatible_brands': 'isomiso2avc1mp41', 'encoder': 'Lavf55.19.104'}}}

and my CPU is at 100% so I assume its doing its job? Unrelated, but some sort of progress bar might be helpful in indicating how long a render will take. Thank you for your help!

andykais commented 3 years ago

oh I spoke a little too soon. It failed with a new error

 andrew  Zatch Bell  docker run --rm -it -v $PWD:/host akaikatto/dandere2x -p singleprocess -ws ./workspace/ -i /host/Season\ 1/Zatch\ Bell\ Episode\ 001\ English\ Dubbed.flv -o gash-bell-01-dandere2x-upscale.mp4
workspace : /dandere2x/dandere2x/src/workspace
scale_factor : 2
quality_minimum : 85
denoise_level : 3
block_size : 30
output_file : /dandere2x/dandere2x/src/gash-bell-01-dandere2x-upscale.mp4
input_file : /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
output_options : {'realsr_ncnn_vulkan': {'output_options': {'-g': None, '-load-proc-save_threads': None, '-model-path': None, '-tile-size': 200, '-verbose': None}}, 'ffmpeg': {'-hwaccel': True, 'pre_process_video': {'output_options': {'-pix_fmt': None, '-vsync': 'cfr', '-crf': 17, '-vf': ['noise=c1s=8:c0f=u']}}, 'convert_video_to_gif': {'output_options': {'-pix_fmt': 'yuv420p', '-r': 15}}, 'pipe_video': {'output_options': {'-loglevel': 'panic', '-y': '-f', 'image2pipe': True, '-i': '-', '-vcodec': 'libx264', '-preset': 'medium', '-qscale': 5, '-crf': 17, '-vf': [' deband=range=8:blur=false, pp7=qp=2:mode=medium']}}}, 'waifu2x_ncnn_vulkan': {'output_options': {'-g': None, '-load-proc-save_threads': None, '-tile-size': 200, '-verbose': None}}, 'waifu2x_converter': {'output_options': {'--block-size': None, '--disable-gpu': None, '--force-OpenCL': True, '--image-quality': None, '--jobs': None, '--mode': None, '--model-dir': None, '--output-format': None, '--png-compression': None, '--processor': None, '--silent': True}}, 'waifu2x_caffe': {'output_options': {'-batch_size': None, '-crop_size': None, '-gpu': None, '-model_dir': None, '-output_depth': None, '-output_quality': None, '-process': 'cudnn', '-tta': None}}}
name : Master Service Request
processing_type : ProcessingType.SINGLE_PROCESS
upscale_engine : UpscalingEngineType.VULKAN
attempting to make or clear /dandere2x/dandere2x/src/workspace
setting json {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Constrained Baseline', 'codec_type': 'video', 'codec_time_base': '50/2997', 'codec_tag_string': 'avc1', 'codec_tag': '0x31637661', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '4:3', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'refs': 1, 'is_avc': 'true', 'nal_length_size': '4', 'r_frame_rate': '2997/100', 'avg_frame_rate': '2997/100', 'time_base': '1/11988', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 15119200, 'duration': '1261.194528', 'bit_rate': '400452', 'bits_per_raw_sample': '8', 'nb_frames': '37798', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'und', 'handler_name': 'VideoHandler'}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': 'mp4a', 'codec_tag': '0x6134706d', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 2, 'channel_layout': 'stereo', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 60536832, 'duration': '1261.184000', 'bit_rate': '95808', 'max_bit_rate': '96000', 'nb_frames': '59119', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SoundHandler'}}, {'index': 2, 'codec_name': 'bin_data', 'codec_long_name': 'binary data', 'codec_type': 'data', 'codec_tag_string': 'text', 'codec_tag': '0x74786574', 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 1261194, 'duration': '1261.194000', 'nb_frames': '4', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SubtitleHandler'}}], 'format': {'filename': '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv', 'nb_streams': 3, 'nb_programs': 0, 'format_name': 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name': 'QuickTime / MOV', 'start_time': '0.000000', 'duration': '1261.206000', 'size': '79324600', 'bit_rate': '503166', 'probe_score': 100, 'tags': {'major_brand': 'isom', 'minor_version': '512', 'compatible_brands': 'isomiso2avc1mp41', 'encoder': 'Lavf55.19.104'}}}
setting json {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Constrained Baseline', 'codec_type': 'video', 'codec_time_base': '50/2997', 'codec_tag_string': 'avc1', 'codec_tag': '0x31637661', 'width': 640, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '4:3', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'refs': 1, 'is_avc': 'true', 'nal_length_size': '4', 'r_frame_rate': '2997/100', 'avg_frame_rate': '2997/100', 'time_base': '1/11988', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 15119200, 'duration': '1261.194528', 'bit_rate': '400452', 'bits_per_raw_sample': '8', 'nb_frames': '37798', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'und', 'handler_name': 'VideoHandler'}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': 'mp4a', 'codec_tag': '0x6134706d', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 2, 'channel_layout': 'stereo', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 60536832, 'duration': '1261.184000', 'bit_rate': '95808', 'max_bit_rate': '96000', 'nb_frames': '59119', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SoundHandler'}}, {'index': 2, 'codec_name': 'bin_data', 'codec_long_name': 'binary data', 'codec_type': 'data', 'codec_tag_string': 'text', 'codec_tag': '0x74786574', 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'duration_ts': 1261194, 'duration': '1261.194000', 'nb_frames': '4', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'handler_name': 'SubtitleHandler'}}], 'format': {'filename': '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv', 'nb_streams': 3, 'nb_programs': 0, 'format_name': 'mov,mp4,m4a,3gp,3g2,mj2', 'format_long_name': 'QuickTime / MOV', 'start_time': '0.000000', 'duration': '1261.206000', 'size': '79324600', 'bit_rate': '503166', 'probe_score': 100, 'tags': {'major_brand': 'isom', 'minor_version': '512', 'compatible_brands': 'isomiso2avc1mp41', 'encoder': 'Lavf55.19.104'}}}
pre_processed.mkv 2021-01-11 03:37:11,754 INFO     dandere2x_logger.py set_dandere2x_logger: Dandere2x Console Logger Set
setting json {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'High', 'codec_type': 'video', 'codec_time_base': '50/2997', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 630, 'height': 480, 'coded_width': 640, 'coded_height': 480, 'has_b_frames': 2, 'sample_aspect_ratio': '64:63', 'display_aspect_ratio': '4:3', 'pix_fmt': 'yuv420p', 'level': 30, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'true', 'nal_length_size': '4', 'r_frame_rate': '2997/100', 'avg_frame_rate': '2997/100', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'bits_per_raw_sample': '8', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'HANDLER_NAME': 'VideoHandler', 'ENCODER': 'Lavc58.35.100 libx264', 'DURATION': '00:21:01.197000000'}}, {'index': 1, 'codec_name': 'vorbis', 'codec_long_name': 'Vorbis', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 2, 'channel_layout': 'stereo', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/1000', 'start_pts': 0, 'start_time': '0.000000', 'disposition': {'default': 1, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}, 'tags': {'language': 'eng', 'HANDLER_NAME': 'SoundHandler', 'ENCODER': 'Lavc58.35.100 libvorbis', 'DURATION': '00:21:01.187000000'}}], 'format': {'filename': '/dandere2x/dandere2x/src/workspace/pre_processed.mkv', 'nb_streams': 2, 'nb_programs': 0, 'format_name': 'matroska,webm', 'format_long_name': 'Matroska / WebM', 'start_time': '0.000000', 'duration': '1261.197000', 'size': '301539608', 'bit_rate': '1912720', 'probe_score': 100, 'tags': {'COMPATIBLE_BRANDS': 'isomiso2avc1mp41', 'MAJOR_BRAND': 'isom', 'MINOR_VERSION': '512', 'ENCODER': 'Lavf58.20.100'}}}
pre_processed.mkv 2021-01-11 03:38:19,050 INFO     __init__.py run     : called.
pre_processed.mkv 2021-01-11 03:38:19,051 INFO     __init__.py __create_directories: Creating directories. Starting with /dandere2x/dandere2x/src/workspace/subworkspace first
pre_processed.mkv 2021-01-11 03:38:19,053 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/log_dir/ 
pre_processed.mkv 2021-01-11 03:38:19,053 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/residual_images/ 
pre_processed.mkv 2021-01-11 03:38:19,054 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/debug/ 
pre_processed.mkv 2021-01-11 03:38:19,055 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/residual_upscaled/ 
pre_processed.mkv 2021-01-11 03:38:19,055 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/fade_data/ 
pre_processed.mkv 2021-01-11 03:38:19,056 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/inputs/ 
pre_processed.mkv 2021-01-11 03:38:19,056 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/encoded/ 
pre_processed.mkv 2021-01-11 03:38:19,057 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/console_output/ 
pre_processed.mkv 2021-01-11 03:38:19,057 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/compressed_static/ 
pre_processed.mkv 2021-01-11 03:38:19,058 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/pframe_data/ 
pre_processed.mkv 2021-01-11 03:38:19,058 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/temp_image_folder/ 
pre_processed.mkv 2021-01-11 03:38:19,059 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/correction_data/ 
pre_processed.mkv 2021-01-11 03:38:19,059 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/residual_data/ 
pre_processed.mkv 2021-01-11 03:38:19,060 INFO     __init__.py __create_directories: Successfully created the directory /dandere2x/dandere2x/src/workspace/subworkspace/merged/ 
pre_processed.mkv 2021-01-11 03:38:19,060 INFO     __init__.py run     : Dandere2x Threads Set.. going live with the following context file.
pre_processed.mkv 2021-01-11 03:38:19,062 INFO     dandere2x_service_context.py log_all_variables: Context Settings:
pre_processed.mkv 2021-01-11 03:38:19,064 INFO     dandere2x_service_context.py log_all_variables: service_request : <dandere2x.dandere2x_service_request.Dandere2xServiceRequest object at 0x7fe637b21b90>
pre_processed.mkv 2021-01-11 03:38:19,064 INFO     dandere2x_service_context.py log_all_variables: input_frames_dir : /dandere2x/dandere2x/src/workspace/subworkspace/inputs/
pre_processed.mkv 2021-01-11 03:38:19,065 INFO     dandere2x_service_context.py log_all_variables: residual_images_dir : /dandere2x/dandere2x/src/workspace/subworkspace/residual_images/
pre_processed.mkv 2021-01-11 03:38:19,066 INFO     dandere2x_service_context.py log_all_variables: residual_upscaled_dir : /dandere2x/dandere2x/src/workspace/subworkspace/residual_upscaled/
pre_processed.mkv 2021-01-11 03:38:19,066 INFO     dandere2x_service_context.py log_all_variables: residual_data_dir : /dandere2x/dandere2x/src/workspace/subworkspace/residual_data/
pre_processed.mkv 2021-01-11 03:38:19,066 INFO     dandere2x_service_context.py log_all_variables: pframe_data_dir : /dandere2x/dandere2x/src/workspace/subworkspace/pframe_data/
pre_processed.mkv 2021-01-11 03:38:19,067 INFO     dandere2x_service_context.py log_all_variables: correction_data_dir : /dandere2x/dandere2x/src/workspace/subworkspace/correction_data/
pre_processed.mkv 2021-01-11 03:38:19,068 INFO     dandere2x_service_context.py log_all_variables: merged_dir : /dandere2x/dandere2x/src/workspace/subworkspace/merged/
pre_processed.mkv 2021-01-11 03:38:19,068 INFO     dandere2x_service_context.py log_all_variables: fade_data_dir : /dandere2x/dandere2x/src/workspace/subworkspace/fade_data/
pre_processed.mkv 2021-01-11 03:38:19,068 INFO     dandere2x_service_context.py log_all_variables: debug_dir : /dandere2x/dandere2x/src/workspace/subworkspace/debug/
pre_processed.mkv 2021-01-11 03:38:19,068 INFO     dandere2x_service_context.py log_all_variables: console_output_dir : /dandere2x/dandere2x/src/workspace/subworkspace/console_output/
pre_processed.mkv 2021-01-11 03:38:19,069 INFO     dandere2x_service_context.py log_all_variables: compressed_static_dir : /dandere2x/dandere2x/src/workspace/subworkspace/compressed_static/
pre_processed.mkv 2021-01-11 03:38:19,069 INFO     dandere2x_service_context.py log_all_variables: encoded_dir : /dandere2x/dandere2x/src/workspace/subworkspace/encoded/
pre_processed.mkv 2021-01-11 03:38:19,069 INFO     dandere2x_service_context.py log_all_variables: temp_image_folder : /dandere2x/dandere2x/src/workspace/subworkspace/temp_image_folder/
pre_processed.mkv 2021-01-11 03:38:19,069 INFO     dandere2x_service_context.py log_all_variables: log_dir : /dandere2x/dandere2x/src/workspace/subworkspace/log_dir/
pre_processed.mkv 2021-01-11 03:38:19,070 INFO     dandere2x_service_context.py log_all_variables: directories : {'/dandere2x/dandere2x/src/workspace/subworkspace/log_dir/', '/dandere2x/dandere2x/src/workspace/subworkspace/residual_images/', '/dandere2x/dandere2x/src/workspace/subworkspace/debug/', '/dandere2x/dandere2x/src/workspace/subworkspace/residual_upscaled/', '/dandere2x/dandere2x/src/workspace/subworkspace/fade_data/', '/dandere2x/dandere2x/src/workspace/subworkspace/inputs/', '/dandere2x/dandere2x/src/workspace/subworkspace/encoded/', '/dandere2x/dandere2x/src/workspace/subworkspace/console_output/', '/dandere2x/dandere2x/src/workspace/subworkspace/compressed_static/', '/dandere2x/dandere2x/src/workspace/subworkspace/pframe_data/', '/dandere2x/dandere2x/src/workspace/subworkspace/temp_image_folder/', '/dandere2x/dandere2x/src/workspace/subworkspace/correction_data/', '/dandere2x/dandere2x/src/workspace/subworkspace/residual_data/', '/dandere2x/dandere2x/src/workspace/subworkspace/merged/'}
pre_processed.mkv 2021-01-11 03:38:19,070 INFO     dandere2x_service_context.py log_all_variables: video_settings : <dandere2x.dandere2xlib.wrappers.ffmpeg.videosettings.VideoSettings object at 0x7fe637b1bc50>
pre_processed.mkv 2021-01-11 03:38:19,070 INFO     dandere2x_service_context.py log_all_variables: width : 630
pre_processed.mkv 2021-01-11 03:38:19,070 INFO     dandere2x_service_context.py log_all_variables: height : 480
pre_processed.mkv 2021-01-11 03:38:19,071 INFO     dandere2x_service_context.py log_all_variables: frame_count : 37798
pre_processed.mkv 2021-01-11 03:38:19,071 INFO     dandere2x_service_context.py log_all_variables: frame_rate : 29.97
pre_processed.mkv 2021-01-11 03:38:19,071 INFO     dandere2x_service_context.py log_all_variables: bleed : 1
pre_processed.mkv 2021-01-11 03:38:19,071 INFO     dandere2x_service_context.py log_all_variables: temp_image : /dandere2x/dandere2x/src/workspace/subworkspace/temp_image_folder/tempimage.jpg
pre_processed.mkv 2021-01-11 03:38:19,072 INFO     dandere2x_service_context.py log_all_variables: debug : False
pre_processed.mkv 2021-01-11 03:38:19,072 INFO     dandere2x_service_context.py log_all_variables: step_size : 4
pre_processed.mkv 2021-01-11 03:38:19,072 INFO     dandere2x_service_context.py log_all_variables: max_frames_ahead : 100
Exception in thread Master Service Request:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service/__init__.py", line 72, in run
    self.__upscale_first_frame()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service/__init__.py", line 114, in __upscale_first_frame
    output_image=self.context.merged_dir + "merged_" + str(1) + ".jpg")
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service/core/waifu2x/waifu2x_ncnn_vulkan.py", line 98, in upscale_file
    rename_file_wait(output_image, output_image.replace(".png", ".jpg"))
  File "/dandere2x/dandere2x/src/dandere2x/dandere2xlib/utils/dandere2x_utils.py", line 147, in rename_file_wait
    os.rename(file1, file2)
FileNotFoundError: [Errno 2] No such file or directory: '/dandere2x/dandere2x/src/workspace/subworkspace/merged/merged_1.png' -> '/dandere2x/dandere2x/src/workspace/subworkspace/merged/merged_1.jpg'

Total runtime duration: 618.1520154476166

I am on arch linux if that helps

akai-katto commented 3 years ago

Taking a look at this, my first guess is that waifu2x-ncnn-vulkan isn't working (pardon my lack of sanity checks, there's a lot of moving parts I'm fixing the leaks of).

My recommendation that would help me the most would be trying video2x's docker image (more stable), and seeing if that works for you. https://github.com/k4yt3x/video2x

If not, then I have a problem on my end.

akai-katto commented 3 years ago

> I am on arch linux if that helps

fwiw on arch, I've been pretty successful (manjaro user here part time) with using the "linux_setup.sh" script; dander2x should work out of the box with waifu2x-ncnn-vulkan on most linux machines.

andykais commented 3 years ago

things appear to run fine on video2x. Note that I once again had to drop docker gpu arguments since I do not have a supported gpu on my laptop (--gpus all and -v /dev/dri:/dev/dri)

INPUT=Season\ 1/Zatch\ Bell\ Episode\ 001\ English\ Dubbed.flv
OUTPUT=gash-bell-01-dandere2x-upscale.mp4

docker run --rm \
       -it \
       -v "$PWD:/host" \
       k4yt3x/video2x:4.6.0 \
       -d waifu2x_ncnn_vulkan \
       -r 2 \
       -i "/host/$INPUT" \
       -o $OUTPUT \
    __      __  _       _                  ___   __   __
    \ \    / / (_)     | |                |__ \  \ \ / /
     \ \  / /   _    __| |   ___    ___      ) |  \ V /
      \ \/ /   | |  / _` |  / _ \  / _ \    / /    > <
       \  /    | | | (_| | |  __/ | (_) |  / /_   / . \
        \/     |_|  \__,_|  \___|  \___/  |____| /_/ \_\

                  Video2X Video Enlarger

                       Version 4.1.1

2021-01-12 17:20:28.596991 [+] INFO: Redirecting console logs to /video2x/src/video2x_2021-01-12_17-20-28.log
[+] INFO: Loading files into processing queue
2021-01-12 17:20:28.619743 [+] INFO: Input path(s): /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
[+] INFO: Loaded files into processing queue
2021-01-12 17:20:28.632258 [+] INFO: Input file: /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
2021-01-12 17:20:28.632447 [+] INFO: Creating cache directory /tmp/video2x
2021-01-12 17:20:28.632740 [+] INFO: Extracted frames are being saved to: /tmp/video2x/tmpo8knto_3
2021-01-12 17:20:28.632928 [+] INFO: Upscaled frames are being saved to: /tmp/video2x/tmpjhk4s7xc
[+] INFO: Reading video information
2021-01-12 17:20:28.633063 [+] INFO: Executing: /usr/bin/ffprobe -v quiet -print_format json -show_format -show_streams -i '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv'
[+] INFO: Framerate: 29.97
2021-01-12 17:20:28.890427 [+] INFO: Executing: /usr/bin/ffmpeg -hwaccel auto -y -i '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv' -pix_fmt rgba64be /tmp/video2x/tmpo8knto_3/extracted_%0d.png
2021-01-12 17:20:28.892423 [+] INFO: Main process waiting for subprocesses to exit
ffmpeg version 4.1.4-1build2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.2.1-4ubuntu1)
  configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.19.104
  Duration: 00:21:01.21, start: 0.000000, bitrate: 503 kb/s
    Chapter #0:0: start 0.000000, end 30.333000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 30.333000, end 632.233000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 632.233000, end 1231.967000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1231.967000, end 1261.194000
    Metadata:
      title           : Chapter 4
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 400 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Data: bin_data (text / 0x74786574)
    Metadata:
      handler_name    : SubtitleHandler
[AVHWDeviceContext @ 0x5600cb0adf80] No VA display found for device: .
Device creation failed: -22.
[AVHWDeviceContext @ 0x5600cb0afcc0] Cannot open the X11 display .
Device creation failed: -1313558101.
[h264 @ 0x5600cb0b0f00] Auto hwaccel disabled: no device found.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 0x5600cb1cdec0] No accelerated colorspace conversion found from yuv420p to rgba64be.
Output #0, image2, to '/tmp/video2x/tmpo8knto_3/extracted_%0d.png':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
    Chapter #0:0: start 0.000000, end 30.333000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 30.333000, end 632.233000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 632.233000, end 1231.967000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1231.967000, end 1261.194000
    Metadata:
      title           : Chapter 4
    Stream #0:0(und): Video: png, rgba64be, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.35.100 png
frame=  332 fps= 13 q=-0.0 size=N/A time=00:00:10.94 bitrate=N/A speed=0.443x    
andykais commented 3 years ago

It appears I spoke too soon. Full log below:


    __      __  _       _                  ___   __   __
    \ \    / / (_)     | |                |__ \  \ \ / /
     \ \  / /   _    __| |   ___    ___      ) |  \ V /
      \ \/ /   | |  / _` |  / _ \  / _ \    / /    > <
       \  /    | | | (_| | |  __/ | (_) |  / /_   / . \
        \/     |_|  \__,_|  \___|  \___/  |____| /_/ \_\

                  Video2X Video Enlarger

                       Version 4.1.1

2021-01-12 17:20:28.596991 [+] INFO: Redirecting console logs to /video2x/src/video2x_2021-01-12_17-20-28.log
[+] INFO: Loading files into processing queue
2021-01-12 17:20:28.619743 [+] INFO: Input path(s): /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
[+] INFO: Loaded files into processing queue
2021-01-12 17:20:28.632258 [+] INFO: Input file: /host/Season 1/Zatch Bell Episode 001 English Dubbed.flv
2021-01-12 17:20:28.632447 [+] INFO: Creating cache directory /tmp/video2x
2021-01-12 17:20:28.632740 [+] INFO: Extracted frames are being saved to: /tmp/video2x/tmpo8knto_3
2021-01-12 17:20:28.632928 [+] INFO: Upscaled frames are being saved to: /tmp/video2x/tmpjhk4s7xc
[+] INFO: Reading video information
2021-01-12 17:20:28.633063 [+] INFO: Executing: /usr/bin/ffprobe -v quiet -print_format json -show_format -show_streams -i '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv'
[+] INFO: Framerate: 29.97
2021-01-12 17:20:28.890427 [+] INFO: Executing: /usr/bin/ffmpeg -hwaccel auto -y -i '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv' -pix_fmt rgba64be /tmp/video2x/tmpo8knto_3/extracted_%0d.png
2021-01-12 17:20:28.892423 [+] INFO: Main process waiting for subprocesses to exit
ffmpeg version 4.1.4-1build2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.2.1-4ubuntu1)
  configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/host/Season 1/Zatch Bell Episode 001 English Dubbed.flv':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.19.104
  Duration: 00:21:01.21, start: 0.000000, bitrate: 503 kb/s
    Chapter #0:0: start 0.000000, end 30.333000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 30.333000, end 632.233000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 632.233000, end 1231.967000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1231.967000, end 1261.194000
    Metadata:
      title           : Chapter 4
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 400 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Data: bin_data (text / 0x74786574)
    Metadata:
      handler_name    : SubtitleHandler
[AVHWDeviceContext @ 0x5600cb0adf80] No VA display found for device: .
Device creation failed: -22.
[AVHWDeviceContext @ 0x5600cb0afcc0] Cannot open the X11 display .
Device creation failed: -1313558101.
[h264 @ 0x5600cb0b0f00] Auto hwaccel disabled: no device found.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 0x5600cb1cdec0] No accelerated colorspace conversion found from yuv420p to rgba64be.
Output #0, image2, to '/tmp/video2x/tmpo8knto_3/extracted_%0d.png':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
    Chapter #0:0: start 0.000000, end 30.333000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 30.333000, end 632.233000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 632.233000, end 1231.967000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1231.967000, end 1261.194000
    Metadata:
      title           : Chapter 4
    Stream #0:0(und): Video: png, rgba64be, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.35.100 png
frame=37798 fps= 17 q=-0.0 Lsize=N/A time=00:21:01.19 bitrate=N/A speed=0.572x    
video:36603255kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2021-01-12 17:57:13.361840 [+] INFO: Subprocess 9 exited with code 0
[+] INFO: Starting to upscale extracted frames
2021-01-12 17:57:13.739747 [+] INFO: [upscaler] Subprocess 1 executing: /video2x/src/dependencies/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan -g 0 -j 1:1:1 -n 2 -s 2 -t 400 -i /tmp/video2x/tmpo8knto_3 -o /tmp/video2x/tmpjhk4s7xc
2021-01-12 17:57:13.743675 [+] INFO: Starting progress monitor
2021-01-12 17:57:13.744218 [+] INFO: Starting upscaled image cleaner
2021-01-12 17:57:13.744510 [+] INFO: Main process waiting for subprocesses to exit
Upscaling Progress:   0%|          | 0/37798 [00:00<?, ?it/s]vkCreateInstance failed -9
invalid gpu device
[!] ERROR: Subprocess 23 exited with code 255
[!] ERROR: Subprocess execution ran into an error
[!] WARNING: Terminating all processes
2021-01-12 17:57:13.956345 [+] INFO: Killing progress monitor
Upscaling Progress:   0%|          | 0/37798 [00:01<?, ?it/s]
2021-01-12 17:57:14.896824 [+] INFO: Killing upscaled image cleaner
Cleaning up cache directory: /tmp/video2x/tmpo8knto_3
Cleaning up cache directory: /tmp/video2x/tmpjhk4s7xc
Cleaning up cache directory: /tmp/video2x
[!] ERROR: An exception has occurred
Traceback (most recent call last):
  File "/video2x/src/video2x.py", line 259, in <module>
    upscaler.run()
  File "/video2x/src/upscaler.py", line 667, in run
    raise e
  File "/video2x/src/upscaler.py", line 596, in run
    self._upscale_frames()
  File "/video2x/src/upscaler.py", line 339, in _upscale_frames
    raise e
  File "/video2x/src/upscaler.py", line 331, in _upscale_frames
    self._wait()
  File "/video2x/src/upscaler.py", line 401, in _wait
    raise e
  File "/video2x/src/upscaler.py", line 385, in _wait
    raise subprocess.CalledProcessError(process_status, process.args)
subprocess.CalledProcessError: Command '['/video2x/src/dependencies/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan', '-g', '0', '-j', '1:1:1', '-n', '2', '-s', '2', '-t', '400', '-i', '/tmp/video2x/tmpo8knto_3', '-o', '/tmp/video2x/tmpjhk4s7xc']' returned non-zero exit status 255.
./upscale.sh: line 18: -i: command not found

This seems like a very odd error, but I cannot imagine its anything other than broken code in their docker image. I will let you decide if this is a related bug though!

akai-katto commented 3 years ago

Sure, by the way, if you're on arch, you can build waifu2x-ncnn-vulkan from the aur packages (https://aur.archlinux.org/packages/waifu2x-ncnn-vulkan-git/). I've never had issues using this package (it was a year ago). Dandere2x can run with the aur package variant if you specify it.

andykais commented 3 years ago

I actually have https://aur.archlinux.org/packages/waifu2x-ncnn-vulkan/ installed from the aur

 andrew  ~  yay -Qs waifu2x-ncnn-vulkan 
local/waifu2x-ncnn-vulkan 20210102-1
    waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan

but because an aur package for dandere2x is non existent, I resorted to the docker image. I will try building dandere2x from source

akai-katto commented 3 years ago

I actually have https://aur.archlinux.org/packages/waifu2x-ncnn-vulkan/ installed from the aur

 andrew  ~  yay -Qs waifu2x-ncnn-vulkan 
local/waifu2x-ncnn-vulkan 20210102-1
    waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan

but because an aur package for dandere2x is non existent, I resorted to the docker image. I will try building dandere2x from source

If you follow the docker-image, I think it's self documenting of how to get dandere2x working on a unix-like system. Let me know if you run into issues

andykais commented 3 years ago

seems to be working when I run without the docker image!

split_video2.mkv 2021-01-13 15:44:03,369 INFO     status_thread.py run     : [File: split_video2.mkv][Frame: [1780] 14%]    Average of Last 10 Frames: 5.11 sec / frame
split_video0.mkv 2021-01-13 15:44:15,256 INFO     status_thread.py run     : [File: split_video0.mkv][Frame: [1000] 7%]    Average of Last 10 Frames: 9.59 sec / frame
split_video1.mkv 2021-01-13 15:45:11,350 INFO     status_thread.py run     : [File: split_video1.mkv][Frame: [1860] 14%]    Average of Last 10 Frames: 13.28 sec / frame
split_video0.mkv 2021-01-13 15:45:30,994 INFO     status_thread.py run     : [File: split_video0.mkv][Frame: [1010] 8%]    Average of Last 10 Frames: 7.57 sec / frame

Am I to assume that the varying percentages (14%,7%,14%,8%) are varying snippets from the video being upscaled in parallel?

I will let you decide whether you want to close this issue or not. It may be that the docker image is broken, or it may be that it just did not support --gpus all being dropped from the docker command.

akai-katto commented 3 years ago

If it's working I'll close the thread up since my docker-graphics card knowledge is very very limited, and probably outside of the realm of debugging. I'm happy to see it works though on your system - dandere2x is more linux friendly than windows imho.

Anyways, "Am I to assume that the varying percentages (14%,7%,14%,8%) are varying snippets from the video being upscaled in parallel?", the answer is yes, this is the case. It worries me that I haven't written up documentation for this anywhere.

Thanks for helping me debug dandere2x! This knowledge was fairly useful / informative.

andykais commented 3 years ago

of course! Thanks for the support. I appreciate a guide when muddling through a new piece of software