Andriod Studio OpenCV 3.2, Cannot open video file or android camera with native OpenCV

后端 未结 2 570
萌比男神i
萌比男神i 2021-01-22 22:25

I\'m currently working on Android native image processing with camera/video.

I\'m using OpenCV 3.2 to capture and process image.
The problem is that I cannot

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-22 23:03

    This format "mp4" you can't see the VideoCapture with Android. You need to make two conversions:

    1. From mp4 to mjpeg. : Example: ffmpeg -i input.mp4 -vcodec mjpeg output.mjpeg
    2. From mjpeg to avi: Example: ffmpeg -i output.mjpeg -vcodec output.avi

    As you can see in: http://answers.opencv.org/question/126732/loading-video-files-using-videocapture-in-android/

    This is an example: https://github.com/WritingMinds/ffmpeg-android-java.

提交回复
热议问题