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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 35
Registered: ‎01-07-2009
My Device: Curve 8320
Accepted Solution

Play H264 video stream in media applicaton

[ Edited ]

Hi,

 

I am using the way of DataSource/SourceStream, following the article "How To - support streaming audio to the media application

 

I can get only H264 video stream from remote server, without audio stream or rtsp protocol or any container info.

 

Can I feed this H264 video stream directly to player? If so, I am not sure which MIME type to use for the function setContentType(). Should it be  "video/H264" or any other MIME types? I checked "http://www.rfc-editor.org/rfc/rfc3984.txt" and found that "This type is only defined for transfer via RTP". 

 

Appreciate for your help!

Developer
Posts: 35
Registered: ‎01-07-2009
My Device: Curve 8320

Re: Play H264 video stream in media applicaton

Finally I got H264 video stream play fine.

 

I got my BlackBerry9000(OS5.0) yesterday and tested that H264 video stream can be directly fed to player using InputStream. And the MME type should be "video/mp4". 

New Contributor
Posts: 3
Registered: ‎05-24-2010
My Device: 9500
My Carrier: worker

Re: Play H264 video stream in media applicaton

Are you play a raw h264 stream or remote rtsp/mp4 ?

Developer
Posts: 35
Registered: ‎01-07-2009
My Device: Curve 8320

Re: Play H264 video stream in media applicaton

Hi seloda,

 

It's a raw h264 stream.

New Contributor
Posts: 3
Registered: ‎05-24-2010
My Device: 9500
My Carrier: worker

Re: Play H264 video stream in media applicaton

[ Edited ]

Thank you for you replay .  

 

So I just need to send data to player frame by frame ?  Can you give me a demo ?  ppnext@163.com

 

Thank you 

New Contributor
Posts: 3
Registered: ‎05-24-2010
My Device: 9500
My Carrier: worker

Re: Play H264 video stream in media applicaton

 

                Class clazz = getClass();
                String PHOTO_DIR = System.getProperty ("fileconn.dir.videos");  
                InputStream is = clazz.getResourceAsStream("/test.264");
                player = Manager.createPlayer(is, "video/mp4");
                player.start();

 

Hi , I use these codes to play a raw h264 file. but failed! 

test.h264 file can be played by vlc.

Please help me!

 

Class clazz = getClass();        

 String PHOTO_DIR = System.getProperty ("fileconn.dir.videos");    

 InputStream is = clazz.getResourceAsStream("/test.264"); 

 

 player = Manager.createPlayer(is, "video/mp4");    

 player.start();

Visitor
Posts: 1
Registered: ‎09-03-2012
My Device: no
My Carrier: 18254152812

Re: Play H264 video stream in media applicaton

I am facing the same question.Could you please give me demo? thank you very much! my email:741376209@qq.com