3rd Party Media Player SDKs or other options - java

I'm writing an app for a multimedia website I frequent and I've run into a problem.
After grabbing a video stream URL (h264 wrapped in an mp4 container) and attempting to play it with the native video player, it fails. This is on my Moto Droid running 2.2 (BB) and 2.3 (CM7). I've tested the app on my Xoom (3.1 stock) and it works great. I've also had a friend test it on her Xperia Arc (2.3 stock as far as i know) and it worked for her. Makes me think it's a hardware decoder issue since I can play the stream fine using RockPlayer's software decoder but can't using the hardware one.
So I have three things here I want to find out:
Does the native Android player support software decoding? If so, how do I tell if it's using hardware or software, and is it possible to toggle?
Are there any third party media players with readily available SDKs (free)?
How can I just open the video in another app like Rock Player since I know it works? When I download a video using the browser, it asks me what video player I want it to use. How can I get this to pop up within my app and then send the video to it?

1) Does the native Android player
support software decoding. if so, how
do I tell if it's using hardware or
software and is it possible to toggle?
All you have is the default codecs. You can't "toggle" anything. The only alternative is to provide your own software codecs, built with the Android NDK and bundled in the APK.
2) are there any 3rd part media
players with readily available SDKs
(free).
The authors of MP4Box at GPAC provide Osmo4 for Android, an alternative video player built from scratch, software codecs included. It's open source:
http://sourceforge.net/apps/trac/gpac/browser/trunk/gpac/applications/osmo4_android
3) How can I just open the video in
another app like Rock Player since I
know it works. When I download a video
using the browser, it asks me what
video player I want it to use. How can
I get this to pop up within my app and
then send the video to it?
This kind of "popup" is called a chooser and can be created with an ACTION_VIEW intent, using something like:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "video/mp4");
startActivity(Intent.createChooser(intent, "View with:"));

1) Does the native Android player support software decoding. if so, how do I tell if it's using hardware or software and is it possible to toggle?
It most likely uses hardware decoders by default. There is default support for software decoder but you can't toggle them from the app level.

Related

How to make MediaBrowserService accessible from Android Auto?

I have implemented a MusicPlayerService by following the official guide from the Android Developers site. At multiple places, I have found the information that this should be enough to make my app ready for Android Auto.
But if I open that (just the phone interface because I don't have a compatible car at the moment), the list of music providers just contains Google Music and the already installed VLC media player. To verify I also downloaded, compiled and installed the Universal Music Player example, which isn't showing up either.
Do I have to enable something or even upload the app to Google Play first?
EDIT: I now tested it with the Desktop Head Unit and it works. Afterwards the service is also visible on the phone interface. But this is not the expected behavior, right?
Only apps installed through Google Play will be shown in Android Auto. If you want to test your app with the phone interface, you'll need to enable developer mode and the 'unknown sources' option in the developer settings.
https://developer.android.com/training/auto/testing/index.html#phone

Live-stream video from one android phone to another via bluetooth

I am intended to make an app that stream live videos from one android phone to other one via Bluetooth,i need a simple player and there is no need to save the file,just play it.
My knowledge about stream in java is not enough and I really don't know where to start!
Please help me in finding any solution. Any help will be appreciated.
There is a sample android project to do streaming live video and allows you take photos and record videos from remote phone via bluetooth.
BluetoothCameraAndroid
Android allows you to get frames as byte array using camera, you can use that api to get frames and send it across. But the problem is throttling the sending rate. That also has been handled in that project.
In marshmallow and above devices, you have to give permissions
manually in settings. This project does not include runtime
permissions
Xuggler is a Java opensource library that works with streaming and modifying media on the fly. you can start from it at:
http://www.xuggle.com/xuggler/

Is there a way to auto detect a camera (USB) on windows with Java/JavaFX?

My goal is to have a java application running, when the camera is plugged in or already plugged in, the program can auto detect the camera. After writing that sentence it doesn't seem possible in distinguishing between the USB drives on windows.
Can someone help me with pointing me in the right direction with allowing the user to specify the camera location? If the camera location is specified i should be able to auto-generate some sort of list of jpeg files on it correct?
My overall goal is to have a user enter a "job number", then from the camera (auto-detected or user location specified), the program automatically takes all the photos that exist on it, dump them into a folder named after the job number, then erase the photos on the camera.
It's like an auto photo storage dump pretty much.
I'm currently working with Eclipse and the JavaFX plug-in with using SceneBuilder.
libjitsi is an advanced Java media library for secure real-time audio/video communication. It allows applications to capture, playback, stream, encode/decode and encrypt audio and video flows. It also allows for advanced features such as audio mixing, handling multiple streams, participation in audio and video conferences.
Originally libjitsi was part of the Jitsi client source code but we decided to spin it off so that other projects can also use it.
libjitsi is distributed under the terms of the LGPL.
Feature list
Video capture and rendering on Windows, Mac OS X and Linux.
Video codecs: H.264 and H.263 (VP8 coming in early 2013)
.
.
.
More Info

BlackBerry Java Media Unsupported

I download an MP4 file from the internet and play it on the blackberry device. I get the following error: "the video portion of the media being played uses an unsupported format". The audio starts playing, but the video doesn't play, while showing this error.
It should be noted that this only happens on Device OS 5 & 6. The same video plays properly or OS 7 and OS 7.1. I am guessing this is because RIM included some updates to MMAPI. What could i do to allow devices prior to OS 7 play the videos? OS 5 & 6 devices play MP4 files, just not all of them.
I have been looking into custom decoding the bytes of the MP4 file, but that will take a lot of time, looking into existing decoder implementation before adapting to J2ME, not an easy task.
Any help would be great here.
Edit:
The video content owners have control of the videos on the server side, but arent willing to re encode, mainly due to size concerns on the server, even though i recommended they do as well.
The resolution of the video is about 720w x 400h. This is quite high for a BB, but Bold 9790 and Torch 9810 both play it without a problem. So why cant Bold 9780 play the same file?
Update:
Regarding the problem with the video playing on a 9790 and not a 9780, those are different devices. The 9790 came out about a year after the 9780, and apparently RIM added more capability.
From 9780 specs:
Video player DivX/WMV/XviD/3gp
From 9790 specs:
DivX/XviD/MP4/H.264/H.263/WMV player
So, that explains why you can't get that video to play on the 9780. If playing this video is fundamental to your app, you might change the settings in BlackBerry App World to list it as incompatible with 9780s. If this is only one of many features of your app, you might at least catch the media exception and inform the user gracefully that their device can't play the video requested, so they don't think it's your app's fault.
Original Answer:
MP4 actually contains a family of related formats.
The actual support for your video probably depends both on your BlackBerry OS version (e.g. 5/6/7) and also the device itself.
Here is a BlackBerry reference document that describes video format capabilities of various BlackBerry devices.
See also this reference document.
Of course, different devices also have different sizes of screens.
It might be useful for you to produce the videos in a variety of formats and resolutions, and have your BlackBerry app download different versions of the video depending on the device. Since video downloads are slow, doing it this way will also ensure that the user sees the fastest possible download on their device. There's no use downloading a higher resolution than the device can display.
You didn't specify whether you have control of the videos on the server side or not, so this may not be an option for you.

Streaming the desktop

I want to create a C++ cross-platform (Windows and MacOS X) application that sends the screen as a video stream to a server.
The application is needed in the context of lecture capture. The end result will be a Flash based web page that plays back the lecture (presenter video and audio + slides/desktop).
I am currently exploring a few options:
Bundle the VLC (the Video Player) binary with my app and use its desktop streaming features.
Use the Qt Phonon library, but it doesn't seem to be powerful enough.
Send individual screenshots plus a timestamp to the server instead of a video stream. The server then would have to create the video stream.
Implement it in Java and use Xuggler (BigBlueButton uses it for their Desktop Sharing feature)
...?
I would greatly appreciate your insights/comments on how to approach this problem.
I think VNC is a great starting point for a software solution. Cross platform and well tested. I can think of a couple commercial projects that are derived from VNC - Co-pilot from Fog Creek springs to mind.
But concider tapping in to the projector hardware to capture slides instead of installing software on every computer brought in by lecturers. I.e. a splitter and then a computer to capture the slide video signal as well as the presenter video signal.
Where I worked lecturers brought in a plethora of laptops for their presentations and rather disliked the idear of installing anything moments before their presentation.
I'd go for a hardware solution - a Mac mini with Boinx.
There are a bunch of screen streaming and recording software available, On the Windows platform you can use Windows media encoder to do this and even broadcast a live mms:// stream
Capturing the screen is not hard to do ( unless the content on the screen is overlay video or fullscreen 3d graphics ). Streaming it live is complicated, encoding and recording it to disk is quite straightforward with most multimedia frameworks ( Directshow, gstreamer )
My solution was to write a simple GUI application in Qt that invokes a VLC process in the background. This works really well.

Categories

Resources