[J2-mmapi] Of Cannot parse this type of AMR Exception Discussion
Zheng Drafting20060417
[ Symptom ]
First, let's assume that people who encounter such errors know how to use them.MmapiTo excludeCodeImproper use.
Playing 3GP Media files "Java. Lang. Exception: cannot parse this type of AMR" Exception error. If suspected FFmpeg Or other ConversionProgramThen you can Nokia Upload the video recorded by the mobile phone PC The file format is 3GP And must be Nokia Your mobile phone program can play the video. However, unfortunately, I use Mmapi In Nokia s60 When playing this file on the simulator, you still get "Java. Lang. Exception: cannot parse this type of AMR" Error, no sound, only video.
Use the following command line:
FFMPEG conversion command |
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 |
or FFMPEG-y-I test. MPEG-Ac 1-acodec amr_nb-ar 8000-s 176x144-B 128-R 15 test.3gp |
converted 3GP file, Only Nokia s60 the video is played on the simulator without sound, A large number of JAVA. lang. exception: cannot parse this type of AMR error message.
Why should I doubt thatS60What about the simulator. Because I converted3GPPut the file on my server and use
simple playback Code |
Player = manager. createplayer (URL ); Player. Realize (); Player. prefetch (); |
This code is available in Nokia7610 Real Machine To play back this remote resource. Http: // 218.249.90.118/toodou/test.3gp The results are perfectly played,Sound and image!
So note Nokia 7610 Real Machine Mmapi For 3GP File audio Parsing is okay. What's wrong is S60 Simulator.
[ Summary ]
to sum up, if you encounter " cannot pars E This type of AMR " exception, therefore, consider how to test j2's is there a problem with the simulator of the program. Test it on a real machine.