1

i am having a hard time getting Android Things developer preview 0.3 running on my Raspberry Pi 3 to record video using the official PiCamera connected to the internal port via its ribbon cable.
I am following the official Camera2 code sample.

I have also opened an issue in the GitHub tracker.

There seems to be an issue with the codecs.

mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);

yields

MediaRecorder: stop failed: -1007

Which i think means no audio/video has been received.

But changing that line to

mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);

Yields

05-09 08:35:49.142   160  2498 I MediaPlayerService: MediaPlayerService::getOMX
05-09 08:35:49.143   160  2498 I OMXClient: MuxOMX ctor
05-09 08:35:49.144   157   157 I OMXMaster: makeComponentInstance(OMX.google.mpeg4.encoder) in mediacodec process
05-09 08:35:49.261   157   157 I SoftMPEG4Encoder: Construct SoftMPEG4Encoder
05-09 08:35:49.262   160  2497 I MediaCodec: MediaCodec will operate in async mode
05-09 08:35:49.301   160  2498 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 08:35:49.305   157  1457 E OMXNodeInstance: getParameter(9d001f:google.mpeg4.encoder, ParamVideoErrorCorrection(0x6000007)) ERROR: NotImplemented(0x80001006)
05-09 08:35:49.305   160  2498 I ACodec  : [OMX.google.mpeg4.encoder] cannot encode color aspects. Ignoring.
05-09 08:35:49.306   160  2498 I ACodec  : [OMX.google.mpeg4.encoder] cannot encode HDR static metadata. Ignoring.
05-09 08:35:49.306   160  2498 I ACodec  : setupVideoEncoder succeeded
05-09 08:35:49.307   157  1457 E OMXNodeInstance: setConfig(9d001f:google.mpeg4.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
05-09 08:35:49.307   160  2498 I ACodec  : codec does not support config priority (err -2147483648)
05-09 08:35:49.308   160  2498 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 08:35:49.309   157   157 E OMXNodeInstance: getConfig(9d001f:google.mpeg4.encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: Undefined(0x80001001)
05-09 08:35:49.309   157   157 E OMXNodeInstance: getParameter(9d001f:google.mpeg4.encoder, ParamVideoIntraRefresh(0x6000006)) ERROR: UnsupportedIndex(0x8000101a)

or

mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_TS);

Yields

05-09 09:03:17.998   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.003   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.009   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.011   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.013   159   159 I OMXMaster: makeComponentInstance(OMX.google.mp3.decoder) in mediacodec process
05-09 09:03:18.162   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.163   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.163   159   206 I OMXMaster: makeComponentInstance(OMX.google.amrnb.decoder) in mediacodec process
05-09 09:03:18.178   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.179   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.179   159   159 I OMXMaster: makeComponentInstance(OMX.google.amrwb.decoder) in mediacodec process
05-09 09:03:18.187   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.187   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.187   159  1425 I OMXMaster: makeComponentInstance(OMX.google.aac.decoder) in mediacodec process
05-09 09:03:18.212   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.212   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.213   159   206 I OMXMaster: makeComponentInstance(OMX.google.g711.alaw.decoder) in mediacodec process
05-09 09:03:18.352   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.353   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.353   159   159 I OMXMaster: makeComponentInstance(OMX.google.g711.mlaw.decoder) in mediacodec process
05-09 09:03:18.492   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.492   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.493   159  1425 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in mediacodec process
05-09 09:03:18.642   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.643   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.643   159   206 I OMXMaster: makeComponentInstance(OMX.google.opus.decoder) in mediacodec process
05-09 09:03:18.792   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.793   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.793   159   159 I OMXMaster: makeComponentInstance(OMX.google.raw.decoder) in mediacodec process
05-09 09:03:18.802   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.803   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.803   159  1425 I OMXMaster: makeComponentInstance(OMX.google.aac.encoder) in mediacodec process
05-09 09:03:18.830   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.830   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.831   159   159 I OMXMaster: makeComponentInstance(OMX.google.amrnb.encoder) in mediacodec process
05-09 09:03:18.842   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.842   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.843   159  1425 I OMXMaster: makeComponentInstance(OMX.google.amrwb.encoder) in mediacodec process
05-09 09:03:18.854   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:18.855   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:18.855   159   206 I OMXMaster: makeComponentInstance(OMX.google.flac.encoder) in mediacodec process
05-09 09:03:19.006   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.006   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.007   159   159 I OMXMaster: makeComponentInstance(OMX.google.gsm.decoder) in mediacodec process
05-09 09:03:19.138   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.138   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.139   159  1425 I OMXMaster: makeComponentInstance(OMX.google.mpeg4.decoder) in mediacodec process
05-09 09:03:19.281   159  1425 E OMXNodeInstance: getExtensionIndex(9f000f:google.mpeg4.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:19.281   159   159 W OMXNodeInstance: [9f000f:google.mpeg4.decoder] component does not support metadata mode; using fallback
05-09 09:03:19.286   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.287   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.287   159   206 I OMXMaster: makeComponentInstance(OMX.google.h263.decoder) in mediacodec process
05-09 09:03:19.422   159  1425 E OMXNodeInstance: getExtensionIndex(9f0010:google.h263.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:19.422   159   159 W OMXNodeInstance: [9f0010:google.h263.decoder] component does not support metadata mode; using fallback
05-09 09:03:19.426   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.427   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.427   159   206 I OMXMaster: makeComponentInstance(OMX.google.h264.decoder) in mediacodec process
05-09 09:03:19.587   162   217 W ACodec  : [OMX.google.h264.decoder] stopping checking profiles after 32: 2/8000
05-09 09:03:19.588   159   206 E OMXNodeInstance: getExtensionIndex(9f0011:google.h264.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:19.588   159  1425 W OMXNodeInstance: [9f0011:google.h264.decoder] component does not support metadata mode; using fallback
05-09 09:03:19.593   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.594   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.594   159   159 I OMXMaster: makeComponentInstance(OMX.google.hevc.decoder) in mediacodec process
05-09 09:03:19.742   159  1425 E OMXNodeInstance: getExtensionIndex(9f0012:google.hevc.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:19.742   159   206 W OMXNodeInstance: [9f0012:google.hevc.decoder] component does not support metadata mode; using fallback
05-09 09:03:19.748   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.749   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.749   159   159 I OMXMaster: makeComponentInstance(OMX.google.vp8.decoder) in mediacodec process
05-09 09:03:19.900   159  1425 E OMXNodeInstance: getExtensionIndex(9f0013:google.vp8.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:19.900   159   206 W OMXNodeInstance: [9f0013:google.vp8.decoder] component does not support metadata mode; using fallback
05-09 09:03:19.905   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:19.905   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:19.906   159   159 I OMXMaster: makeComponentInstance(OMX.google.vp9.decoder) in mediacodec process
05-09 09:03:20.024   159   206 E OMXNodeInstance: getExtensionIndex(9f0014:google.vp9.decoder, OMX.google.android.index.configureVideoTunnelMode) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:20.024   159   159 W OMXNodeInstance: [9f0014:google.vp9.decoder] component does not support metadata mode; using fallback
05-09 09:03:20.030   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.032   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.032   159  1425 I OMXMaster: makeComponentInstance(OMX.google.h263.encoder) in mediacodec process
05-09 09:03:20.175   159  1425 I SoftMPEG4Encoder: Construct SoftMPEG4Encoder
05-09 09:03:20.180   162   217 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.181   159   159 E OMXNodeInstance: getConfig(9f0015:google.h263.encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: Undefined(0x80001001)
05-09 09:03:20.186   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.186   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.187   159  1425 I OMXMaster: makeComponentInstance(OMX.google.h264.encoder) in mediacodec process
05-09 09:03:20.325   162   217 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.330   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.331   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.331   159  1425 I OMXMaster: makeComponentInstance(OMX.google.mpeg4.encoder) in mediacodec process
05-09 09:03:20.450   159  1425 I SoftMPEG4Encoder: Construct SoftMPEG4Encoder
05-09 09:03:20.454   162   217 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.454   159   206 E OMXNodeInstance: getConfig(9f0017:google.mpeg4.encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: Undefined(0x80001001)
05-09 09:03:20.459   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.459   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.460   159   206 I OMXMaster: makeComponentInstance(OMX.google.vp8.encoder) in mediacodec process
05-09 09:03:20.600   162   217 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.600   159   159 E OMXNodeInstance: getConfig(9f0018:google.vp8.encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: Undefined(0x80001001)
05-09 09:03:20.606   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.607   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.607   162   217 W MediaCodecList: unable to open media codecs configuration xml file: /etc/media_codecs_performance.xml
05-09 09:03:20.607   162   217 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.608   162   217 I OMXClient: MuxOMX ctor
05-09 09:03:20.612   162   217 W MediaCodecList: unable to open media codecs configuration xml file: /data/misc/media/media_codecs_profiling_results.xml
05-09 09:03:20.615   162  1474 I MediaPlayerService: MediaPlayerService::getOMX
05-09 09:03:20.615   162  1474 I OMXClient: MuxOMX ctor
05-09 09:03:20.616   159   206 I OMXMaster: makeComponentInstance(OMX.google.mpeg4.encoder) in mediacodec process
05-09 09:03:20.737   159   206 I SoftMPEG4Encoder: Construct SoftMPEG4Encoder
05-09 09:03:20.741   162  1422 I MediaCodec: MediaCodec will operate in async mode
05-09 09:03:20.745   162  1474 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.748   159   159 E OMXNodeInstance: getParameter(9f0019:google.mpeg4.encoder, ParamVideoErrorCorrection(0x6000007)) ERROR: NotImplemented(0x80001006)
05-09 09:03:20.748   162  1474 I ACodec  : [OMX.google.mpeg4.encoder] cannot encode color aspects. Ignoring.
05-09 09:03:20.749   162  1474 I ACodec  : [OMX.google.mpeg4.encoder] cannot encode HDR static metadata. Ignoring.
05-09 09:03:20.749   162  1474 I ACodec  : setupVideoEncoder succeeded
05-09 09:03:20.749   159   206 E OMXNodeInstance: setConfig(9f0019:google.mpeg4.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
05-09 09:03:20.750   162  1474 I ACodec  : codec does not support config priority (err -2147483648)
05-09 09:03:20.751   162  1474 W ACodec  : do not know color format 0x7f000789 = 2130708361
05-09 09:03:20.751   159   159 E OMXNodeInstance: getConfig(9f0019:google.mpeg4.encoder, ConfigAndroidIntraRefresh(0x6f60000a)) ERROR: Undefined(0x80001001)
05-09 09:03:20.752   159   206 E OMXNodeInstance: getParameter(9f0019:google.mpeg4.encoder, ParamVideoIntraRefresh(0x6000006)) ERROR: UnsupportedIndex(0x8000101a)
05-09 09:03:20.759   159  1425 E cutils-trace: Error opening trace file: No such file or directory (2)
05-09 09:03:20.759   159  1425 D GraphicBufferSource: setting dataspace: 0x103
05-09 09:03:20.760   159  1425 D GraphicBufferSource: requesting color aspects (R:2(Limited), P:4(BT601_6_525), M:3(BT601_6), T:3(SMPTE170M))
05-09 09:03:20.767   159  1475 E SoftMPEG4Encoder: Failed to initialize the encoder
05-09 09:03:20.768   162  1474 E ACodec  : [OMX.google.mpeg4.encoder] ERROR(0x80001001)
05-09 09:03:20.768   162  1474 E ACodec  : signalError(omxError 0x80001001, internalError -2147483648)
05-09 09:03:20.768   162  1422 E MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
05-09 09:03:20.768   162  1418 E MediaCodecSource: Encoder (video) reported error : 0x80001001
05-09 09:03:20.770   159  1425 W GraphicBufferSource: Dropped back down to Loaded without Executing
05-09 09:03:20.773   159  1425 E BufferQueueProducer: [] query: BufferQueue has been abandoned
05-09 09:03:20.773  1395  1395 E Legacy-CameraDevice-JNI: LegacyCameraDevice_nativeDetectSurfaceDimens: Error while querying surface width No such device (-19).

closed as off-topic by bmdixon, beeshyams, eldarerathis Jun 5 '17 at 20:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about writing and publishing Android apps, writing custom ROMs, and other topics that are primarily of concern to developers are off-topic. Consider taking advantage of other resources that may be appropriate for your question." – bmdixon, beeshyams, eldarerathis
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.