I want to use OpenTok API for android.
I found example on github. and causes some exceptions like.
1.my video is not publishing.
2.I receive the stream but unable to get view.
3.pulisher.create(); cause exception.
Is this is only for jellybean os. how to implement it for lower version.
I am using it on my nexus s jellybean updated.
Any help will be thankful.
Here is OpenTok's Android repository. According to their readme, The supported devices are:
Nexus 4
Nexus 7
Nexus 10
Galaxy S3
Requirements for OS is Jelly Bean and up.
Live video streaming is CPU intensive, and lower end devices do not have the CPU capacity to handle multiple video processing for the streams in the session and not able to run OpenTok's SDK.
Related
I am recording audio for voice messages in the app using the following code.
MediaRecorder audioRecorder = new MediaRecorder();
audioRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
audioRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
audioRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC);
audioRecorder.setOutputFile(audioRecordingFile);
audioRecorder.prepare();
audioRecorder.start();
Use of MediaRecorder.AudioSource.VOICE_COMMUNICATION instead of MediaRecorder.AudioSource.MIC) is very helpful in recording pre-processed clean audios.
But, recently I found some issues in which the recorded files are empty are being reported on a few devices which were recently updated to Android 10. It should be noted that not all Android 10 devices have these issues, only a few i.e Nokia 6.1 and Mi A2.
There is no error or exception but just empty audio output files.
If I use MediaRecorder.AudioSource.MIC) then the issue is not seen.
I found the following information related to Android 10 and VOICE_COMMUNICATION
The Android 10 release includes the following requirements for capture with VOICE_COMMUNICATION.
Based on this I checked the availability of AcousticEchoCanceler,AutomaticGainControl and NoiseSuppressor using the following code.
AcousticEchoCanceler.isAvailable()
AutomaticGainControl.isAvailable()
NoiseSuppressor.isAvailable()
And found the same result on Mi A2 and OnePlus 6 with Android 10. Both of the devices show AcousticEchoCanceler and NoiseSuppressor as available and AutomaticGainControl as not available.
Since the issue is not present on all Android devices, I don`t want to fall back on using MediaRecorder.AudioSource.MIC). At the same time, there is no error, exception or differentiating factor which tells me when to fall back on MediaRecorder.AudioSource.MIC).
UPDATE: The issue gets resolved when Google Assistant is turned off on Mi A2.
This might be the pointer : https://developer.android.com/guide/topics/media/sharing-audio-input
Any help regarding this is appreciated.
I ended up using MediaRecorder.AudioSource.VOICE_RECOGNITION instead of MediaRecorder.AudioSource.VOICE_COMMUNICATION on all android versions.
We ended up taking samples on 15+ different devices and found out that MediaRecorder.AudioSource.VOICE_RECOGNITION works best with the majority devices including high-end and mid-range phones.
As per my understanding, the original issue faced on few devices on some devices seems like implementation issues by the OEMs with respect to Android 10 and VOICE_COMMUNICATION https://source.android.com/devices/audio/implement-pre-processing
I am running application on Samsung Galaxy Tab 2 10.1, which plays HLS streams, encrypted by Verimatrix. I am using 3rd party player integrated in my app. Streams switch quality among three profiles,
<= 1MBps,
<= 1.6MBps
and
<=2.6MBps.
Playback is OK at low and medium, but at high, occasionally, tablet freezes completely and has to be rebooted manually. Anybody got similar experience? Is this sign of high demands of application on device? I am trying to find out root cause. Any hint appreciated. Thanks.
Well, I got this problem on my Galaxy Tab 7 too. I read on some sites that the problem is on HLS android implementation.
The following links talks about Android's HLS problems.
The Pain of Live Streaming on Android
http://www.jwplayer.com/blog/the-pain-of-live-streaming-on-android/
The Definitive Guide to HLS
http://features.encoding.com/http-live-streaming-hls/
I want to write an game for Android. To present it very well, it has to have an YouTube movie in the Google Play Store.
How can I do this? Because ADB only produce a slideshow, because it's to slow. Is there an app for recording out there?
PS: I only have Tegra devices (Galaxy Nexus and Nexus 7), so http://pkg.to/com.ms.screencast doesn't work, yet.
The new Android 4.2 has a wireless display feature allowing the send the screen's content to TV screens etc. As you have Nexus devices I guess you'll get the update very soon. I do not know the technical details but I'm quite sure there will be possibilities to record the sent signal.
See this anouncement: http://www.android.com/whatsnew/
You may want to try using the emulator and record using a regular video recording program such as FRAPS. The performance of the x86 emulator has improved greatly and also supports GPU emulation.
Here is a page from the Android documentation outlining how to enable hardware acceleration for the emulator:
http://developer.android.com/tools/devices/emulator.html#acceleration
The downside to this approach is that multi-touch gestures aren't easy to do.
I am working on playing a video in my application, and I am observing some strange results in doing so. Videos that I am trying to play are on server and I have to get them to run android's native videoplayer.
I have tested the results on several devices and it is found that video runs on devices having OS version greater than equal ton 2.3.3 but does not run on others, showing error (1, -1). Now my question is that either the later OS versions have some extra Video codecs and format support and that is because the video gets played on them or it's something else? Why so is this error on few devices not on all?
Devices on which Video Works fine in native videopalyer:
Samsung Google Nexus with OS 4.0.1
Samsung Galaxy S with OS 2.3.3
Devices on which does not get played:
HTC-Desire with OS 2.2
Samsung Galaxy S with OS 2.2
Any help about the issue is always appreciated.
This error may occur due to many reasons. Issue might lie videoplayer, as well source from where you are reading the video, Is video coming from HTTp server or RSTP server...any of these can be the reason. You'll have to check accordingly. In our case, we solved it by using Video View and also made changes to URL to get it played.
I'd like to switch from using MP3 encoded audio files to AAC+ for voice sound files stored inside an Android app. This will make the install size smaller.
A problem I encountered is that AAC+ support was broken in the Froyo release of Android:
http://code.google.com/p/android/issues/detail?id=9308
It was later fixed:
https://android.googlesource.com/platform/frameworks/base/+/16263d9f8cc01392c2f3678b381ce897647c8c81
The Pandora FAQ apparently confirmed some phones were updated over the air, but warned about other phones:
Why am I experiencing audio issues on Froyo?
If you have upgraded to Froyo (Android 2.2), you may notice audio-quality issues while listening
to Pandora. The Android team is aware of this issue with AAC+ audio and has released a fix, which
is gradually being rolled out on the various Android handsets.
Currently the Sprint HTC EVO and the Google Nexus One have OTA Android OS updates that
incorporate this AAC+ audio fix.
If you have a different handset than the two mentioned, please contact the support team for your
handset if you have any further questions about this issue.
Have all Froyo phones been updated to include this fix? Or are there some carriers/manufacturers not bothering? Such is very common with Android, as they claim testing updates is too expensive.
My Flurry metrics are showing Android 2.2 at 33.2%, 2.2.1 at 12.2%, 2.2.2 at 0.1%. So if the fix only came with a version number change, it isn't out to most Froyo phones.
Based on the time of that commit, it was probably fixed in 2.2.1. Since there is no SDK level change in 2.2.1/2.2.2, Google doesn't track its usage separately from 2.2. Gingerbread and Honeycomb make up 19.5% of total installs as of July 5, 2011, and they all have the AAC+ fix for sure. Most manufacturers and carriers don't release any updates other than major ones (OS upgrades), so I would estimate that approximately 25% of all devices have this fix. You could also try using Ogg Vorbis, as support for it is built into all versions and the voice profile may be sufficient for what you plan on using it for.