MediaWriterH264: Unsupported audio format for MP4 container

Sending Nellymoser encoded audio data from the flash player to Wowza Media Server 3 Developer Edition 3.0.5 build1220 results in this warning:

WARN server comment - MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_NELLYMOSER

We tried sending Speex and got a similar warning:

WARN server comment - MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_SPEEX

We are using the com.wowza.wms.plugin.integration.liverecord plugin library to record the live stream for a specified duration of time. I looked thru the decompiled code in the plugin classes and noticed if the codec id is not 10 and not 2 then it results in that warning and the resulting file on the hard drive has no audio data in it (verified with ffmpeg).

So we can’t record nellymoser or speex data? Can someone help? Thank you.

You can record both to flv container.

Richard

The f4v format is the same as MP4. In the future we will add support for Speex in an MP4 file. We do not support it at this time.

Charlie

At this time with Wowza you have to use flv container if the audio is Speex. This feature might be added to a future release of Wowza, but I have no time frame for that.

Richard

It is supported now. mp4 file can contain Speex. Flash RTMP and HTTP players can playback mp4 with Speex audio (and h.264 video). Take a look at this guide, which includes transcoding Speex to AAC for non-Flash clients

https://www.wowza.com/docs/how-to-convert-flash-player-11-output-from-h-264-speex-audio-to-h-264-aac-audio-using-wowza-transcoder

Richard

Jake,

It should work now.

Richard

This is not a Wowza constraint, this audio codec is not supported in a quicktime (.mp4) container. And many of the clients and devices you might want to playback an .mp4 file do not support this audio codec.

You can use the Wowza Transcoder. Take a look at the template in this example:

https://www.wowza.com/docs/how-to-convert-flash-player-11-output-from-h-264-speex-audio-to-h-264-aac-audio-using-wowza-transcoder

Richard

Do you have a timeline when the Wowza MediaWriterH264 will support writing the speex audio track into the mp4 container?

Thanks,

Jake

I just ran a few tests with the latest Wowza (Wowza Media Server 3.1.2 build1624)… and got this for each audio codec I tried:

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_SPEEX

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_G711_ALAW

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_G711_MULAW

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_NELLYMOSER

So I was hopeful that the speex one would work. I expected failures on the other formats.

I’m just doing a simple:

var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3);
ns.videoStreamSettings = h264Settings;
var mic:Microphone = Microphone.getMicrophone();
mic.codec = SoundCodec.SPEEX;
var cam:Camera = Camera.getCamera();
ns.attachAudio(mic);
ns.attachCamera(cam);
ns.publish("mp4:stream_name","record");

No errors when the stream starts… but when I stop the record I get the error from above.

Is there a patch I need to get this working?

Thanks,

Jake

I just ran a few tests with the latest Wowza (Wowza Media Server 3.1.2 build1624)… and got this for each audio codec I tried:

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_SPEEX

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_G711_ALAW

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_G711_MULAW

MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_NELLYMOSER

So I was hopeful that the speex one would work. I expected failures on the other formats.

I’m just doing a simple:

var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3);
ns.videoStreamSettings = h264Settings;
var mic:Microphone = Microphone.getMicrophone();
mic.codec = SoundCodec.SPEEX;
var cam:Camera = Camera.getCamera();
ns.attachAudio(mic);
ns.attachCamera(cam);
ns.publish("mp4:stream_name","record");

No errors when the stream starts… but when I stop the record I get the error from above.

Is there a patch I need to get this working?

Thanks,

Jake

I am also getting the same error in a fresh ec2 setup:

#Version: 1.0
#Start-Date: 2013-01-13 08:07:33 UTC
#Software: Wowza Media Server 3.5.0 build2989
#Date: 2013-01-13
#Fields: x-severity	x-category	x-event	date	time	c-client-id	c-ip	c-port	cs-bytes	sc-bytes	x-duration	x-sname	x-stream-id	x-spos	sc-stream-bytes	cs-stream-bytes	x-file-size	x-file-length	x-ctx	x-comment
ERROR	server	comment	2013-01-13	08:07:33	-	-	-	-	-	0.652	-	-	-	-	-	-	-	-	HTTPUtils.HTTPRequestToByteArray: java.io.FileNotFoundException: http://169.254.169.254/latest/meta-data/product-codes
WARN	server	comment	2013-01-13	08:17:59	-	-	-	-	-	626.778	-	-	-	-	-	-	-	-	MediaWriterH264: Unsupported audio format for MP4 container: CODEC_AUDIO_SPEEX

Hi

The length of time doesn’t effect the out-put of container but Nellymoser and speex are not compatible with an mp4 container.

You will need to change the container to be one that is compatible with the audio you wish to use, Richard suggested flv.

You can record the stream type to be X minutes long using the plugin but not the standard “live-record” in the Application.xml.

Jason

Hi

I think Richard was trying to say that Flash clients can play Speex audio when contained in an MP4 file but Wowza can’t write Speex into an MP4 container at this time.

You could try uploading an MP4 file which contains Speex audio as it may play though Wowza using a Flash client however I haven’t tested it yet.

The f4v format is the same as MP4. In the future we will add support for Speex in an MP4 file. We do not support it at this time.

Charlie

Jason

Hi Richard,

We are doing HD encoding thru flash player 11 so that doesn’t help us. OK let me rephrase my question: Can we limit the recording using “live-record” StreamType to X minutes long only?

Also, why is the plugin not part of the standard installation package?

I’m confused. We just streamed an MP4 to FMS 4.5 using H264 for the video codec and Speex for the audio codec. FFMPEG is telling me that it has put speex data in the file. I thought F4V was just adobe’s wrapper around the MP4 file format? Am I wrong? Why can’t Wowza put Speex data in the f4v/mp4 file?

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘test.f4v’:

Metadata:

major_brand : f4v

minor_version : 0

compatible_brands: isommp42m4v

creation_time : 2017-06-30 11:03:58

Duration: 00:08:48.39, start: 0.000000, bitrate: 65 kb/s

Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x1024 [SAR 1:1 DAR 5:4], 89 kb/s, SAR 16:15 DAR 4:3, 1 tbr, 1k tbn, 10 tbc

Metadata:

creation_time : 2017-06-30 11:03:58

handler_name : MainConcept

Stream #0:1(eng): Audio: speex (spex / 0x78657073), 16000 Hz, 1 channels, s16, 8 kb/s

Metadata:

creation_time : 2017-06-30 11:03:58

handler_name : Speex Handler

Stream #0:2(eng): Data: none (amf0 / 0x30666D61)

Metadata:

creation_time : 2017-06-30 11:03:58

handler_name : Timed Metadata Handler

OK, thank you for all the info :slight_smile:

Hi Charlie,

Indeed, thanks for the info. Do you have any timeline info you could provide on when speex in mp4 will be supported? It would help us out a lot.

Thanks,

Ernie

The f4v format is the same as MP4. In the future we will add support for Speex in an MP4 file. We do not support it at this time.

Charlie

It should work now.

I’m trying to save a stream from different ip cameras, however they all fail when trying to save in MP4 container.

WARN server comment - LiveStreamRecorderMP4 [observer/definst]: Unsupported audio format for MP4 container: CODEC_AUDIO_G711_MULAW

FLV container works fine, except i don’t want to have to change all files to a different container for my application.

Will this be fixed in the nearby future?