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
New Developer
Posts: 8
Registered: ‎01-28-2010
My Device: Bold 9700
My Carrier: AT&T

problem in video recording using MMAPI with JDE 5.0

I am using JDE Component Package 5.0.0 (beta) and a Bold 9700 device and the 9700 simulator.

I am trying to record video and save it into a file.

Below is a snippet from my code.

 


            _player = Manager.createPlayer("capture://video?encoding=video/3gpp&mode=standard");

            _player.start();
            _video = (VideoControl) _player.getControl("VideoControl");

                _fileConnection = (FileConnection) Connector.open(_filepath, Connector.READ_WRITE);
                if(!_fileConnection.exists()){
                    _fileConnection.create();
                }
                _fileConnection.truncate(0);
                _outputStream = _fileConnection.openOutputStream();

            _recorder = (RecordControl) _player.getControl("RecordControl");
            if(_recorder!= null){
                _state = STATE_RECORDING;
                _status.setText("Recording");                
                _recorder.setRecordStream(_outputStream);
                _recorder.startRecord();
            }
            else{
                Dialog.alert("Could not get RecordControl!");    
            }

 

A file is generated after the following steps:

 

            _recorder.stopRecord();
            _recorder.commit();
            _outputStream.close();
            _fileConnection.close();

 

The device (Bold 9700) can play the generated file (named video.3gp in my case). But the file  is not recognized by Real Player on PC. A 3gp file parser program does not parse the file either.

 

A file produced usign the built-in video camera application is recognized and played by Real Player on PC.

 

I looked into the data of the two video files using a hex editor and found the data in the file header part are different.

 

Instead of _recorder.setRecordStream, I also tried  the approach of using  setRecordLocation(_filepath) following the sample code. setRecordLocation() function does not generate a file.

 

So I just compiled the videorecorddemo project from the JDE 5.0.0(beta) and ran the program on Bold 9700. It could not play the generated file is empty when I selected the 'record to stream' option. The program hang when I did not select the 'record to stream' option.

 

Your kind advice would be appreciated.

New Contributor
Posts: 7
Registered: ‎04-01-2008
My Device: Not Specified

Re: problem in video recording using MMAPI with JDE 5.0

I am having the same issue.

 

I am using the application in this sample code:

http://docs.blackberry.com/en/developers/deliverables/11942/CS_record_video_without_using_the_camera...

New Member
Posts: 1
Registered: ‎07-12-2010
My Device: 9000
My Carrier: Software Engineer

Re: problem in video recording using MMAPI with JDE 5.0

Hello all!

 

I have the same problem with JDE 5.0.0.25.

 

I tried to test the sample code in a Blackberry Bold 9000 (With the OS v5.0.0.190 installed) and it did not work. I would like to know if someone has a workaround or something that we have missing.

 

Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: problem in video recording using MMAPI with JDE 5.0

Recordstream is not problem, but video does not have audio information.

 

RecordLocation doesn't work for me, and the video files always shows 0 byte.

 

 

-Fight with BB10
Contributor
Posts: 12
Registered: ‎09-16-2010
My Device: 9000
My Carrier: t-mobile

Re: problem in video recording using MMAPI with JDE 5.0

Even I am also facing the same issue .. the videoRecordingDemo in blackberry samples doesnt work at all.

Even if it saves, its always 0 KB..

 

Did any of people get any solution?

 

--B

Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: problem in video recording using MMAPI with JDE 5.0

[ Edited ]

Please try to import Eclipse/BlackBerry Samples/VideoRecordingDemo for OS 6.0 / 7.0.

The setRecordLocation works well.

 

 

-Fight with BB10