Increasing video height and width in Blackberry player screen - blackberry

I am playing video in Blackberry,it plays well but i need to show the video in full screen mode.Now it plays video with spaces at top and bottom i have to play in full screen
For this i used methods
videoControl.setDisplayFullScreen(true);
_videoControl.setDisplaySize(Display.getWidth(),Display.getHeight());
But those are not working how can i solve this.

The video player can be incredibly fickle when it comes to what sizes it will display. From my testing, it seems that you have to hit one of the magic ratios (half size seemed to work pretty reliably) or it just won't show anything.
Rather than setting the size that would equal fullscreen as well as telling it to be fullscreen, you should probably use VideoControl.setDisplayFullScreen() without the setDisplaySize()
I have an answer about camera programming that might help Black berry camera programming

Related

AVCaptureVideoPreviewLayer issues with Video Gravity and Face Detection Accuracy

I want to use AVFoundation to set up my own camera feed and process the live feed to detect smiles.
A lot of what I need has been done here: https://developer.apple.com/library/ios/samplecode/SquareCam/Introduction/Intro.html
This code was written a long time back, so I needed to make some modifications to use it the way I want to in terms of appearance.
The changes I made are as follows:
I enabled auto layout and size classes so as I wanted to support different screen sizes. I also changed the dimensions of the preview layer to be the full screen.
The session Preset is set to AVCaptureSessionPresetPhoto for iPhone and iPad
Finally, I set the video gravity to AVLayerVideoGravityResizeAspectFill (this seems to be the keypoint)
Now when I run the application, the faces get detected but there seems to be an error in the coordinates of where the rectangles are drawn
When I change the video gravity to AVLayerVideoGravityResizeAspect, everything seems to work fine again.
The only problem is then, the camera preview is not the desired size which is the full screen.
So now I am wondering why does this happen. I notice a function in square cam: videoPreviewBoxForGravity which processes the gravity type and seems to make adjustments.
- (CGRect)videoPreviewBoxForGravity:(NSString *)gravity frameSize:(CGSize)frameSize apertureSize:(CGSize)apertureSize
One thing I noticed here, the frame size stays the same regardless of gravity type.
Finally I read somewhere else, when setting the gravity to AspectFill, some part of the feed gets cropped which is understandable, similar to ImageView's scaletoFill.
My question is, how can I make the right adjustments to make this app work for any VideoGravity type and any size of previewlayer.
I have had a look at some related questions, for example CIDetector give wrong position on facial features seems to have a similar issue but it does not help
Thanks, in advance.

Brightcove Player Issue on IOS

I am working on iPhone application where i have included bright cove SDK to play video. I am able to play video but found letter boxing issue around sides of player view(black space on top and side bar). How can i avoid letterboxing around UIView corners? it would be great if you can provide any example or any sample code.I am attaching screenshot for player as well.
Get the ratio of the video from the video properties:
video.properties[kBCOVCatalogJSONKeyFLVFullLength][#"frameWidth"];
video.properties[kBCOVCatalogJSONKeyFLVFullLength][#"frameHeight"];
Then adjust the size of your video player view (playbackController.view) to suit the required height. This may involve the view being wider than its parent and clipping of the left and right sides, but will achieve the desired result.

how to capture a video in specific part rather than full screen in iOS

I am capturing a video in my IOS app using AVFoundation. i am able to record the video and able to playback also.
But my problem is that i am showing the capturing video in a view which is around 200 points height.so i expected the video would be recorded in the same dimensions.but when i playback the video its showing that the whole screen has been recorded.
so i want to know is there any way to record the camera preview which was visible to user only.And any help should be appreciated.
the screenshots:
()
()
You cannot think of video resolution in terms of UIView dimensions (or even screen size, for that matter). The camera is going to record at a certain resolution depending on how you set up the AVCaptureSession. For instance, you can change the video quality by setting the session preset via:
[self.captureSession setSessionPreset:AVCaptureSessionPreset640x480]
(It is already set by default to the highest setting.)
Now, when you play the video back, you do have a bit of control over how it is presented. For instance, if you want to play it in a smaller view (who's layer is of type AVPlayerLayer), you can set the video gravity via:
AVCaptureVideoPreviewLayer *previewLayer = (AVCaptureVideoPreviewLayer*)self.previewView.layer;
[previewLayer setVideoGravity:AVLayerVideoGravityResizeAspect];
And depending on what you pass for the gravity parameter, you will get different results.
Hopefully this helps. Your question is a little unclear as it seems like you want the camera to only record a certain amount of it's input, but you'd have to put your hand over part of the lens to accomplish that ;)

Zoom OUT for fullscreen projection?

I have a home theater setup and the beam is just barely too wide, and I'd like the video to come in a bit. I'm really surprised there is no was to zoom out, as in add black boxing to the video/squeeze it in. Any thoughts?
With O (key), you set auto-scaling to "Original Size". Then, Alt-O and Alt-Shift-O increase and decrease scale factor.
Take in mind that Alt-O and Alt-Shift-O don't work on "Scaled to screen" auto-scaling.
The hot keys are in this vlc page.
Looks like VLC has a zoom feature under Window > Video effects...
Video Magnification/Zoom In & Out
Another intriguing feature is Video Magnification. Under Geometry tab,
enable Magnification/Zoom option, to let it zoom in/out the video. You
will see a small window at top left corner with the main magnification
control. Fill in the triangle by clicking it to zoom into the video.
To view the desired video portion, move the square capturing screen
across the box.
VLC Player - Interactive zoom / Magnify
First go to VLC installation directory and than execute this command
vlc --video-filter "magnify" "path/to/video"

How to screen record the iOS simulator at 60 fps?

It turned out that capturing video from the screen is a hard task on the Mac. I have a small game running in the simulator and want to make a screencast of the gameplay for youtube. Since it's a fast-paced scroller game, video must be recorded at 60 fps to look good.
I know the actual video on youtube for example is just 24 to 30 fps, but each such slow frame is blended with another.
When capturing the simulator at a lower frame rate than 60 fps the result is jagged a lot since every frame is razor sharp with no blending.
I tried a couple of Mac screen recorders but none of them were able to capture 60fps video from the simulator, and the frames in the resulting video looked like if the app took plenty of screenshots and stiffed them together into a video container.
But since there are great demo videos on youtube showing fast-paced gameplay of iOS apps without just recording the screen with a video camera, I wonder what kind of application they use to get a smooth screen capture.
Hopefully someone who already went through this problem can point out some solutions.
I've had good results screen recording from the simulator using SnapZ Pro X from Ambrosia software:
http://www.ambrosiasw.com/utilities/snapzprox/
One problem that you're likely to have is that the simulator only simulates iOS's OpenGL graphics in software, so unless you have a really powerful Mac, it's likely that the simulator won't be able to run your game at 60fps anyway.
It's possible that the videos you've seen used the HDMI video out on the iPhone to mirror the screen from the device into a video capture card on the computer. That would likely perform much better because the Mac wouldn't have to both generate and record the graphics simultaneously.
I remember watching a video of the Aquaria guys talking about how they recorded their gameplay videos. Essentially the game recorded the input from the controller/keyboard while the game was played normally. Then they could play back the game they had just played but one frame at a time, with each frame being rendered out to a file as it went. Then all those frames are composited together and bam, a full 60fps video with perfectly rendered graphics. Bit overkill but it's a nice solution.
A program that is able to record at 60 fps is Screenflick.

Resources