nadermx / backgroundremover

Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.
https://www.backgroundremoverai.com
MIT License
6.43k stars 534 forks source link

Video Background remover dosen't work in docker #120

Open MrTartuf0 opened 6 months ago

MrTartuf0 commented 6 months ago

I tried running this command with docker setup, on images the tool works fine, but on videos it doesn't

backgroundremover -i "input.mp4" -tv -o "output.mov"

Here are the error logs

Process SyncManager-1:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.11/multiprocessing/managers.py", line 592, in _run_server
    server = cls._Server(registry, address, authkey, serializer)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/managers.py", line 156, in __init__
    self.listener = Listener(address=address, backlog=16)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/connection.py", line 464, in __init__
    self._listener = SocketListener(address, family, backlog)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/connection.py", line 607, in __init__
    self._socket.bind(address)
OSError: [Errno 95] Operation not supported
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/tmp/backgroundremover/cmd/cli.py", line 252, in <module>
    main()
  File "/tmp/backgroundremover/cmd/cli.py", line 195, in main
    utilities.transparentvideo(os.path.abspath(args.output.name), os.path.abspath(args.input.name),
  File "/tmp/backgroundremover/utilities.py", line 241, in transparentvideo
    matte_key(temp_file, file_path,
  File "/tmp/backgroundremover/utilities.py", line 71, in matte_key
    manager = multiprocessing.Manager()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/context.py", line 57, in Manager
    m.start()
  File "/opt/conda/lib/python3.11/multiprocessing/managers.py", line 567, in start
    self._address = reader.recv()
                    ^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
          ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
    buf = self._recv(4)
          ^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
    raise EOFError
EOFError