×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    13

    Audio Streaming in j2me

    Hi
    I am doing audio Streaming in J2me , i am created Two player when First player fill buffer it start playing stream and in background second player start filling the buffer.
    When first player complete the playing of stream,the second player start playing.
    But In switching from first player to second player there is 1-3 seconds of delay.

    Please help me how can i solve this issue.

    Urgent!!

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Audio Streaming in j2me

    Quote Originally Posted by devdhar.s View Post
    Hi
    I am doing audio Streaming in J2me , i am created Two player when First player fill buffer it start playing stream and in background second player start filling the buffer.
    When first player complete the playing of stream,the second player start playing.
    But In switching from first player to second player there is 1-3 seconds of delay.

    Please help me how can i solve this issue.

    Urgent!!
    Solution - you need to program it such a way that you provide an overlap between the two players, i.e. you start the 2nd player 1-3 sec's before the 1st player reaches its end.
    Thanks,
    Ekta

  3. #3
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Audio Streaming in j2me

    1-3 seconds is a lot, afaik if you use the PlayerListener interface and you get a END_OF_MEDIA signal you should be able to start the next one in about half a second...
    But this only if you have prefetched and realized aforehand the player which needs to be started...
    Overlapping the players will be very very difficult and device-dependant... You don't want to stay in a while loop continuosly checking the "time played" of the player to know if you are 1 or 3 seconds from the end... This obviously will keep your cpu pretty busy (doing nothing mostly) and if your application is somewhat big and graphical it will be very slow and laggy...
    there is a reason why there aren't any decent streaming apps around, and that reason is not because nobody thought of it or tried to implement one
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Audio Streaming in j2me

    A workaround can be -- get the duration of the buffer or chunk that you are going to play, start it --start a new thread pre-fetch the next chunk and wait (sleep) for the duration left for the first player - 500ms and launch the next player.
    No need to check the timeplayed, try with Player.getDuration() and put in some logic to take care of the time, next prefech and start of the next player.
    Thanks,
    Ekta

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Audio Streaming in j2me

    yup, there is only one problem, those 500ms will be device-dependant (some devices will need 500 ms, some 700 ms, some 300ms) and variable.. The same device will need less/more every single run... I can assure you that this has been tested severl hundreds of hours on different devices Already very sophisticated algorithms have been thought of and developed which try to measure those timings, unfortunately the platform is not any good for that.. To begin with (as an example) the END_OF_MEDIA callback has a delay, which again is device dependent and again it fluctuates... Also obviously it's not running on a RTOS, and that is pretty annoying because a human will be able to distinguash a gap as low as 50 ms...
    I know theoretically it sounds pretty easy or feasable, again do you have any streaming app which works good continuesly or for longer periods of time ?
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  6. #6
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Audio Streaming in j2me

    Yes, its easy to switch to RTSP or try progressive download where supported by the implementation for JSR 135 (S40 3rd edition onwards).

    Try progressive_download; enable as an attribute to the midlets jad

    http://library.forum.nokia.com/topic...07D600775.html

    http://library.forum.nokia.com/index...E4A538FB8.html
    Thanks,
    Ekta

  7. #7
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Audio Streaming in j2me

    just be advised progressive download actually only works for the S40 platform... Which means that MOST S40 don't support 3g, which again means very very poor quality (as in bitrate) is supported...
    And the rtsp implementation for the MMAPI works... barely... You want quality ? Don't go for rtsp...
    I still have to hear a decent streaming player, the standard options that come with the MMAPI and/or rtsp and/or progressive download on S40 are very very lacking in quality... I guess that if you are happy with stut... stutt... stuttering audio or a bad 32 kbit mp3 stream you are well served...
    Other codecs (like aac+) aren't supported that well unfortunately... Or at least not with the MMAPI, the realtime player which is shipped with most S60 on the other hand works decently...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    2

    Re: Audio Streaming in j2me

    Hi

    iam anew j2me developer and iam working now in aproject. one of project's function is to make audio streaming.I reached to code that make avideo streaming and it's working properly,but i cant make audio streaming.please help me to make audio streaming using http ,without rtsp.please if there is any code samples to help me.my mail is
    adel.fci.egy@gmail.com
    thanks

  9. #9
    Registered User
    Join Date
    Feb 2012
    Posts
    2

    Re: Audio Streaming in j2me

    would you please help me with just a quick code snippet on how to stream my S40 nokia 300 camera, I want to test if possible to use it as autonome video resource with java (I want to use it over 3G network to watch its video), thanks

  10. #10
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Audio Streaming in j2me

    Hello anis2005,

    and welcome to Nokia Developer Discussion Boards!

    If you are referring to how to use Nokia 300 for streaming video, you might want to check these resources:

    How to play video streaming in Java ME

    Java Developer's Library > Implementation notes > (JSR-135) Mobile Media API > Series 40 class and interface description > Streaming

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  11. #11
    Registered User
    Join Date
    Feb 2012
    Posts
    2

    Re: Audio Streaming in j2me

    Hi r2j7,

    Thanks soo much for this really helpfull information, I really appreciate that,

    I also want to share what I have also found in sun website :
    "Camera

    MMAPI includes support for a camera, with a special locator capture://video used to create its Player. An application can use the VideoControl to display a viewfinder on the screen, then take a picture using VideoControl.getSnapshot(String imageType). The default image format is PNG. You can use the imageType parameter to select any other supported format, and query the system property video.snapshot.encodings to find out what formats are supported.

    "
    http://developers.sun.com/mobility/m...mmapioverview/

    Hope this will be working once used on my phone, so i can access its camera from a second phone directly or over the Internet,

    Regards,
    Anis

  12. #12
    Registered User
    Join Date
    Aug 2012
    Posts
    6

    Re: Audio Streaming in j2me

    Hi
    I am trying to develop a video streaming application whereby i need to use setMediaTime as i have one video clip at server which i need to show in parts. But the issue that i am facing is i am not able to setMediaTime on devices like E71, E72. The setMediaTime is working just for S60 5th edition and above. Any suggestion would be helpful?

    Thanks
    Neeraj

  13. #13
    Registered User
    Join Date
    Dec 2012
    Posts
    4

    Re: Audio Streaming in j2me

    Hi Everyone

    We are developing an audio streaming application, can we define the access points from our application for streaming? Actually if streaming access point is defined as none so the player does not start giving an exception. Can we set the access point from our application?

    Regards
    Rahul

  14. #14
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Audio Streaming in j2me

    Actually I don't think so, that wouldn't be very "safe", which is the idea of sandboxed J2ME...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  15. #15
    Registered User
    Join Date
    Dec 2012
    Posts
    4

    Re: Audio Streaming in j2me

    So we need to ask user to set the access points manually?

Similar Threads

  1. Audio Streaming in J2me
    By devdhar.s in forum Streaming and Video
    Replies: 1
    Last Post: 2010-06-29, 06:49
  2. j2me audio streaming in audio call
    By wasantha.uwu in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2010-06-08, 11:33
  3. j2me audio streaming with two players
    By viheaho in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2010-03-12, 13:28
  4. audio streaming using j2me
    By niveas in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-03-24, 20:16
  5. Audio Streaming in J2ME....
    By senthilkumar05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-02-22, 14:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×