shaileshmulange / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Could not open file with FFmpegFrameGrabber #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.load local resources with FFmpegFrameGrabber, like so FrameGrabber grabber = 
new FFmpegFrameGrabber("android.resource://" + getPackageName() + "/" + 
R.raw.video)
2.
3.

What is the expected output? What do you see instead?
finding the local resource. But it returns me this error:
error: Could not open file "android.resource://nl.yb/2130968576".

the only arguments you can use is file or filename. I've tried almost 
everything. 

Original issue reported on code.google.com by stats...@gmail.com on 5 Mar 2012 at 2:45

GoogleCodeExporter commented 9 years ago
FFmpeg cannot read files from Java/Android resource. Please try to extract the 
file to the cache directory before trying to read it with FFmpeg. To accomplish 
that you may try to use Loader.extractResource() as shown in the 
FacePreview.java sample.

Original comment by samuel.a...@gmail.com on 7 Mar 2012 at 5:48