CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

Video pipeline error: Something is wrong with ffmpeg

Open psycoplankton opened this issue 1 year ago • 4 comments
trafficstars

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'

psycoplankton avatar Oct 22 '24 15:10 psycoplankton

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.

ashwani-ver avatar Oct 22 '24 17:10 ashwani-ver

maybe upgrade ffmpeg to 7.0.2

goodlookingbear avatar Oct 23 '24 09:10 goodlookingbear

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.

already did that, did not work.

psycoplankton avatar Oct 24 '24 19:10 psycoplankton

maybe upgrade ffmpeg to 7.0.2

how can I do that? I tried using the tar.xz file from ffmpeg download page but it didn't work

psycoplankton avatar Oct 26 '24 12:10 psycoplankton