sczhou / CodeFormer

[NeurIPS 2022] Towards Robust Blind Face Restoration with Codebook Lookup Transformer
Other
15.68k stars 3.3k forks source link

Video pipeline error: Something is wrong with ffmpeg #411

Open psycoplankton opened 1 day ago

psycoplankton commented 1 day ago

I have tried everything to solve this error, but couldn't do it. I am running of colab. Has anyone else faced any kind of issue similar to this, or can someone help me solve this.

PS: I have already tried to install ffmpeg and libx264 on colab.

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Please re-install ffmpeg and libx264 by running
    $ conda install -c conda-forge ffmpeg
    $ conda install -c conda-forge x264
Traceback (most recent call last):
  File "/content/drive/MyDrive/CodeFormer_Quantization/basicsr/utils/video_util.py", line 116, in write_frame
    self.stream_writer.stdin.write(frame)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-8-70b3907a6f99>", line 18, in <cell line: 2>
    vidwriter.write_frame(f)
  File "/content/drive/MyDrive/CodeFormer_Quantization/basicsr/utils/video_util.py", line 121, in write_frame
    sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 248, in wrapped
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "/usr/lib/python3.10/inspect.py", line 1662, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
AttributeError: 'tuple' object has no attribute 'tb_frame'
ashwani-ver commented 1 day ago

I have tried everything to solve this error, but couldn't do it. I am running of colab. Has anyone else faced any kind of issue similar to this, or can someone help me solve this.

PS: I have already tried to install ffmpeg and libx264 on colab.

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Please re-install ffmpeg and libx264 by running
  $ conda install -c conda-forge ffmpeg
  $ conda install -c conda-forge x264
Traceback (most recent call last):
  File "/content/drive/MyDrive/CodeFormer_Quantization/basicsr/utils/video_util.py", line 116, in write_frame
    self.stream_writer.stdin.write(frame)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-8-70b3907a6f99>", line 18, in <cell line: 2>
    vidwriter.write_frame(f)
  File "/content/drive/MyDrive/CodeFormer_Quantization/basicsr/utils/video_util.py", line 121, in write_frame
    sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 248, in wrapped
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "/usr/lib/python3.10/inspect.py", line 1662, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
AttributeError: 'tuple' object has no attribute 'tb_frame'

once you have installed the libraries, try to restart the runtime.

goodlookingbear commented 1 day ago

maybe upgrade ffmpeg to 7.0.2