Twilio ml <play> mp4 - twilio

I am using Twilio ML <play> to play audio over the phone. I manage to play the audio when the file type is mp3.
Due to some constraints we change the file type to mp4 which I read is accepted by Twilio. (accepted mime types)
When I tested the process I got an error when I tried to play an mp4 files. The logs in my Twilio account shows the following error code:
"12300 Invalid Content-Type"
I was googling this error code and found that this error can occurred when the content type is not sent by the server , so I checked the headers using fiddler and it seems fine to me: (Content-Type: video/mp4)
I will appreciate any advise with this issue.

Twilio only supports the following audio formats:
MIME TYPE DESCRIPTION
audio/mpeg mpeg layer 3 audio
audio/wav wav format audio
audio/wave wav format audio audio/x-wav wav format audio
audio/aiff audio interchange file format audio/x-aifc audio
interchange file format audio/x-aiff audio interchange file format
audio/x-gsm GSM audio format audio/gsm GSM audio format
audio/ulaw μ-law audio format
See https://www.twilio.com/docs/api/twiml/play for more details

Related

Can't get ffmpeg to generate an MP4 file on iOS

I'm having serious problems trying to get an iOS app to create an MP4 file from an RTSP stream using ffmpeg.
I can open the stream, decode it, show the video on screen and play the live audio without any issues. The problems arise when I try to output the AV stream to a file.
If I ask ffmpeg to create an MP4 file, it fails, informing me that the audio codec in the stream is incompatible with MP4 files. If I attempt to transcode the audio into acc, then ffmpeg lets me continue, but during the file output I get multiple "aac bitstream error" messages, and the recording is silent.
I also tried having ffmpeg create a mov (Quicktime) file instead of MP4. If I do that, it seems to work: I get a mov file that plays back with audio. That being done, I tried to transcode the mov file to mp4 using AVAssetExportSession. But this doesn't work: it reports that the decode failed.
I'm not sure what to try next.

TwiML - HTML - XHTML: live .wax file streaming to Twilio phone call

Does anybody have any idea if and/or how to stream a .wax file in Twilio's TwiML?
Twilio developer evangelist here.
Twilio doesn't support .wax files for audio content. You can find the documentation on the files we support here: https://www.twilio.com/docs/api/twiml/play#nouns
Here is the list of suppoted audio formats and their MIME types:
audio/mpeg mpeg layer 3 audio
audio/wav wav format audio
audio/wave wav format audio
audio/x-wav wav format audio
audio/aiff audio interchange file format
audio/x-aifc audio interchange file format
audio/x-aiff audio interchange file format
audio/x-gsm GSM audio format
audio/gsm GSM audio format
audio/ulaw μ-law audio format

does any video portal support mpeg2-ts container format

Is there any video portal (such as youtube/youku/hulu) etc, which support mpeg2-ts format ? Just wanted to know if TS format is still in use by any of the content provider.
I know this format is used for media archiving on DVDs etc ... but wanted to know if any content provider uses this format for sending video stream on Internet for live streams or VoD.
Youtube supports mpeg2ts container format with H.264/AAC media for HTTP live streaming ...
http://www.youtube.com/watch?v=hnslRRh2wcA ... this URL generates HLS stream.
On checking the youtube-dl output found following:
format code extension resolution note
151 mp4 72p HLS (worst)
132 mp4 240p HLS
92 mp4 240p HLS
93 mp4 360p HLS (best)
even though extension says mp4 ... the actual container format used when used through chrome browser on windows is mpeg2ts.

Not able to play audio pcm wav stream in ipad, iphone browser

Web App which supports desktop, tablet and mobile.
Issue:
Not able to play below mentioned audio wav stream in iphone/ipad safari browsers
8000 hz, 16 bit, mono, signed
8000 hz, 16 bit, stereo, signed
Added below header into the audio wav stream
content-type: "audio/x-wav"
.header("Content-Length", ""+rawAudio.length)
.header("Accept-Ranges", "bytes")
.header("Last-Modified", "Wed, 27 Nov 2013 16:40:59 GMT")
.header("Connection", "keep-alive")
Wav as a stream: a get restful api returns binarystream as a response with the above mentioned header.
sample restful: /audio/getWav.do (this is an spring based web app, which returns binary wav stream as response)
Options tried, but did not work:
1. web audio api, called audio.play() function on_touch_start
2. jplayer to play wav stream
3. jquery.mb.audio API to play wav stream
Option worked:
1. upload the wav file into web app, iphone/ipad play the file.
why is that ipad/iphone safari browser plays the wav file from the web server, but does not play the wav stream.
Pls provide inputs or pointers to play wav stream in iphone or ipad.

Play NSDATA into audio format IOS

I have NSDATA which is recorded through AudioQueue , I want to play this audio through any AUDIO player on IOS, Please help on this.
Thanks
Djrecker
Save it as an audio file (e.g. WAV). AudioFile and ExtAudioFile APIs can help you write this.
You can't expect any audio player on iOS to interpret/guess a blob of sample data correctly. This is why file formats exist -- audio file formats can specify sample count, channel count, sample rate, sample format, and a ton of other information about the audio in the file. Using an audio file, you can exchange this recording in a format other programs are able to read (correctly).

Resources