Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Visitor
Posts: 1
Registered: ‎04-06-2010
My Device: 9550
My Carrier: Smartone-Vodafone

Media Encoding Strings for capturing audio with custom RIM parameters

As per the API doc, there are some custom RIM parameters for capturing audio. I've used the following locator with the custom parameters to create a player which can be created successfully,

 

_player = Manager.createPlayer("capture://audio?encoding=amr&updateMethod=time&updateThreshold=20");

 

However, the recorder doesn't work as what I'd expected. The data was not written every 20 ms but still at a rate of default, i.e.1024bytes for each write.

 

Could anyone shed some light on it, I am working with BlackBerry Java Plug-in for Eclipse v1.1, 5.0API and testing with the built-in simulators.

 

Thanks

Steve

Contributor
Posts: 18
Registered: ‎04-06-2010
My Device: Blackberry Curve 8900
My Carrier: Movistar

Re: Media Encoding Strings for capturing audio with custom RIM parameters

[ Edited ]

 

I would like to achieve the same goal as you, and I searched a bit along the forums. Unfortunately, the threads I found are not very precise for that matter, or they are simply discouraging...

 

http://supportforums.blackberry.com/t5/Java-Development/For-Blackberry-Recorder-How-to-set-up-the-AM...

 

http://supportforums.blackberry.com/t5/General-BlackBerry-Smartphone/Supported-audio-capture-format/...

 

http://supportforums.blackberry.com/t5/General-BlackBerry-Smartphone/Supported-formats-for-capturing...

 

http://supportforums.blackberry.com/t5/Java-Development/define-AMR-bitrate/m-p/453109

 

 

As you can see, there's no specific clue of how can you configure amr (or any other codec for that matter) to record voice, so if anyone could get any further than the links I presented above, help would be really appretiated.

 

Thanks in advance.

Developer
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Media Encoding Strings for capturing audio with custom RIM parameters

Is the FPS of the video any different? I have not looked for anything but from the name of the parameters I would think that it changes the FPS of the video, not how often the data is updated.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Contributor
Posts: 18
Registered: ‎04-06-2010
My Device: Blackberry Curve 8900
My Carrier: Movistar

Re: Media Encoding Strings for capturing audio with custom RIM parameters

[ Edited ]

 

Hello rcmaniac25, thanks for your quick answer.

 

To my understanding, the question presented here has to do with tweaking native RIM audio codecs to capture audio (using a recorder), rather than video or FPS... or at least that's what I understood... and that is as well what I am trying to achieve myself with no luck so far.

The main goal (for me) is to capture audio, encode it with amr, and send it over a GPRS connection. With the default amr bitrate of 12.2kbps, the delay we obtained is not admissible.

 

Again, any light shed on this matter will be appreciated.

 

Developer
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Media Encoding Strings for capturing audio with custom RIM parameters

[ Edited ]

Urg, I did it again. I read too quick. Sorry.

 

On a related note, if I happen to be correct and the property has to do with video then using it on a audio encoding won't do anything.

 

Edit: I did it again, this time I read the documentation after making the post. Your right it is only for audio. I would try a value of 40 (since it rounds to the nearest 20ms) to see if that makes a difference. If it does then it is the 20-1580 is exclusive otherwise it might be a bug and you should post it on Issue Tracker.

 

The other thing is that the documentation says "On some BlackBerry devices" (my emphasis added) so maybe try a different simulator/device to see which ones it works on.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Contributor
Posts: 18
Registered: ‎04-06-2010
My Device: Blackberry Curve 8900
My Carrier: Movistar

Re: Media Encoding Strings for capturing audio with custom RIM parameters

Thanks again, rcmaniac25.

 

I have another question, though... where could a list of parameters that can be passed to amr codec be found?, or what is referred in your post as "documentation"?. If amr codec can be configured, where is a list of parameters that can be tweaked?. I tried to search for it with no luck, and all what I could find was in posts here and there, but nothing "official".

The question comes from our need to reduce bitrate in order to decrease system latency when we send frames over a GPRS channel.

 

Thanks in advance.

Developer
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Media Encoding Strings for capturing audio with custom RIM parameters

I was looking at the API documentation for javax.microedition.media.Manager.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Regular Visitor
Posts: 1
Registered: ‎03-01-2011
My Device: Not Specified

Re: Media Encoding Strings for capturing audio with custom RIM parameters

Hi Steve,

Did you get any breakthrough on this? We also tried with several simulators and devices. But the output bahaves as the sameway even if we pass custom RIM Parameters. Please share some update if anyone has on this topic.

 

Thanks,

Arun