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 7919307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:49:22+00:00 2026-06-03T15:49:22+00:00

How do I encode audio to u-law g.711? Then send that audio to a

  • 0

How do I encode audio to u-law g.711? Then send that audio to a remote server via http.

AUDIO STREAM: Send a continuous stream of audio to the
currently viewed camera. Audio needs to be encoded at G711 mu-law at
64 kbit/s for transfer to the Axis camera at the bedside. send (this
should be a POST URL in SSL to connected server): POST
/transmitaudio?id= Content-type: audio/basic
Content-Length: 99999 (length is ignored)

I have searched on google and on here but mostly what I find are ways to stream from a server to an I device and not the other way around. I did find this posting (http://stackoverflow.com/questions/7750329/how-to-send-audio-file-through-http-post-to-a-server-from-ios) however it seems likes the answers are not very descriptive nor has any of them been accepted.

Here is what I have so far.

{
        NSNumber *formatObject;

        switch (self.recordEncoding) {
            case (ENC_AAC): 
                formatObject = [NSNumber numberWithInt: kAudioFormatMPEG4AAC];
                break;
            case (ENC_ALAC):
                formatObject = [NSNumber numberWithInt: kAudioFormatAppleLossless];
                break;
            case (ENC_IMA4):
                formatObject = [NSNumber numberWithInt: kAudioFormatAppleIMA4];
                break;
            case (ENC_ILBC):
                formatObject = [NSNumber numberWithInt: kAudioFormatiLBC];
                break;
            case (ENC_ULAW):
                formatObject = [NSNumber numberWithInt: kAudioFormatULaw];
                break;
            default:
                formatObject = [NSNumber numberWithInt: kAudioFormatAppleIMA4];
        }

        [recordSettings setObject:formatObject forKey: AVFormatIDKey];
        [recordSettings setObject:[NSNumber numberWithFloat:44100.0] forKey: AVSampleRateKey];
        [recordSettings setObject:[NSNumber numberWithInt:2] forKey:AVNumberOfChannelsKey];
        [recordSettings setObject:[NSNumber numberWithInt:12800] forKey:AVEncoderBitRateKey];
        [recordSettings setObject:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
        [recordSettings setObject:[NSNumber numberWithInt: AVAudioQualityHigh] forKey: AVEncoderAudioQualityKey];
    }

This appears to be U-law (hence the name of the encode), however I know nothing about audio codecs and dont know if G711 mu-law is even possible on ios.
How do I get my audio encoded in the right format?

Then how to send that encoded audio to the server? Right now I have it going to a temporary file location but even if I changed that I dont see how that would help. I know this is alot to ask for and I’m not looking to have an answer given to me, but I need a place to start because at the moment I’m fairly lost as to how to do this.

  • 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-03T15:49:25+00:00Added an answer on June 3, 2026 at 3:49 pm

    This sends the audio after it is done recording

     self.request = [client multipartFormRequestWithMethod:@"POST" path:[NSString stringWithFormat:@"transmitaudio?id=%@",self.restClient.sessionId] parameters:parameters constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) 
                        {
                            NSError * error = [[NSError alloc]init];
    
                            [formData appendPartWithFileURL:self.audioHandler.soundFileURL name:@"sound.caf" error:&error];
                            //            NSLog(@"error %@", [error localizedDescription]);
                        }];
    
        AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:self.request];
    
        [self.queue addOperation:operation];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to encode a video with an mp3 and have that audio stream
I am currently developing an application that needs to record audio, encode it as
Can anyone explain the algorithm for amplifying G.711 µ-law encoded audio?
If anyone have some experience that encode/decode speex audio format with AudioQueue? I have
I'm using speex to encode some audio data and send it over UDP, and
Android will play both the audio and video (AAC,h263) that I server it from
I wrote a loop to encode pcm audio data generated by my app to
In my application,I successfully managed to encode/decode H264 video and Speex audio using libavcodec
Simply stated: I'm trying to record audio in a browser, and get that data
Let me explain what I mean when I say fluent audio stream. I have

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.