Gstreamer streaming over udp - android

I have ported gstreamer to android and I am using eclipse (juno). Now, I am able to receive audio stream over udp, but when I try to give any video clip as input, I get the error, amcaudiodec-omxgoogleacdecoder - Gstreamer encountered an internal library error. I dont know how to solve this decoder problem. Any idea regarding what might the error could be?
Also, I wanted to know what is the difference between the plugins playbin and playbin2. Can anyone please explain?

You would have to add "androidmedia" plugin to the Android.mk file, as per plugins.mk file.
I suspect, as you have not included this in your Android.mk, playbin is trying to internally invoke this element, hence the lob

I'm not sure about this, but your problem may be that you cannot use a pipeline meant to play audio files to play a video file.
Video files are usually in a container format such as .avi, .mkv which need to be demultiplexed into separate audio and video streams. Once you have this audio stream you can apply your audio pipeline to play audio.
Here's an example pipeline to play audio while ignoring video: (Try it on the command line)
gst-launch filesrc location=test.mp4 ! qtdemux ! faad ! audioconvert ! audioresample ! autoaudiosink

Related

I am confused what ffmpeg file is in android

Please can anyone tell me the usages of ffmpeg file in android. Though I tried to browse but none of them satisfied me.
FFMPEG is library,it will used to decode and encode audio,video file , if you are streaming a video from your android application it will be used.

ExoPlayer and HLS Streaming

I am writing an Android application that plays a large MP3 file over the web. These files are usually about an hour or so and I've been getting some really inconsistent behavior with the stream cutting off in the middle in some cases.
To fix this, I decided to move to ExoPlayer and utilize an HLS implementation. While I am able to play the Apple test files (the beep boop) without issue, I can't seem to get any of my own streams to work.
Whenever I try to access my own stream, the player errors out and I get the following stack trace:
06-05 18:15:22.898 29566-29566/com.application E/EventLogger﹕ internalError [0.66, loadError]
java.io.EOFException
at com.google.android.exoplayer.extractor.DefaultExtractorInput.readFully(DefaultExtractorInput.java:73)
at com.google.android.exoplayer.extractor.ts.TsExtractor.read(TsExtractor.java:102)
at com.google.android.exoplayer.hls.HlsExtractorWrapper.read(HlsExtractorWrapper.java:214)
at com.google.android.exoplayer.hls.TsChunk.load(TsChunk.java:110)
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:242)
What is the correct way to create an HLS Stream from an MP3 for Android? For testing, I have tried a number of ffmpeg exports and am using S3 to serve the files, but I have been unsuccessful.
One of the samples can be found here: https://s3.amazonaws.com/gte619n/test_stream/output_test.m3u8
Thank you for all your help and suggestions.
Your link works fine in the ExoPlayer currently available at GitHub.
How to do it:
1) git clone https://github.com/google/ExoPlayer.git
2) Open the ExoPlayer/demo app in Android Studio
3) Edit ExoPlayer/demo/src/main/java/com/google/android/exoplayer/demo/Samples.java and add
public static final Sample[] HLS = new Sample[] {
new Sample("Stackoverflow",
"https://s3.amazonaws.com/gte619n/test_stream/output_test.m3u8",
PlayerActivity.TYPE_HLS),
and it worked.

Android_Can't play the mp4 file generated by MediaMuxer

I am trying to use MediaCodec and MediaMux to generate mp4 file. The code I am using is here.
I get some mp4 file. However, I can't play it with my player, which is just a normal software.
Does anyone has any idea? What should I do next?
I had a similar issue - in my case I simply wasn't calling muxer.stop() and ended up with a large unplayable file.

Kivy Play Audio Not Working

I'm attempting to run Kivy's audio example found here. The specific example is this:
sound = SoundLoader.load(filename='test.wav')
if not sound:
# unable to load this sound ?
pass
else:
# sound loaded, let's play!
sound.play()
When attempting to play any .wav file in my directory however, I just hear a click or pop noise. I've tried with different .wav files and am experiencing the same problem. I've also attempted to print out the length of the sound by using the length function, but it returns 0 for some reason. Any feedback or input from you guys? Thanks again.
Can't say just looking at the snippet above how you've implemented it in your Application or what's wrong.
There is a more elaborate example should be in the examples directory under your Kivy install directory that should clear up how to use SoundLoader.
Hope that helps.

How to play .aac format audio file in android

How to play .aac audio format in android.
I tried using ffmpeg convert audio format and play in android-ndk. But im not able to implement.
Please let me know any ideas or any ref link to follow
You can check this native aac player implementation. It is ffmpeg-based, and I heard it is fairly light on CPU.
http://code.google.com/p/aacplayer-android/

Categories

Resources