DGend / javacv

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

Cannot create FrameGrabber from device path #429

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I do FrameGrabber.createDefault("/dev/graphics/fb0"), set frame 
width/height/rate, and then do grabber.start().

I get this error:
02-11 12:25:41.692  W/System.err﹕ 
com.googlecode.javacv.FrameGrabber$Exception: cvCreateFileCapture() Error: 
Could not create camera capture.
02-11 12:25:41.700  W/System.err﹕ at 
com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:171)

Original issue reported on code.google.com by eug...@wearableintelligence.com on 11 Feb 2014 at 9:51

GoogleCodeExporter commented 8 years ago
Did you try to setFormat("rawvideo") ?

Original comment by samuel.a...@gmail.com on 12 Feb 2014 at 5:56

GoogleCodeExporter commented 8 years ago
Yes. Same problem.

Original comment by eug...@wearableintelligence.com on 12 Feb 2014 at 10:25

GoogleCodeExporter commented 8 years ago
It looks like we need to set the pixel format as well for this to work. I've 
made changes to `FFmpegFrameGrabber` that should allow us to use 
`setPixelFormat()` for that purpose:
http://code.google.com/p/javacv/source/detail?r=7d217681229ed20b241f5d5c6b55ada0
918b9b7e
So, with this new code, in addition to `setFormat("rawvideo")`, please try to 
call `setPixelFormat(AV_PIX_FMT_RGB32)` as well before `start()`, and please 
try other pixel formats if RGB32 doesn't work on your device, thanks.

Original comment by samuel.a...@gmail.com on 15 Feb 2014 at 1:43

GoogleCodeExporter commented 8 years ago
That change has been included in the latest release of JavaCV 0.8. There are a 
lot of other changes with this release, so please make sure to read the news 
release here:
    http://bytedeco.org/release/2014/04/28/first-release.html

Thanks for testing this out for me!

Original comment by samuel.a...@gmail.com on 29 Apr 2014 at 1:38