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
Developer
livepanda
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!

Please use plain text.
Developer
livepanda
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". 

Please use plain text.
New Contributor
seloda
Posts: 3
Registered: ‎05-24-2010
My Device: 9500

Re: Play H264 video stream in media applicaton

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

Please use plain text.
Developer
livepanda
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.

Please use plain text.
New Contributor
seloda
Posts: 3
Registered: ‎05-24-2010
My Device: 9500

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 

Please use plain text.
New Contributor
seloda
Posts: 3
Registered: ‎05-24-2010
My Device: 9500

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();

Please use plain text.
Visitor
miaofaqiang
Posts: 1
Registered: ‎09-03-2012
My Device: no

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

Please use plain text.