how to play .3gpp on PC in java

53 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Jun 25, 2017, 9:56:57 AM6/25/17
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA Netbeans 8.2
Desktop OS Windows 10
Simulator 3.6
Device Samsung 4s initially

I have a Java RMI project that runs on a PS Server running Java 1.8_.0_131 64bit where we store audio, video and photos.
Using the codenameone Capture.captureAudio() class (according to recommendations I have seen here) requires us to save as .3gpp file extension.

This all works fine to save the audio clip to my PC Server and retrieve it and play back on my Galixy 4s,however I need to be able to
play these recordings on the Java PC. However All I have seen is that Java does not support this format.

Is there a codenameone method to force the Modern Mobile devices to save is a more universal format?

Shai Almog

unread,
Jun 26, 2017, 12:32:40 AM6/26/17
to CodenameOne Discussions, shop.servic...@gmail.com
I'm not sure who recommended that. I would use mp4 for modern devices and that should work everywhere.

An important thing to keep in mind if you are streaming data is that iOS doesn't support HTTP and requires HTTPS. Unfortunately JavaFX (which we use for media playback) doesn't support HTTPS only HTTP...

mark....@comcast.net

unread,
Jun 27, 2017, 5:34:09 PM6/27/17
to CodenameOne Discussions, shop.servic...@gmail.com
Sorry, I did neglect to mention .MP4, However unfortunately Java 1,8 does not support MP4 as  far as I have found, Java 1.8 does support MP3 or WAV etc.
Does Codenameone have the ability to convert .MP4 to .MP3 or .WAV ?

Shai Almog

unread,
Jun 28, 2017, 12:11:07 AM6/28/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
Sorry I was assuming you were referring to video.
MP3 and WAV will work great.

shop.servic...@gmail.com

unread,
Jun 28, 2017, 9:59:02 AM6/28/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
The real question is Does Codenameone have the ability to convert .MP4 to .MP3 or .WAV
The assumption and some testing suggests that (At least on Android) that The resulting audio format is MP4

I'm looking to generate a MP3 or WAV file from Android VIA Codenameone so that my PC clients running Java 1,8 can play

Thoughts?


On Wednesday, June 28, 2017 at 12:11:07 AM UTC-4, Shai Almog wrote:

mark....@comcast.net

unread,
Jun 28, 2017, 8:51:24 PM6/28/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
Just to provide a little more of what my environment is:
My product is hosted in a cloud on an Windows 10 Server. our Mobile client needs to take videos and audio recordings, send them to the Windows server where there stored as bytes in a postgres database. All PC java clients as well as mobile clients need to be able to download these files and play on the local device.
Unfortunately java 1.8 does not support MP4. So what I and asking is a method to convert these files to a format that is supported on Desktop java 1.8

Sorry to be long winded.
Any help would be appreciated.

BTW: Codename one is a great product and you folks have done a great job! I love the approach to abstract the end devices from developers.
I think you will do very well. Congrats!

Shai Almog

unread,
Jun 28, 2017, 11:59:29 PM6/28/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
Thanks!

No we can't transcode. That's something no native API supports. Apps that do that usually bundle a tool like ffmpeg which you can embed into a Codename One app just like a native app would but the instructions of doing that... Well. I haven't done that myself and it would be hard (regardless of native or Codename One).

However, we have a couple of developers with similar products and what they generally do is transcode on the server side to support that various OS's.

Shai Almog

unread,
Jun 29, 2017, 12:00:06 AM6/29/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
FYI on the server side you can just use the ffmpeg command line

shop.servic...@gmail.com

unread,
Jun 29, 2017, 8:53:26 AM6/29/17
to CodenameOne Discussions, shop.servic...@gmail.com, mark....@comcast.net
Thanks, That will work.
I had this as a backup if not possible on the device.

Thanks.


On Thursday, June 29, 2017 at 12:00:06 AM UTC-4, Shai Almog wrote:
Reply all
Reply to author
Forward
0 new messages