但Speech Recorder是可以的。终极录音的就不行,如下是log,请大家分析一下是什么问题,谢了!D/ALSAModule( 1302): open called for devices 00040000 in mode 0...
I/ALSAModule( 1302): Initialized ALSA CAPTURE device default
D/AcousticsModule( 1302): Acoustics set_params stub called with 7.
I/MPEG4Writer( 1302): limits: 2147483647/0 bytes/us, bit rate: 12200 bps and the estimated moov size 3072 bytes
D/ALSAModule( 1302): route called for devices 00040000 in mode 0...
W/AudioFlinger( 1302): RecordThread: buffer overflow
I/MPEG4Writer( 1302): setStartTimestampUs: 180715
I/MPEG4Writer( 1302): Earliest track starting time: 180715
D/MediaMetadataRetrieverJNI( 2218): Create a rotation matrix: 32 degrees
E/MetadataRetrieverClient( 1302): failed to capture a video frame
E/MediaMetadataRetrieverJNI( 2218): captureFrame: videoFrame is a NULL pointer
W/MediaThumbRequest( 2218): Can't create mini thumbnail for /sdcard/UltimateVR/?¤????_M2011_0725_035111.3gp
I/MPEG4Writer( 1302): Received total/0-length (148/0) buffers and encoded 148 frames. - audio
I/MPEG4Writer( 1302): Audio track drift time: -295234 us
D/ALSAModule( 1302): route called for devices 00000000 in mode 0...
D/ALSAModule( 1302): open called for devices 00000000 in mode 0...
I/ALSAModule( 1302): Initialized ALSA CAPTURE device default
D/MPEG4Writer( 1302): 0 chunks are written in the last batch
D/AcousticsModule( 1302): Acoustics close stub called.
W/MediaRecorder( 2316): mediarecorder went away with unhandled events
D/SntpClient( 1559): request time failed: java.net.SocketException: Address family not supported by protocol
D/SntpClient( 2228): request time failed: java.net.SocketTimeoutException: Try again
I/AndroidSurface( 1302): create SurfaceComposerClient OK
I/FFPlayer( 1302): tm 5711142575 FFPlayer created, mEngine = 0x455c8, Count = 1
I/FFPlayer( 1302): tm 00202 engine_open url = fd://30,0,5028
I/FFPlayer( 1302): tm 05751 [inputDemux] thread (tid:2340) start, url = fd://30,0,5028
I/FFPlayer( 1302): tm 16805 [inputDemux] Stream Input format: mov,mp4,m4a,3gp,3g2,mj2, startTime: 0
I/FFPlayer( 1302): tm 00212 [inputDemux] Find Decoder: amrnb, id = 73728
W/FFPlayer( 1302): tm 08689 [inputDemux] Unsupported audio sample format 3
W/FFPlayer( 1302): tm 00392 [inputDemux] fd://30,0,5028: could not find any A/V streams
I/FFPlayer( 1302): tm 00563 FireEvent: Error, Ext1=1, Ext2=-1
E/MediaPlayer( 2316): error (1, -1)
E/MediaPlayer( 2316): Error (1,-1)
I/FFPlayer( 1302): tm 03374 [inputDemux] thread exited.觉得红色的两句是问题所在,但是具体的就不知怎么回事了。
I/ALSAModule( 1302): Initialized ALSA CAPTURE device default
D/AcousticsModule( 1302): Acoustics set_params stub called with 7.
I/MPEG4Writer( 1302): limits: 2147483647/0 bytes/us, bit rate: 12200 bps and the estimated moov size 3072 bytes
D/ALSAModule( 1302): route called for devices 00040000 in mode 0...
W/AudioFlinger( 1302): RecordThread: buffer overflow
I/MPEG4Writer( 1302): setStartTimestampUs: 180715
I/MPEG4Writer( 1302): Earliest track starting time: 180715
D/MediaMetadataRetrieverJNI( 2218): Create a rotation matrix: 32 degrees
E/MetadataRetrieverClient( 1302): failed to capture a video frame
E/MediaMetadataRetrieverJNI( 2218): captureFrame: videoFrame is a NULL pointer
W/MediaThumbRequest( 2218): Can't create mini thumbnail for /sdcard/UltimateVR/?¤????_M2011_0725_035111.3gp
I/MPEG4Writer( 1302): Received total/0-length (148/0) buffers and encoded 148 frames. - audio
I/MPEG4Writer( 1302): Audio track drift time: -295234 us
D/ALSAModule( 1302): route called for devices 00000000 in mode 0...
D/ALSAModule( 1302): open called for devices 00000000 in mode 0...
I/ALSAModule( 1302): Initialized ALSA CAPTURE device default
D/MPEG4Writer( 1302): 0 chunks are written in the last batch
D/AcousticsModule( 1302): Acoustics close stub called.
W/MediaRecorder( 2316): mediarecorder went away with unhandled events
D/SntpClient( 1559): request time failed: java.net.SocketException: Address family not supported by protocol
D/SntpClient( 2228): request time failed: java.net.SocketTimeoutException: Try again
I/AndroidSurface( 1302): create SurfaceComposerClient OK
I/FFPlayer( 1302): tm 5711142575 FFPlayer created, mEngine = 0x455c8, Count = 1
I/FFPlayer( 1302): tm 00202 engine_open url = fd://30,0,5028
I/FFPlayer( 1302): tm 05751 [inputDemux] thread (tid:2340) start, url = fd://30,0,5028
I/FFPlayer( 1302): tm 16805 [inputDemux] Stream Input format: mov,mp4,m4a,3gp,3g2,mj2, startTime: 0
I/FFPlayer( 1302): tm 00212 [inputDemux] Find Decoder: amrnb, id = 73728
W/FFPlayer( 1302): tm 08689 [inputDemux] Unsupported audio sample format 3
W/FFPlayer( 1302): tm 00392 [inputDemux] fd://30,0,5028: could not find any A/V streams
I/FFPlayer( 1302): tm 00563 FireEvent: Error, Ext1=1, Ext2=-1
E/MediaPlayer( 2316): error (1, -1)
E/MediaPlayer( 2316): Error (1,-1)
I/FFPlayer( 1302): tm 03374 [inputDemux] thread exited.觉得红色的两句是问题所在,但是具体的就不知怎么回事了。
W/AudioFlinger( 1302): RecordThread: buffer overflowE/MediaMetadataRetrieverJNI( 2218): captureFrame: videoFrame is a NULL pointer先看看AudioFlinger的溢出,再看看MediaMetadataRetrieverJNI的空指针
buffer overflow没什么问题,在2.2平台也存在(听说要调整一下驱动的dma的size或android的buffer),但是不影响效果。
videoFrame is a NULL pointer是正常的吧,因为只是一个录音程序。问题应该是这句:“0 chunks are written in the last batch”,写到文件的数据是0chunks。实在搞不懂是什么原因。
你说的是,但是我目前也不能确定2.3是否支持终极录音。
D/ALSAModule( 1302): open called for devices 00040000 in mode 0...
I/ALSAModule( 1302): Initialized ALSA CAPTURE device default
D/AcousticsModule( 1302): Acoustics set_params stub called with 7.
这个应该是问题所在:
W/MediaThumbRequest( 2218): Can't create mini thumbnail for /sdcard/UltimateVR/?¤????_M2011_0725_035111.3gp
为什么在SD卡上创建不了,failed to capture a video frame视频会不会影响audio同步,有些软件处理用视频帧来同步,无视频会不录音。
===========================================================================
在2.2上也有这一句打印,但可以录音。而且我就MediaRecorder这个类,对比了2.2和2.3,没有重大的变化。因此应该没有视频不会录音。W/MediaThumbRequest( 2218): Can't create mini thumbnail for
===========================================================
好的。我检查一下这个东西,这个是音视频数据库管理方面的,按理来说不会影响录音文件的读写。谢谢你了!
我就一个做底层驱动的,现在应用那边忙得抽不出人手,才叫我跟一下这个问题。
2.2上面我们都是用ffmpeg进行编码的,2.3就用android默认的stagefright了。如果是ffmpeg的话,我自信还可以应付,而且网络资源也多。