Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:13:44+00:00 2026-05-27T05:13:44+00:00

We are streaming audio via http from ffserver/ffmpeg on Angstrom Linux. The ffmpeg audio

  • 0

We are streaming audio via http from ffserver/ffmpeg on Angstrom Linux. The ffmpeg audio codec is PCM signed 16-bit little endian “pcm_s16le”. The ffmpeg stream format is “wav”. Both of these are claimed to be supported on Android here: http://developer.android.com/guide/appendix/media-formats.html#core

VLC finds and plays the stream without any problems.
Under VLC “Codec Details”, it says:
Type: Audio, Codec: PCM S16 LE (araw)
Channels: Stereo
Sample rate: 48000 Hz
Bits per sample: 16

We built the simple test application below to pick up and play the stream in Android and get this error:
java.io.IOException: Prepare failed.: status=0x1

We checked the HTTP header using HTTP Debugger Pro.
The Response Header items (when playing normally via VLC) are:
[Response]: HTTP/1.0 200 OK
Pragma: no-cache
Content-Type: audio/x-wav

We have been searching the web for help on this issue for over two days and have come up empty-handed. Any help would be greatly appreciated.

————TEST APP————————
package com.shaneahern.streamtest;
import java.io.IOException;
import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;

public class BareBonesStreamTestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

    String streamUrl = "http://192.168.24.123:8080/test.wav"; 

    MediaPlayer mp = new MediaPlayer(); 
    Log.i("BareBonesStreamTestActivity", "MediaPlayer created"); 

    try { 
        mp.setDataSource(streamUrl); 
        Log.i("BareBonesStreamTestActivity", "setDataSource to " + streamUrl); 

        mp.setAudioStreamType(AudioManager.STREAM_MUSIC); 
        Log.i("BareBonesStreamTestActivity", "setAudioStreamType to AudioManager.STREAM_MUSIC"); 

        mp.prepare(); 
        Log.i("BareBonesStreamTestActivity", "prepare succeeded, calling start"); 

        mp.start(); 
    } catch (IllegalStateException e) { 
        Log.i("BareBonesStreamTestActivity", "prepare failed with IllegalStateException"); 
        e.printStackTrace(); 
    } catch (IOException e) { 
        Log.i("BareBonesStreamTestActivity", "prepare failed with IOException"); 
        e.printStackTrace(); 
    } 
} 

}

————ERROR LOG————————

I/BareBonesStreamTestActivity(  727): MediaPlayer created 
I/StagefrightPlayer(   33): setDataSource('http://192.168.24.123:8080/ test.wav') 
I/BareBonesStreamTestActivity(  727): setDataSource to http://192.168.24.123:8080/test.wav 
I/BareBonesStreamTestActivity(  727): setAudioStreamType to AudioManager.STREAM_MUSIC 
E/MediaPlayer(  727): error (1, -2147483648) 
I/BareBonesStreamTestActivity(  727): prepare failed with IOException 
W/System.err(  727): java.io.IOException: Prepare failed.: status=0x1 
W/System.err(  727):     at android.media.MediaPlayer.prepare(Native Method) 
W/System.err(  727):     at com.shaneahern.streamtest.BareBonesStreamTestActivity.onCreate(BareBonesStr eamTestActivity.java: 30) 
W/System.err(  727):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) 
W/System.err(  727):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) 
W/System.err(  727):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) 
W/System.err(  727):     at android.app.ActivityThread.access $2300(ActivityThread.java:125) 
W/System.err(  727):     at android.app.ActivityThread $H.handleMessage(ActivityThread.java:2033) 
W/System.err(  727):     at android.os.Handler.dispatchMessage(Handler.java:99) 
W/System.err(  727):     at android.os.Looper.loop(Looper.java:123) 
W/System.err(  727):     at android.app.ActivityThread.main(ActivityThread.java:4627) 
W/System.err(  727):     at java.lang.reflect.Method.invokeNative(Native Method) 
W/System.err(  727):     at java.lang.reflect.Method.invoke(Method.java:521) 
W/System.err(  727):     at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 
W/System.err(  727):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 
W/System.err(  727):     at dalvik.system.NativeStart.main(Native Method) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:13:45+00:00Added an answer on May 27, 2026 at 5:13 am

    I think you might want to take a look at: Using AudioTrack to play Wav file

    Another usefull link

    I have downloaded a raw stream myself and it works nicely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Where to get streaming (live) video and audio from camera example for Nokia (5800
I have a stream of PCM audio captured from a cell phone, and I
Can we set up HTTP server on iPhone for audio streaming . I need
I have a HTTP Live streaming server setup that serves segmented mp3 audio content
I'm using Android 2.3, so according to this post: Streaming Audio from A URL
I am starting a VLC job to record some streaming audio from within a
I am working on streaming a video from web. Where I decode the video/audio
I am developing an audio streaming app with the old AudioStreamer from Matt and
I'm reading Apple's documentation on using QTKit to capture streaming audio and video from
Hey i want to develop a player on Android, which can play streaming audio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.