Gstreamer and Android app
de_ninja
daniel at gretzke.de
Mon May 2 18:36:08 UTC 2016
Like you said I put the aac stream in a container with the following
pipeine:
gst-launch-1.0 audiotestsrc ! faac ! "audio/mpeg, mpegversion=4" ! udpsink
host=224.0.0.1 port=8001
Still the same error. I tried to write the incoming Bytes to an aac file and
play it, but it didn't work. So I think the Android media extractor isn't
the problem.
I write the data to the file with the following code:
*String filename = "AudioData";
File file = new File(Environment.getExternalStorageDirectory(), filename);
FileOutputStream fos;
fos = new FileOutputStream(file, true);
int i = 0;
byte[] data;
while(i<=100) {
multicastSocket.receive(packet);
data = new byte[packet.getLength()];
System.arraycopy(packet.getData(), packet.getOffset(), data, 0,
packet.getLength());
Log.e("UDPserver", data.length + " bytes received");
fos.write(data);
i++;
} *
what do i have to change at the file that it is playable? (then it may work
with media extractor too), i tried to name it .aac and .mp4 but both didn't
work. Do I need a header in an aac file?
AudioData.AudioData
<http://gstreamer-devel.966125.n4.nabble.com/file/n4677299/AudioData.AudioData>
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-and-Android-app-tp4677265p4677299.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list