×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    how to build a custom video player

    Hi all,
    I'm new to mobile development on Nokia. I'm trying to understand how I could build a video player that gets a stream from HTTP.
    At the moment I'm just checking the feasibility, I read here:
    http://www.forum.nokia.com/main/reso...es/audiovideo/

    "Use network APIs (RSocketServ, RConnection, RSocket) to connect to the network (2). Then use CMdaAudioOutputStream for audio rendering (1) and CDirectScreenAccess APIs for video rendering."

    But it says nothing about the API to use for decoding the video and audio packets.

    Besides I wanted to ask if it's possible to develop just the player and network in c++ and the GUI in Flash lite or Java.
    Not sure you can use different languages inside the same application.

    Thanks in advance for any answer.
    Bye

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,698

    Re: how to build a custom video player

    Quote Originally Posted by Melmoth View Post
    "Use network APIs (RSocketServ, RConnection, RSocket) to connect to the network (2). Then use CMdaAudioOutputStream for audio rendering (1) and CDirectScreenAccess APIs for video rendering."
    This quotation describes the way should be followed when implementing a custom streaming protocol. In that case video decoder would also be a proprietary one, developed by you.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    Hi,

    This isn't easy. For video decoding, if you are targetting the majority of existing devices in the market then you'll either have to partner with Nokia/Symbian to get the appropriate APIs or port/buy your own video codec.

    If you are looking to the future (and latest devices only) then you might possibly be able to use the MDFDevVideo Playback API which is available in the SDK API Plug-in for S60 3rd Edition FP2. You'll probably want some tech support to use that as well though.

    In fact, if you aren't in a hurry you might want to wait and join the Symbian Foundation to get access to the full source code!

    Audio is easier. Some compressed formats are supported directly in CMdaAudioOutputStream or CMMFDevSound (which sits underneath it). Others have codecs which you can access via CMMFCodec, although the support for this is not uniform across the device range so you have to be a bit careful.

    You can mix Flash Lite or Java with Symbian C++, although there are some limitations. Look at KuneriLite, for example, to see what is possible.

    Hope that helps,
    Sorcery

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    thank you both for the detailed answers,
    basically I just need to play a video (mp4 as a container, h264(Baseline profile) as video track and aac as audio track).
    On the PC/Mac I can take advantage of the libav from FFMpeg, I was just wondering if I had the same level of access on the Symbian S60 series.
    I read those codecs are supported and on some devices there could even be a h264 hardware decoder.

    I couldn't find much documentation about h264/aac decoding API on S60.

    Bye

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,698

    Re: how to build a custom video player

    Accessing those API-s, especially with hardware acceleration is (at least) hard. An old thread in the topic: http://discussion.forum.nokia.com/fo...d.php?t=118549

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    Hi,
    I tried to look the doc for MDFDevVideo
    But the page:
    http://wiki.forum.nokia.com/index.ph...o_Playback_API
    has just the titles.

    Do I have to ask Nokia for the docs?
    thanks

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    Well, you could download the SDK API Plug-in and see what's in there (most of the Symbian documentation is auto-generated from the header files anyway!). The only public example code that uses it I'm aware of is the Sybmian Helix client (google for it).

    You could try a technical support request (and you'd need an API partnering request if you want to use it on pre-FP2 devices) from Nokia to get access to more documentation, I'm not sure what's available. The actual API is defined/owned by Symbian though so you might want to go to them for documentation.

    There are no binary compatibility guarantees for these APIs so you could end up with a lot of versions to get it working across the range.

    Sorcery

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    I downloaded the MDFVideoPlaybackAPI Plugin, it seems interesting but no samples to start developing.
    I'm still trying to understand what's the best for my purposes.
    I don't want to go into packets level (sync AV, threads..) if I can take advantage of some already present player.

    Are the Java API's (JSR-135) easier to use and suporting different codecs or input streams.
    Or should I use CVideoPlayerUtility that seems to take advantage of hardware decoding?
    Are those just a RealPlayer wrappers?

    http://www.forum.nokia.com/main/reso..._tables_1.html

    Thanks

  9. #9
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    I think you're out of luck. I wouldn't advise anyone to try using JSR-135 unless they have to - it's probably the most fragmented API in the world with different parts supported in different ways with all kinds of different limitations on the various devices. On S60 for video it does just give you a wrapper for the RealPlayer Engine though - like CVideoPlayerUtility.

    CVideoPlayerUtility is definitely the easy API to use. Unfortunately it doesn't currently support HTTP streaming or streaming of data via descriptor buffers (you can only play an entire clip in a descriptor). The AV sync is implemented in the RealPlayer Engine so you'll have to do that stuff yourself if you want to use any lower level API.

    Sorcery

  10. #10
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    Thanks again,
    so what do you think I should start to investigate?
    I can even adapt the codec used in the video source to have less to do on the client side. Will encoding my videos to stream in RealVideo can help?

    I can start understanding the MDFVideoPlaybackAPI if I'm sure can do the job.

    In few words what I need is:
    - Put some video on a HTTP server (encoded as I wish)
    - Stream it in progressive download (start play it while downloading) on a N95 device.

    There are many documents the nokia and symbian sites and I'm reading all I can, but I'm getting quite confused the more I read.

    Bye

  11. #11
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    For progressive download I think you should go for a technical support request from Forum Nokia. There is definitely some support for this in the system but I'm not sure how it is implemented. Here's some old discussion about it from 2006:
    https://helixcommunity.org/viewcvs/f...wn/symbian.pcf

    I haven't checked up on this recently but I think the plan was to switch from the RealPlayer to the Helix DNA client in FP2. I think the Helix client is supposed to support progressive download already.

    Also there was a thread on here recently where someone was managing to fool the system by simply filling the file while it was playing, although obviously whether that is possible will depend on the format. I wouldn't reccomend that as a robust solution.

    Good luck.

    Sorcery

  12. #12
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    I used the solution you told about the file filling on the PC using FFmpeg.
    What I'm missing here are the same API to treat the video and the HTTP.
    Maybe I'll look for that thread

    thanks

  13. #13
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    If I remember correctly the tricky thing in that case is simply sharing the file between threads - you have to set that up explicitly on Symbian.

    Be aware that the controller plug-in that sit behind CVideoPlayerUtility expect a complete file and may check things (like the length of the clip) before they start playing.

    Sorcery

  14. #14
    Registered User
    Join Date
    Jul 2008
    Posts
    21

    Re: how to build a custom video player

    Thanks, I'll try something there.
    Is it possible to retrieve that post?
    Does CVideoPlayerUtility use hardware h.264 decoding?
    Bye

  15. #15
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to build a custom video player

    Here's the last time it came up:
    http://discussion.forum.nokia.com/fo...d.php?p=421095
    plus another related one:
    http://discussion.forum.nokia.com/fo...d.php?t=131841
    I can't find the original but here is the link you need to the Symbian documentation:
    http://www.symbian.com/developer/tec...eModeEnum.html

    Whether or not CVideoPlayerUtility supports H.264 depends on the device model. In most if not all cases this will be hardware accelerated (there are some devices that have all ARM codecs but I don't think they support H.264).

    Sorcery

Similar Threads

  1. Controlling video DVBH player
    By gemilib in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2007-10-08, 21:28
  2. Tools To Build Video App for N95
    By johnshearing in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2007-09-21, 17:56
  3. Controlling the Video Player
    By er_benji in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-06-25, 13:46
  4. video player for s40 6280 6270 6265 PLEASEEE!!!!
    By expertlx in forum Mobile Java General
    Replies: 6
    Last Post: 2007-01-29, 07:14

Posting Permissions

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