facebookresearch / frankmocap

A Strong and Easy-to-use Single View 3D Hand+Body Pose Estimator
Other
2.14k stars 374 forks source link

AssertionError: Failed in opening video #157

Closed CGMikeG closed 2 years ago

CGMikeG commented 2 years ago

I get an error after running below command. Detectron2 and sample data have been installed successfully.

python -m demo.demo_bodymocap --input_path ./sample_data/han_short.mp4 --out_dir ./mocap_output

Traceback (most recent call last): File "C:\Anaconda\envs\frankmocap\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Anaconda\envs\frankmocap\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "M:\GITHUB\FRANKMOCAP\demo\demo_bodymocap.py", line 178, in main() File "M:\GITHUB\FRANKMOCAP\demo\demo_bodymocap.py", line 174, in main run_body_mocap(args, body_bbox_detector, body_mocap, visualizer) File "M:\GITHUB\FRANKMOCAP\demo\demo_bodymocap.py", line 27, in run_body_mocap input_type, input_data = demo_utils.setup_input(args) File "M:\GITHUB\FRANKMOCAP\mocap_utils\demo_utils.py", line 105, in setup_input assert cap.isOpened(), f"Failed in opening video: {args.input_path}" AssertionError: Failed in opening video: ./sample_data/han_short.mp4

penincillin commented 2 years ago

@CGMikeG Would you mind check whether ./sample_data/han_short.mp4 is in the correct path?

CGMikeG commented 2 years ago

yep :D

penincillin commented 2 years ago

@CGMikeG Hmmm, I am not quite sure what happened on your side. Would you mind to check whether the ./sample_data/hand_short.mp4 is compact or not? The md5sum should be e0df58c04ebbfbbbe78219747420ba97.

CGMikeG commented 2 years ago

yes, it is very strange. I thought this would just work.

e0df58c04ebbfbbbe78219747420ba97 han_short.mp4

penincillin commented 2 years ago

Given this, would you mind try to write a code clip to read this video.

import cv2
cap = cv2.VideoCapture("./sample_data/hand_short.mp4")
print(cap.isOpened())
CGMikeG commented 2 years ago

This is what I got. I tried commenting assert and just running cap.isOpened() and it returned False

I also tried running code in terminal. They all returned 'False'.

Python 3.7.11 (default, Jul 27 2021, 09:42:29) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.

import cv2 cap = cv2.VideoCapture("./sample_data/hand_short.mp4") print(cap.isOpened()) False cap = cv2.VideoCapture("/sample_data/hand_short.mp4")
print(cap.isOpened()) False cap = cv2.VideoCapture("M:/GITHUB/FRANKMOCAP/sample_data/hand_short.mp4")
print(cap.isOpened()) False

hanshortexist

penincillin commented 2 years ago

@CGMikeG It seems that the name of your folder is "sampledata" instead of "sample_data". Would you mind rename it to "sample_data"?

Snip20211023_77

CGMikeG commented 2 years ago

That let me continue, but similar to my problem when running this in Linux, I am getting an issue with ffmpeg. I wonder if using an older version will fix the issue.

ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [image2 @ 0000017548d16c00] Pattern type 'glob' was selected but globbing is not supported by this libavformat build M:\GITHUB\FRANKMOCAP\mocap_output\rendered/*.jpg: Function not implemented

CGMikeG commented 2 years ago

You're suggestion on the other page worked, thank you!!!!

https://github.com/facebookresearch/frankmocap/issues/160#issuecomment-950564422