Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot generate mp4 file,求帮忙 #73

Open
Lijinxisa opened this issue Apr 2, 2023 · 2 comments
Open

Cannot generate mp4 file,求帮忙 #73

Lijinxisa opened this issue Apr 2, 2023 · 2 comments

Comments

@Lijinxisa
Copy link

运行程序后,我可以得到二维alphapose的关键点可视化图片,但是得不出mp4文件,有人可以帮助解惑一下吗,困扰了很久,提前感谢了

@Lijinxisa
Copy link
Author

具体报错为:
UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations.
fig.tight_layout()
MovieWriter stderr:
[libopenh264 @ 0x558aac2f8dc0] Incorrect library version loaded
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

outputs/kunkun_cut.mp4 --- elapsed time: 22.795807786285877 s
Traceback (most recent call last):
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 231, in saving
yield self
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 1085, in save
writer.grab_frame(**savefig_kwargs)
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 357, in grab_frame
self.fig.savefig(self._proc.stdin, format=self.frame_format,
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/figure.py", line 3274, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2338, in print_figure
result = print_method(
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2204, in
print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 410, in wrapper
return func(*inner_args, **inner_kwargs)
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 454, in print_raw
fh.write(renderer.buffer_rgba())
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/guangyu/qucheng/video-to-pose3D/videopose.py", line 164, in
inference_video('outputs/kunkun_cut.mp4', 'alpha_pose')
File "/home/guangyu/qucheng/video-to-pose3D/videopose.py", line 160, in inference_video
main(args)
File "/home/guangyu/qucheng/video-to-pose3D/videopose.py", line 129, in main
render_animation(input_keypoints, anim_output,
File "/home/guangyu/qucheng/video-to-pose3D/common/visualization.py", line 187, in render_animation
anim.save(output, writer=writer)
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 1063, in save
with mpl.rc_context({'savefig.bbox': None}),
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 233, in saving
self.finish()
File "/home/guangyu/anaconda3/envs/adaptpose/lib/python3.10/site-packages/matplotlib/animation.py", line 347, in finish
raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '1000x500', '-pix_fmt', 'rgba', '-r', '25', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-b', '30000k', '-y', 'outputs/alpha_pose_kunkun_cut.mp4']' returned non-zero exit status 1.
1%|█▍

@xiaoyaoshengy
Copy link

我也遇到了,这个应该是ffmpeglibopenh264库的版本不匹配导致的,我用conda update ffmpeg更新一下ffmpeg就正常运行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants