deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
52.18k stars 13.2k forks source link

Crash report on linux gui when convert #1225

Closed gravitydeep closed 2 years ago

gravitydeep commented 2 years ago

Expected behavior

5/28/2022 22:42:00 INFO     Using configuration saved in state file
05/28/2022 22:42:01 INFO     Loaded model from disk: '/home/cedric/LAB/faceswap/workspace/modelAB/original.h5'
05/28/2022 22:42:01 INFO     Loading Mask from Box_Blend plugin...
05/28/2022 22:42:01 INFO     Loading Mask from Mask_Blend plugin...
05/28/2022 22:42:01 INFO     Loading Color from Match_Hist plugin...
05/28/2022 22:42:01 INFO     Loading Scaling from Sharpen plugin...
05/28/2022 22:42:03 WARNING  IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=8, resizing from (1298, 726) to (1304, 728) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).

Stream map '1:a:0' matches no streams.
To ignore this, add a trailing '?' to the map.
ls: impossible d'accéder à '/home/cedric/anaconda3/envs/faceswap/lib/python3.9/site-packages/cv2/../../lib64': Aucun fichier ou dossier de ce type
05/28/2022 22:42:07 ERROR    Got Exception on main handler:
Traceback (most recent call last):
  File "/home/cedric/anaconda3/envs/faceswap/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 615, in write_frames
    p.stdin.write(bb)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cedric/LAB/faceswap/lib/cli/launcher.py", line 182, in execute_script
    process.process()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 171, in process
    self._convert_images()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 198, in _convert_images
    self._check_thread_error()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 218, in _check_thread_error
    thread.check_and_raise_error()
  File "/home/cedric/LAB/faceswap/lib/multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "/home/cedric/LAB/faceswap/lib/multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 642, in _save
    self._writer.write(filename, image)
  File "/home/cedric/LAB/faceswap/plugins/convert/writer/ffmpeg.py", line 202, in write
    self._save_from_cache()
  File "/home/cedric/LAB/faceswap/plugins/convert/writer/ffmpeg.py", line 229, in _save_from_cache
    self._writer.send(np.ascontiguousarray(save_image[:, :, ::-1]))
  File "/home/cedric/anaconda3/envs/faceswap/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 622, in write_frames
    raise IOError(msg)
OSError: [Errno 32] Broken pipe

FFMPEG COMMAND:
/home/cedric/anaconda3/envs/faceswap/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s 1298x726 -pix_fmt rgb24 -r 15.00 -i - -i /home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4 -vcodec libx264 -pix_fmt yuv420p -vf scale=1304:728 -v error -vf scale=1304:728 -crf 23 -preset medium -acodec copy -map 0:v:0 -map 1:a:0 /home/cedric/LAB/faceswap/workspace/result/Capture vidéo 2022-05-28 16:34:19_converted.mp4

FFMPEG STDERR OUTPUT:

05/28/2022 22:42:07 CRITICAL An unexpected crash has occurred. Crash report written to '/home/cedric/LAB/faceswap/crash_report.2022.05.28.224204830523.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting
Process exited.

Desktop

Crash Report

05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Adding defaults: (filename: pillow_defaults.py, module_path: plugins.convert.writer, plugin_type: writer
05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Importing defaults module: plugins.convert.writer.pillow_defaults
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_section                    DEBUG    Add section: (title: 'writer.pillow', info: 'Options for outputting converted frames to a series of images using Pillow\nPillow is more feature rich than OpenCV but can be slower.')
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'format', datatype: '<class 'str'>', default: 'png', info: 'Image format to use:\n    bmp: Windows bitmap\n   gif: Graphics Interchange Format (NB: Not animated)\n   jpg: JPEG format\n  jp2: JPEG 2000 format\n     png: Portable Network Graphics\n    ppm: Portable Pixmap Format\n   tif: Tag Image File Format', rounding: 'None', min_max: None, choices: ['bmp', 'gif', 'jpg', 'jp2', 'png', 'ppm', 'tif'], gui_radio: True, fixed: True, group: format)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'draw_transparent', datatype: '<class 'bool'>', default: 'False', info: 'Place the swapped face on a transparent layer rather than the original frame.\nNB: This is only compatible with images saved in png or tif format. If an incompatible format is selected then the image will be saved as a png.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: format)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'optimize', datatype: '<class 'bool'>', default: 'False', info: '[gif, jpg and png only] If enabled, indicates that the encoder should make an extra pass over the image in order to select optimal encoder settings.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'gif_interlace', datatype: '<class 'bool'>', default: 'True', info: '[gif only] Set whether to save the gif as interlaced or not.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'jpg_quality', datatype: '<class 'int'>', default: '75', info: '[jpg only] Set the jpg quality. 1 is worst 95 is best. Higher quality leads to larger file sizes.', rounding: '1', min_max: (1, 95), choices: [], gui_radio: False, fixed: True, group: compression)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'png_compress_level', datatype: '<class 'int'>', default: '3', info: '[png only] ZLIB compression level, 1 gives best speed, 9 gives best compression, 0 gives no compression at all. When optimize option is set to True this has no effect (it is set to 9 regardless of a value passed).', rounding: '1', min_max: (0, 9), choices: [], gui_radio: False, fixed: True, group: compression)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.pillow', title: 'tif_compression', datatype: '<class 'str'>', default: 'tiff_deflate', info: '[tif only] The desired compression method for the file.', rounding: 'None', min_max: None, choices: ['none', 'tiff_ccitt', 'group3', 'group4', 'tiff_jpeg', 'tiff_adobe_deflate', 'tiff_thunderscan', 'tiff_deflate', 'tiff_sgilog', 'tiff_sgilog24', 'tiff_raw_16'], gui_radio: False, fixed: True, group: compression)
05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Added defaults: writer.pillow
05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Adding defaults: (filename: gif_defaults.py, module_path: plugins.convert.writer, plugin_type: writer
05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Importing defaults module: plugins.convert.writer.gif_defaults
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_section                    DEBUG    Add section: (title: 'writer.gif', info: 'Options for outputting converted frames to an animated gif.')
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.gif', title: 'fps', datatype: '<class 'int'>', default: '25', info: 'Frames per Second.', rounding: '1', min_max: (1, 60), choices: [], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.gif', title: 'loop', datatype: '<class 'int'>', default: '0', info: 'The number of iterations. Set to 0 to loop indefinitely.', rounding: '1', min_max: (0, 100), choices: [], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.gif', title: 'palettesize', datatype: '<class 'str'>', default: '256', info: 'The number of colors to quantize the image to. Is rounded to the nearest power of two.', rounding: 'None', min_max: None, choices: ['2', '4', '8', '16', '32', '64', '128', '256'], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          add_item                       DEBUG    Add item: (section: 'writer.gif', title: 'subrectangles', datatype: '<class 'bool'>', default: 'False', info: 'If True, will try and optimize the GIF by storing only the rectangular parts of each frame that change with respect to the previous.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
05/28/2022 22:42:01 MainProcess     MainThread                     config          _load_defaults_from_module     DEBUG    Added defaults: writer.gif
05/28/2022 22:42:01 MainProcess     MainThread                     config          handle_config                  DEBUG    Handling config: (section: scaling.sharpen, configfile: '/home/cedric/LAB/faceswap/config/convert.ini')
05/28/2022 22:42:01 MainProcess     MainThread                     config          check_exists                   DEBUG    Config file exists: '/home/cedric/LAB/faceswap/config/convert.ini'
05/28/2022 22:42:01 MainProcess     MainThread                     config          load_config                    VERBOSE  Loading config: '/home/cedric/LAB/faceswap/config/convert.ini'
05/28/2022 22:42:01 MainProcess     MainThread                     config          validate_config                DEBUG    Validating config
05/28/2022 22:42:01 MainProcess     MainThread                     config          check_config_change            DEBUG    Default config has not changed
05/28/2022 22:42:01 MainProcess     MainThread                     config          check_config_choices           DEBUG    Checking config choices
05/28/2022 22:42:01 MainProcess     MainThread                     config          check_config_choices           DEBUG    Checked config choices
05/28/2022 22:42:01 MainProcess     MainThread                     config          validate_config                DEBUG    Validated config
05/28/2022 22:42:01 MainProcess     MainThread                     config          handle_config                  DEBUG    Handled config
05/28/2022 22:42:01 MainProcess     MainThread                     config          __init__                       DEBUG    Initialized: Config
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Getting config item: (section: 'scaling.sharpen', option: 'method')
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Returning item: (type: <class 'str'>, value: None)
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Getting config item: (section: 'scaling.sharpen', option: 'amount')
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Returning item: (type: <class 'int'>, value: 150)
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Getting config item: (section: 'scaling.sharpen', option: 'radius')
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Returning item: (type: <class 'float'>, value: 0.3)
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Getting config item: (section: 'scaling.sharpen', option: 'threshold')
05/28/2022 22:42:01 MainProcess     MainThread                     config          get                            DEBUG    Returning item: (type: <class 'float'>, value: 5.0)
05/28/2022 22:42:01 MainProcess     MainThread                     _base           set_config                     DEBUG    Config: {'method': None, 'amount': 150, 'radius': 0.3, 'threshold': 5.0}
05/28/2022 22:42:01 MainProcess     MainThread                     _base           __init__                       DEBUG    config: {'method': None, 'amount': 150, 'radius': 0.3, 'threshold': 5.0}
05/28/2022 22:42:01 MainProcess     MainThread                     _base           __init__                       DEBUG    Initialized Scaling
05/28/2022 22:42:01 MainProcess     MainThread                     convert         _load_plugins                  DEBUG    Loaded plugins: {'box': <plugins.convert.mask.box_blend.Mask object at 0x7fbbdb2705e0>, 'mask': <plugins.convert.mask.mask_blend.Mask object at 0x7fbbdb270d90>, 'color': <plugins.convert.color.match_hist.Color object at 0x7fbbdb270f10>, 'seamless': None, 'sharpening': None}
05/28/2022 22:42:01 MainProcess     MainThread                     convert         __init__                       DEBUG    Initialized Converter
05/28/2022 22:42:01 MainProcess     MainThread                     convert         __init__                       DEBUG    Initialized Convert
05/28/2022 22:42:01 MainProcess     MainThread                     convert         process                        DEBUG    Starting Conversion
05/28/2022 22:42:01 MainProcess     MainThread                     convert         _convert_images                DEBUG    Converting images
05/28/2022 22:42:01 MainProcess     MainThread                     queue_manager   get_queue                      DEBUG    QueueManager getting: 'convert_out'
05/28/2022 22:42:01 MainProcess     MainThread                     queue_manager   get_queue                      DEBUG    QueueManager got: 'convert_out'
05/28/2022 22:42:01 MainProcess     MainThread                     queue_manager   get_queue                      DEBUG    QueueManager getting: 'patch'
05/28/2022 22:42:01 MainProcess     MainThread                     queue_manager   get_queue                      DEBUG    QueueManager got: 'patch'
05/28/2022 22:42:01 MainProcess     MainThread                     convert         _pool_processes                DEBUG    16
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  __init__                       DEBUG    Initializing MultiThread: (target: 'patch', thread_count: 16)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  __init__                       DEBUG    Initialized MultiThread: 'patch'
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread(s): 'patch'
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 1 of 16: 'patch_0'
05/28/2022 22:42:01 MainProcess     patch_0                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 2 of 16: 'patch_1'
05/28/2022 22:42:01 MainProcess     patch_1                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 3 of 16: 'patch_2'
05/28/2022 22:42:01 MainProcess     patch_2                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 4 of 16: 'patch_3'
05/28/2022 22:42:01 MainProcess     patch_3                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 5 of 16: 'patch_4'
05/28/2022 22:42:01 MainProcess     patch_4                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 6 of 16: 'patch_5'
05/28/2022 22:42:01 MainProcess     patch_5                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 7 of 16: 'patch_6'
05/28/2022 22:42:01 MainProcess     patch_6                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 8 of 16: 'patch_7'
05/28/2022 22:42:01 MainProcess     patch_7                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 9 of 16: 'patch_8'
05/28/2022 22:42:01 MainProcess     patch_8                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 10 of 16: 'patch_9'
05/28/2022 22:42:01 MainProcess     patch_9                        convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 11 of 16: 'patch_10'
05/28/2022 22:42:01 MainProcess     patch_10                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 12 of 16: 'patch_11'
05/28/2022 22:42:01 MainProcess     patch_11                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 13 of 16: 'patch_12'
05/28/2022 22:42:01 MainProcess     patch_12                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 14 of 16: 'patch_13'
05/28/2022 22:42:01 MainProcess     patch_13                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 15 of 16: 'patch_14'
05/28/2022 22:42:01 MainProcess     patch_14                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Starting thread 16 of 16: 'patch_15'
05/28/2022 22:42:01 MainProcess     patch_15                       convert         process                        DEBUG    Starting convert process. (in_queue: <queue.Queue object at 0x7fbbdcab9700>, out_queue: <queue.Queue object at 0x7fbbdcab9640>)
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  start                          DEBUG    Started all threads 'patch': 16
05/28/2022 22:42:01 MainProcess     MainThread                     multithreading  completed                      DEBUG    False
05/28/2022 22:42:02 MainProcess     MainThread                     multithreading  completed                      DEBUG    False
05/28/2022 22:42:03 MainProcess     _save_0                        convert         _save                          DEBUG    Writing GUI Preview image: '/home/cedric/LAB/faceswap/workspace/result/.gui_preview.jpg'
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _set_dimensions                DEBUG    input dimensions: (726, 1298)
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _set_dimensions                DEBUG    Set dimensions: 1304:728
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _audio_codec                   DEBUG    Audio codec: copy
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _get_writer                    DEBUG    writer config: {'container': 'mp4', 'codec': 'libx264', 'crf': 23, 'preset': 'medium', 'tune': None, 'profile': 'auto', 'level': 'auto', 'skip_mux': False}, audio_path: '/home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4'
05/28/2022 22:42:03 MainProcess     MainThread                     multithreading  completed                      DEBUG    False
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _video_fps                     DEBUG    15.0
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _output_params                 DEBUG    ['-vf', 'scale=1304:728', '-crf', '23', '-preset', 'medium']
05/28/2022 22:42:03 MainProcess     _save_0                        ffmpeg          _get_writer                    DEBUG    FFMPEG Writer created: <generator object write_frames at 0x7fbbdb341350>
05/28/2022 22:42:03 MainProcess     _save_0                        _io             write_frames                   WARNING  IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=8, resizing from (1298, 726) to (1304, 728) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
05/28/2022 22:42:04 MainProcess     _save_0                        multithreading  run                            DEBUG    Error in thread (_save_0): [Errno 32] Broken pipe\n\nFFMPEG COMMAND:\n/home/cedric/anaconda3/envs/faceswap/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s 1298x726 -pix_fmt rgb24 -r 15.00 -i - -i /home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4 -vcodec libx264 -pix_fmt yuv420p -vf scale=1304:728 -v error -vf scale=1304:728 -crf 23 -preset medium -acodec copy -map 0:v:0 -map 1:a:0 /home/cedric/LAB/faceswap/workspace/result/Capture vidéo 2022-05-28 16:34:19_converted.mp4\n\nFFMPEG STDERR OUTPUT:\n
05/28/2022 22:42:04 MainProcess     MainThread                     multithreading  check_and_raise_error          DEBUG    Thread error caught: [(<class 'OSError'>, OSError('[Errno 32] Broken pipe\n\nFFMPEG COMMAND:\n/home/cedric/anaconda3/envs/faceswap/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s 1298x726 -pix_fmt rgb24 -r 15.00 -i - -i /home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4 -vcodec libx264 -pix_fmt yuv420p -vf scale=1304:728 -v error -vf scale=1304:728 -crf 23 -preset medium -acodec copy -map 0:v:0 -map 1:a:0 /home/cedric/LAB/faceswap/workspace/result/Capture vidéo 2022-05-28 16:34:19_converted.mp4\n\nFFMPEG STDERR OUTPUT:\n'), <traceback object at 0x7fbbdc3d92c0>)]
Traceback (most recent call last):
  File "/home/cedric/anaconda3/envs/faceswap/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 615, in write_frames
    p.stdin.write(bb)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cedric/LAB/faceswap/lib/cli/launcher.py", line 182, in execute_script
    process.process()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 171, in process
    self._convert_images()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 198, in _convert_images
    self._check_thread_error()
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 218, in _check_thread_error
    thread.check_and_raise_error()
  File "/home/cedric/LAB/faceswap/lib/multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "/home/cedric/LAB/faceswap/lib/multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedric/LAB/faceswap/scripts/convert.py", line 642, in _save
    self._writer.write(filename, image)
  File "/home/cedric/LAB/faceswap/plugins/convert/writer/ffmpeg.py", line 202, in write
    self._save_from_cache()
  File "/home/cedric/LAB/faceswap/plugins/convert/writer/ffmpeg.py", line 229, in _save_from_cache
    self._writer.send(np.ascontiguousarray(save_image[:, :, ::-1]))
  File "/home/cedric/anaconda3/envs/faceswap/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 622, in write_frames
    raise IOError(msg)
OSError: [Errno 32] Broken pipe

FFMPEG COMMAND:
/home/cedric/anaconda3/envs/faceswap/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s 1298x726 -pix_fmt rgb24 -r 15.00 -i - -i /home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4 -vcodec libx264 -pix_fmt yuv420p -vf scale=1304:728 -v error -vf scale=1304:728 -crf 23 -preset medium -acodec copy -map 0:v:0 -map 1:a:0 /home/cedric/LAB/faceswap/workspace/result/Capture vidéo 2022-05-28 16:34:19_converted.mp4

FFMPEG STDERR OUTPUT:

============ System Information ============
encoding:            UTF-8
git_branch:          Sur la branche master
git_commits:         a2b8e32 bugfix: distibuted training with dssim
gpu_cuda:            11.
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: NVIDIA GeForce RTX 3060 Laptop GPU
gpu_devices_active:  GPU_0
gpu_driver:          510.73.05
gpu_vram:            GPU_0: 6144MB
os_machine:          x86_64
os_platform:         Linux-5.15.0-33-generic-x86_64-with-glibc2.35
os_release:          5.15.0-33-generic
py_command:          /home/cedric/LAB/faceswap/faceswap.py convert -i /home/cedric/LAB/faceswap/workspace/Capture vidéo 2022-05-28 16:34:19.mp4 -o /home/cedric/LAB/faceswap/workspace/result -m /home/cedric/LAB/faceswap/workspace/modelAB -c match-hist -M extended -w ffmpeg -osc 100 -l 0.4 -j 0 -L INFO -gui
py_conda_version:    conda 4.13.0
py_implementation:   CPython
py_version:          3.9.12
py_virtual_env:      True
sys_cores:           16
sys_processor:       x86_64
sys_ram:             Total: 15762MB, Available: 9058MB, Used: 5903MB, Free: 2817MB

=============== Pip Packages ===============
absl-py==1.0.0
astunparse==1.6.3
cachetools==5.1.0
certifi==2022.5.18.1
charset-normalizer==2.0.12
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
fastcluster @ file:///home/conda/feedstock_root/build_artifacts/fastcluster_1649783242764/work
ffmpy==0.2.3
flatbuffers==2.0
fonttools==4.25.0
gast==0.5.3
google-auth==2.6.6
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.46.3
h5py==3.7.0
idna==3.3
imageio @ file:///tmp/build/80754af9/imageio_1617700267927/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1649960641006/work
importlib-metadata==4.11.4
joblib @ file:///tmp/build/80754af9/joblib_1635411271373/work
keras==2.8.0
Keras-Preprocessing==1.1.2
kiwisolver @ file:///opt/conda/conda-bld/kiwisolver_1653292039266/work
libclang==14.0.1
Markdown==3.3.7
matplotlib @ file:///tmp/build/80754af9/matplotlib-suite_1647441664166/work
mkl-fft==1.3.1
mkl-random @ file:///tmp/build/80754af9/mkl_random_1626186066731/work
mkl-service==2.4.0
munkres==1.1.4
numpy @ file:///opt/conda/conda-bld/numpy_and_numpy_base_1652801679809/work
nvidia-ml-py==11.510.69
oauthlib==3.2.0
opencv-python==4.5.5.64
opt-einsum==3.3.0
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
Pillow==9.0.1
protobuf==3.19.4
psutil @ file:///tmp/build/80754af9/psutil_1612297992929/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.8
scikit-learn @ file:///tmp/build/80754af9/scikit-learn_1642617106979/work
scipy @ file:///tmp/build/80754af9/scipy_1641555004408/work
sip==4.19.13
six @ file:///tmp/build/80754af9/six_1644875935023/work
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow-estimator==2.8.0
tensorflow-gpu==2.8.2
tensorflow-io-gcs-filesystem==0.26.0
termcolor==1.1.0
threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work
tornado @ file:///tmp/build/80754af9/tornado_1606942317143/work
tqdm @ file:///opt/conda/conda-bld/tqdm_1650891076910/work
typing_extensions==4.2.0
urllib3==1.26.9
Werkzeug==2.1.2
wrapt==1.14.1
zipp==3.8.0

============== Conda Packages ==============
# packages in environment at /home/cedric/anaconda3/envs/faceswap:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
absl-py                   1.0.0                    pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
blas                      1.0                         mkl  
brotli                    1.0.9                he6710b0_2  
bzip2                     1.0.8                h7b6447c_0  
c-ares                    1.18.1               h7f8727e_0  
ca-certificates           2022.5.18.1          ha878542_0    conda-forge
cachetools                5.1.0                    pypi_0    pypi
certifi                   2022.5.18.1      py39hf3d152e_0    conda-forge
charset-normalizer        2.0.12                   pypi_0    pypi
cudatoolkit               11.2.2              hbe64b41_10    conda-forge
cudnn                     8.1.0.77             h90431f1_0    conda-forge
curl                      7.82.0               h7f8727e_0  
cycler                    0.11.0             pyhd3eb1b0_0  
dbus                      1.13.18              hb2f20db_0  
expat                     2.4.4                h295c915_0  
fastcluster               1.2.6            py39h1832856_1    conda-forge
ffmpeg                    4.3.2                hca11adc_0    conda-forge
ffmpy                     0.2.3                    pypi_0    pypi
flatbuffers               2.0                      pypi_0    pypi
fontconfig                2.13.1               h6c09931_0  
fonttools                 4.25.0             pyhd3eb1b0_0  
freetype                  2.11.0               h70c0345_0  
gast                      0.5.3                    pypi_0    pypi
gettext                   0.21.0               hf68c758_0  
giflib                    5.2.1                h7b6447c_0  
git                       2.34.1          pl5262hc120c5b_0  
glib                      2.69.1               h4ff587b_1  
gmp                       6.2.1                h58526e2_0    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
google-auth               2.6.6                    pypi_0    pypi
google-auth-oauthlib      0.4.6                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
grpcio                    1.46.3                   pypi_0    pypi
gst-plugins-base          1.14.0               h8213a91_2  
gstreamer                 1.14.0               h28cd5cc_2  
h5py                      3.7.0                    pypi_0    pypi
icu                       58.2                 he6710b0_3  
idna                      3.3                      pypi_0    pypi
imageio                   2.9.0              pyhd3eb1b0_0  
imageio-ffmpeg            0.4.7              pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.4                   pypi_0    pypi
intel-openmp              2021.4.0          h06a4308_3561  
joblib                    1.1.0              pyhd3eb1b0_0  
jpeg                      9e                   h7f8727e_0  
keras                     2.8.0                    pypi_0    pypi
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.4.2            py39h295c915_0  
krb5                      1.19.2               hac12032_0  
lame                      3.100             h7f98852_1001    conda-forge
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.38                 h1181459_1  
libclang                  14.0.1                   pypi_0    pypi
libcurl                   7.82.0               h0b77cf5_0  
libedit                   3.1.20210910         h7f8727e_0  
libev                     4.33                 h7f8727e_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 11.2.0               h1234567_0  
libgfortran-ng            7.5.0               ha8ba4b0_17  
libgfortran4              7.5.0               ha8ba4b0_17  
libgomp                   11.2.0               h1234567_0  
libnghttp2                1.46.0               hce63b2e_0  
libpng                    1.6.37               hbc83047_0  
libssh2                   1.10.0               h8f2d780_0  
libstdcxx-ng              11.2.0               h1234567_0  
libtiff                   4.2.0                h2818925_1  
libuuid                   1.0.3                h7f8727e_2  
libwebp                   1.2.2                h55f646e_0  
libwebp-base              1.2.2                h7f8727e_0  
libxcb                    1.15                 h7f8727e_0  
libxml2                   2.9.14               h74e7548_0  
lz4-c                     1.9.3                h295c915_1  
markdown                  3.3.7                    pypi_0    pypi
matplotlib                3.5.1            py39h06a4308_1  
matplotlib-base           3.5.1            py39ha18d171_1  
mkl                       2021.4.0           h06a4308_640  
mkl-service               2.4.0            py39h7f8727e_0  
mkl_fft                   1.3.1            py39hd3c417c_0  
mkl_random                1.2.2            py39h51133e4_0  
munkres                   1.1.4                      py_0  
ncurses                   6.3                  h7f8727e_2  
nettle                    3.6                  he412f7d_0    conda-forge
numpy                     1.22.3           py39he7a7128_0  
numpy-base                1.22.3           py39hf524024_0  
nvidia-ml-py              11.510.69                pypi_0    pypi
oauthlib                  3.2.0                    pypi_0    pypi
opencv-python             4.5.5.64                 pypi_0    pypi
openh264                  2.1.1                h780b84a_0    conda-forge
openssl                   1.1.1o               h166bdaf_0    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
packaging                 21.3               pyhd3eb1b0_0  
pcre                      8.45                 h295c915_0  
pcre2                     10.37                he7ceb23_1  
perl                      5.26.2               h14c3975_0  
pillow                    9.0.1            py39h22f2fdc_0  
pip                       21.2.4           py39h06a4308_0  
protobuf                  3.19.4                   pypi_0    pypi
psutil                    5.8.0            py39h27cfd23_1  
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pyparsing                 3.0.4              pyhd3eb1b0_0  
pyqt                      5.9.2            py39h2531618_6  
python                    3.9.12               h12debd9_0  
python-dateutil           2.8.2              pyhd3eb1b0_0  
python_abi                3.9                      2_cp39    conda-forge
qt                        5.9.7                h5867ecd_1  
readline                  8.1.2                h7f8727e_1  
requests                  2.27.1                   pypi_0    pypi
requests-oauthlib         1.3.1                    pypi_0    pypi
rsa                       4.8                      pypi_0    pypi
scikit-learn              1.0.2            py39h51133e4_1  
scipy                     1.7.3            py39hc147768_0  
setuptools                61.2.0           py39h06a4308_0  
sip                       4.19.13          py39h295c915_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.38.3               hc218d9a_0  
tensorboard               2.8.0                    pypi_0    pypi
tensorboard-data-server   0.6.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
tensorflow-estimator      2.8.0                    pypi_0    pypi
tensorflow-gpu            2.8.2                    pypi_0    pypi
tensorflow-io-gcs-filesystem 0.26.0                   pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
threadpoolctl             2.2.0              pyh0d69192_0  
tk                        8.6.11               h1ccaba5_1  
tornado                   6.1              py39h27cfd23_0  
tqdm                      4.64.0           py39h06a4308_0  
typing-extensions         4.2.0                    pypi_0    pypi
tzdata                    2022a                hda174b7_0  
urllib3                   1.26.9                   pypi_0    pypi
werkzeug                  2.1.2                    pypi_0    pypi
wheel                     0.37.1             pyhd3eb1b0_0  
wrapt                     1.14.1                   pypi_0    pypi
x264                      1!161.3030           h7f98852_1    conda-forge
xz                        5.2.5                h7f8727e_1  
zipp                      3.8.0                    pypi_0    pypi
zlib                      1.2.12               h7f8727e_2  
zstd                      1.5.2                ha4553b6_0  

================= Configs ==================
--------- train.ini ---------

[global]
centering:                face
coverage:                 87.5
icnr_init:                False
conv_aware_init:          False
optimizer:                adam
learning_rate:            5e-05
epsilon_exponent:         -7
reflect_padding:          False
allow_growth:             False
mixed_precision:          False
nan_protection:           True
convert_batchsize:        16

[global.loss]
loss_function:            ssim
mask_loss_function:       mse
l2_reg_term:              100
eye_multiplier:           3
mouth_multiplier:         2
penalized_mask_loss:      True
mask_type:                extended
mask_blur_kernel:         3
mask_threshold:           4
learn_mask:               False

[trainer.original]
preview_images:           14
zoom_amount:              5
rotation_range:           10
shift_range:              5
flip_chance:              50
color_lightness:          30
color_ab:                 8
color_clahe_chance:       50
color_clahe_max_size:     4

[model.phaze_a]
output_size:              128
shared_fc:                none
enable_gblock:            True
split_fc:                 True
split_gblock:             False
split_decoders:           False
enc_architecture:         fs_original
enc_scaling:              40
enc_load_weights:         True
bottleneck_type:          dense
bottleneck_norm:          none
bottleneck_size:          1024
bottleneck_in_encoder:    True
fc_depth:                 1
fc_min_filters:           1024
fc_max_filters:           1024
fc_dimensions:            4
fc_filter_slope:          -0.5
fc_dropout:               0.0
fc_upsampler:             upsample2d
fc_upsamples:             1
fc_upsample_filters:      512
fc_gblock_depth:          3
fc_gblock_min_nodes:      512
fc_gblock_max_nodes:      512
fc_gblock_filter_slope:   -0.5
fc_gblock_dropout:        0.0
dec_upscale_method:       subpixel
dec_norm:                 none
dec_min_filters:          64
dec_max_filters:          512
dec_filter_slope:         -0.45
dec_res_blocks:           1
dec_output_kernel:        5
dec_gaussian:             True
dec_skip_last_residual:   True
freeze_layers:            keras_encoder
load_layers:              encoder
fs_original_depth:        4
fs_original_min_filters:  128
fs_original_max_filters:  1024
mobilenet_width:          1.0
mobilenet_depth:          1
mobilenet_dropout:        0.001
mobilenet_minimalistic:   False

[model.original]
lowmem:                   False

[model.dfl_h128]
lowmem:                   False

[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512

[model.dfaker]
output_size:              128

[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False

[model.villain]
lowmem:                   False

[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512

[model.dlight]
features:                 best
details:                  good
output_size:              256

--------- extract.ini ---------

[global]
allow_growth:             False

[mask.vgg_clear]
batch-size:               6

[mask.unet_dfl]
batch-size:               8

[mask.bisenet_fp]
batch-size:               8
weights:                  faceswap
include_ears:             False
include_hair:             False
include_glasses:          True

[mask.vgg_obstructed]
batch-size:               2

[align.fan]
batch-size:               12

[detect.s3fd]
confidence:               70
batch-size:               4

[detect.mtcnn]
minsize:                  20
scalefactor:              0.709
batch-size:               8
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7

[detect.cv2_dnn]
confidence:               50

--------- convert.ini ---------

[mask.mask_blend]
type:                     normalized
kernel_size:              3
passes:                   4
threshold:                4
erosion:                  0.0

[mask.box_blend]
type:                     gaussian
distance:                 11.0
radius:                   5.0
passes:                   1

[color.color_transfer]
clip:                     True
preserve_paper:           True

[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0

[color.match_hist]
threshold:                99.0

[scaling.sharpen]
method:                   none
amount:                   150
radius:                   0.3
threshold:                5.0

[writer.opencv]
format:                   png
draw_transparent:         False
jpg_quality:              75
png_compress_level:       3

[writer.ffmpeg]
container:                mp4
codec:                    libx264
crf:                      23
preset:                   medium
tune:                     none
profile:                  auto
level:                    auto
skip_mux:                 False

[writer.pillow]
format:                   png
draw_transparent:         False
optimize:                 False
gif_interlace:            True
jpg_quality:              75
png_compress_level:       3
tif_compression:          tiff_deflate

[writer.gif]
fps:                      25
loop:                     0
palettesize:              256
subrectangles:            False

--------- gui.ini ---------

[global]
fullscreen:               False
tab:                      extract
options_panel_width:      30
console_panel_height:     20
icon_size:                14
font:                     default
font_size:                9
autosave_last_session:    prompt
timeout:                  120
auto_load_model_stats:    True

--------- .faceswap ---------
backend:                  nvidia
torzdf commented 2 years ago

Would I be correct in assuming that the input video Capture vidéo 2022-05-28 16:34:19.mp4 has no audio stream?

gravitydeep commented 2 years ago

yes i m sure

torzdf commented 2 years ago

Ok, I will flag this as a bug as I need to find a way to check for the audio stream. In the meantime you can work around the issue by muxing a dummy audio stream onto your video, if that is reasonable.

gravitydeep commented 2 years ago

yes you are right there is no sound and how to bypass can you explain? sorry i m french ;)

ghost commented 2 years ago

I noticed this the other day. Easiest thing for me was just disable the setting for converting audio in the config file. convert settings -> writer -> ffmpeg -> check "Skip Mux"

gravitydeep commented 2 years ago

can you detail the modification I am a beginner ok and then I can start the conversion again?

torzdf commented 2 years ago

I noticed this the other day. Easiest thing for me was just disable the setting for converting audio in the config file.

I write the software and I totally forgot this was a thing :joy:

image

gravitydeep commented 2 years ago

ok thank you i tried

gravitydeep commented 2 years ago

i m one warning but i worked 05/28/2022 23:24:01 WARNING IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=8, resizing from (1298, 726) to (1304, 728) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).

gravitydeep commented 2 years ago

no face swap applied i used the default options for my first try but it didn't work with almost 100000 iterations

torzdf commented 2 years ago

This isn't the place for tech support. For that please visit our forums (https://forum.faceswap.dev/) or our discord (https://discord.gg/FC54sYg)

However, the most likely reason is this: https://forum.faceswap.dev/app.php/faqpage?sid=26c90023ef759be6f7a2e739aa02e9cc#f4r0

torzdf commented 2 years ago

Re-opening as I need to fix the audio crashing bug.

Please do not add to this issue, as I know what the problem is.

gravitydeep commented 2 years ago

ok

torzdf commented 2 years ago

bug fixed in 5a8b5d7b3c6b0b413fe2b4d9247b9dd0cd692fa0

gravitydeep commented 2 years ago

hello now that the bug is solved i have to re-download the linux installer and reinstall it ?