[J2ME Q&A]MMAPI"Cannot parse this type of AMR"异常之讨论
来源:互联网 发布:刘恺威剧本事件知乎 编辑:程序博客网 时间:2024/05/22 09:01
[J2ME] MMAPI的Cannot parse this type of AMR异常之讨论
郑昀 草拟 20060417
[现象]
首先,我们假设遇到这种错误的人们了解如何使用MMAPI,从而排除代码使用不当问题。
那么在播放3gp媒体文件时遇到“java.lang.Exception: Cannot parse this type of AMR”的异常错误,如果怀疑是ffmpeg或者其他转换程序造成的话,那么你可以把Nokia手机自己拍摄的录像传到PC机上,这种文件格式就是3gp的,而且肯定是Nokia自己的手机程序能播放的。
但是,我用mmapi在Nokia S60模拟器(Nokia Developer's Suite 3.0 for J2ME所携带的模拟器)上播放这种Nokia手机生成的3gp文件时依然得到“java.lang.Exception: Cannot parse this type of AMR”错误,没有声音,只有视频。
我用下面的命令行:
Ffmpeg转换命令
ffmpeg -y -i test.mpeg -bitexact -vcodec h263 -b 128 -r 15 -s 176x144 -acodec aac -ac 2 -ar 22500 -ab 24 -f 3gp test.3gp
或者
ffmpeg -y -i test.mpeg -ac 1 -acodec amr_nb -ar 8000 -s 176x144 -b 128 -r 15 test.3gp
转换出来的3gp文件,都只能够在Nokia S60模拟器(Nokia Developer's Suite 3.0 for J2ME所携带的模拟器)上播放视频,但没有声音,也得到了大量的java.lang.Exception: Cannot parse this type of AMR错误提示。
我为什么要怀疑仅仅是S60模拟器的问题呢。因为我把转换好的3gp文件放在我的服务器上,用
简单的播放代码
player = Manager.createPlayer(url);
player.realize();
player.prefetch();
这种代码在Nokia7610真机上运行播放这个远端资源http://218.249.90.118/toodou/test.3gp ,结果正常地播放了,有声音,有图像!
所以说明Nokia 7610真机的MMAPI对于3gp文件中的音频解析是没问题的。出问题的是S60模拟器(Nokia Developer's Suite 3.0 for J2ME所携带的模拟器)。
[小结]
综上所述,如果你遇到了"Cannot parse this type of AMR"的异常,那么请考虑你用来测试j2me程序的模拟器是不是有问题。不妨到真机上测试。
- [J2ME Q&A]MMAPI"Cannot parse this type of AMR"异常之讨论
- [J2ME Q&A]MMAPI"Cannot parse this type of AMR"异常之讨论
- *** cannot be resolved to a type异常
- WebLogic之Cannot parse POST parameters of request解决方法
- Cannot initialize a parameter of type id<NSFileManagerDelegate&
- Cannot initialize a parameter of type 'char **' with
- Cannot initialize a parameter of type 'NSString *_Nullable' with an rvalue of type ''UITouchPhase"
- cannot initialize a parameter of type 'IPCameraNightMode' with an rvalue of type 'int'
- 了解J2ME可选包MMAPI
- 了解J2ME可选包MMAPI
- weblogic Cannot parse POST parameters of request
- Cannot create encoder for Option of Product type, because Product type is represented as a row
- The resolution of ERROR C2662: cannot convert 'this' pointer from "const Class-Type" to "Class&"
- UE4 Inappropriate '*' on variable of type 'F..truct', cannot have an exposed pointer to this type'问题
- Multiple annotations found at this line: - String cannot be resolved to a type
- Multiple annotations found at this line: - String cannot be resolved to a type
- cannot assign value of type
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- 需要加快进程了。。。 3.21
- [Remoting FAQ]传递Remoting参数时遇到的两种常见错误
- [收藏]不仅仅跟随更能够提出震撼性的技术框架/技术特点出来
- 再谈目标的达成
- C#实现百度中的搜索框的下选效果!
- [J2ME Q&A]MMAPI"Cannot parse this type of AMR"异常之讨论
- 初识C#网络编程
- "用户界面和多媒体"版面问题[二][j2medev][0406更新]
- Signing a midlet suite的讨论稿[J2ME]
- 有多少项目可以重来?-谈谈临时项目组的项目重述
- 根据产品损耗率计算产品实际数量
- CSDN的RoR论坛开版
- [Nutch]如何利用HTML页面中meta元素?
- 目标该如何设定?