我正在Camera
使用 mime 类型“video/avc”对预览数据进行MediaCodec
编码,并将编码数据(仅视频,无音频)传递给MediaMuxer
. 多路复用器似乎运行良好并创建了一个合理大小的输出文件(即,我记录的时间越长越大)。但是,当我尝试停止多路复用器时,我收到“无法停止多路复用器”错误:
10-21 10:39:40.755: E/AndroidRuntime(2166): Caused by: java.lang.IllegalStateException: Failed to stop the muxer
在失败停止之前有一些可疑的 MPEG4Writer 日志消息:
10-21 10:39:40.740: D/MPEG4Writer(2166): Stopping Video track
10-21 10:39:40.740: E/MPEG4Writer(2166): Missing codec specific data
10-21 10:39:40.740: W/MPEG4Writer(2166): 0-duration samples found: 122
10-21 10:39:40.740: I/MPEG4Writer(2166): Received total/0-length (123/1) buffers and encoded 123 frames. - video
10-21 10:39:40.740: D/MPEG4Writer(2166): Stopping Video track source
10-21 10:39:40.740: D/MPEG4Writer(2166): Video track stopped
10-21 10:39:40.740: D/MPEG4Writer(2166): Stopping writer thread
10-21 10:39:40.740: D/MPEG4Writer(2166): 0 chunks are written in the last batch
10-21 10:39:40.740: D/MPEG4Writer(2166): Writer thread stopped
10-21 10:39:40.740: E/MPEG4Writer(2166): writer error ended!
任何线索是什么原因造成的?不确定您还需要什么信息。