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

  • Home
  • SEARCH
  • 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 8956499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:48:00+00:00 2026-06-15T14:48:00+00:00

Trying to pipe an AudioInputStream I got from a libary to this process: oggenc

  • 0

Trying to pipe an AudioInputStream I got from a libary to this process:

oggenc - -o wtf.ogg

via

AudioSystem.write(audio, AudioFileFormat::Type::WAVE, process.getOutputStream());

gives me the error:

IOException
stream length not specified

file: com.sun.media.sound.WaveFileWriter.write(WaveFileWriter.java)
line: 129

So it seems audio stream length needs to be specified. This is a 44.8 kHz stereo PCM format audio with no length specified. I got this from a library so I can’t modify their code. I tried creating another AudioInputStream from this stream, but I couldn’t find a proper length. So how can I specify the length ?

  • 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-06-15T14:48:01+00:00Added an answer on June 15, 2026 at 2:48 pm

    So, I found that you are reading audio from somewhere unknown, and then trying to write it into WAV format. But WAV format requires to write header, which should contain file length. Anyway WaveFileWriter throws exception if feeded by stream without knowing length.

    I guess your direction is Java -> oggenc.

    So, you are to learn oggenc and know if it accepts headless WAV stream. If so, then just pass your audio to output stream, without processing with AudioSystem.write() which is for headed WAVs

    According to here http://www.linuxcommand.org/man_pages/oggenc1.html you are able to accept RAW with oggenc.

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

Sidebar

Related Questions

I'm trying to read lines from a pipe and process them, but I'm doing
I am trying to pipe data from a stream into a child process. var
I am trying to write the data using the pipe input streams. But from
I'm trying to extract fields from a pipe-delimited file and provide them as arguments
I recently spent some time trying to write some numbers as bytes to pipe
I am trying to stream/pipe a file to the user's browser through HTTP from
I am trying to setup a pipe between one process that is launched with
I am trying to write a named pipe server in C++. I have a
I am trying to read unbufferd data from a pipe in Perl. For example
I am trying to fetch details from an email pipe. the pipe returns the

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.