facebookarchive / C3D

C3D is a modified version of BVLC caffe to support 3D ConvNets.
Other
1.16k stars 507 forks source link

[mjpeg @ 0xafe5920] No JPEG data found in image #422

Closed AndersonZhangyq closed 5 years ago

AndersonZhangyq commented 5 years ago

I have successfully completed the examples provided, extracting feature from video and frames, with no error occurred. But when I tried to extract feature from my own video using the default settings, it kept telling me "[mjpeg @ 0xafe5920] No JPEG data found in image". And I tried to install ffmpeg, ubuntu-restricted-extras and vlc, but no luck. The full output from the terminal is attached. terminal-output.txt

I'm using C3D-v1.0 on Ubuntu 16.04, compiled with opencv 2.4. What is the possible cause of this problem and how can I solve it?

wuxiaomin0110 commented 5 years ago

I also have this problem. And I have tested, if the video format is .avi, the features can be well extracted, while the video format is .mp4, it will occur the error like you mentioned. But I have no idea about how to solve this problem, do you find some methods to solve it?

AndersonZhangyq commented 5 years ago

Finally, I found that this is a ffmpeg related problem. The error message "No JPEG data found in image" can be found in the source code of ffmpeg/libavcodec/mjpegdec.c. Manually compile ffmpeg and use new version of libavcodec will do the trick. Since I successfully extracted feature without any error in ubuntu 18.04, I checked the build information of opencv and found that the version of libavcodec is different. (57.107.100 in ubuntu 18.04, 56.60.100 in ubuntu 16.04). @wuxiaomin0110 hopefully this will help

kjsr7 commented 5 years ago

Finally, I found that this is a ffmpeg related problem. The error message "No JPEG data found in image" can be found in the source code of ffmpeg/libavcodec/mjpegdec.c. Manually compile ffmpeg and use new version of libavcodec will do the trick. Since I successfully extracted feature without any error in ubuntu 18.04, I checked the build information of opencv and found that the version of libavcodec is different. (57.107.100 in ubuntu 18.04, 56.60.100 in ubuntu 16.04). @wuxiaomin0110 hopefully this will help

Hi @AndersonZhangyq, could you please elaborate on manually compiling ffmpeg and using the latest version of libavcodec? Also, I would like to know whether I can proceed even if this error persists.