# MediaWriterH264: Unsupported audio format for MP4 container

**URL:** <https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839>\
**Category:** Wowza Streaming Engine\
**Created:** [March 7, 2012, 4:25pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839 "2012-03-07T16:25:35Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_DG](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@Joe\_DG](https://community.wowza.com/u/Joe_DG)\
**Post date:** [March 7, 2012, 4:25pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/1 "2012-03-07T16:25:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 8, 2012, 12:36am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/2 "2012-03-08T00:36:11Z")

</div>

You can record both to flv container.

Richard

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [March 8, 2012, 4:14pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/3 "2012-03-08T16:14:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 8, 2012, 9:20pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/4 "2012-03-08T21:20:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [August 22, 2012, 12:27am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/5 "2012-08-22T00:27:02Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 28, 2012, 6:23pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/6 "2012-09-28T18:23:23Z")

</div>

Jake,

It should work now.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 21, 2013, 1:18pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/7 "2013-01-21T13:18:23Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [September 28, 2012, 11:20am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/8 "2012-09-28T11:20:15Z")

</div>

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

Thanks,

Jake

---

<div class="post-metadata">

**Author:** ![Jake\_Hilton](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jake\_Hilton](https://community.wowza.com/u/Jake_Hilton)\
**Post date:** [September 28, 2012, 11:28am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/9 "2012-09-28T11:28:19Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Simon\_Bailey](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Simon\_Bailey](https://community.wowza.com/u/Simon_Bailey)\
**Post date:** [January 13, 2013, 8:27am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/10 "2013-01-13T08:27:28Z")

</div>

> 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:
> 
> ```auto
> 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:

```auto
#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

```

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [March 8, 2012, 4:01pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/11 "2012-03-08T16:01:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [January 14, 2013, 11:47am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/12 "2013-01-14T11:47:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joe\_DG](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@Joe\_DG](https://community.wowza.com/u/Joe_DG)\
**Post date:** [March 7, 2012, 4:40pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/13 "2012-03-07T16:40:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Joe\_DG](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@Joe\_DG](https://community.wowza.com/u/Joe_DG)\
**Post date:** [March 8, 2012, 8:38am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/14 "2012-03-08T08:38:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joe\_DG](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@Joe\_DG](https://community.wowza.com/u/Joe_DG)\
**Post date:** [March 9, 2012, 11:26am UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/15 "2012-03-09T11:26:59Z")

</div>

OK, thank you for all the info 🙂

---

<div class="post-metadata">

**Author:** ![Ernie\_Hershey](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Ernie\_Hershey](https://community.wowza.com/u/Ernie_Hershey)\
**Post date:** [August 21, 2012, 1:50pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/16 "2012-08-21T13:50:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jim\_Bolino](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@Jim\_Bolino](https://community.wowza.com/u/Jim_Bolino)\
**Post date:** [January 21, 2013, 2:09pm UTC](https://community.wowza.com/t/mediawriterh264-unsupported-audio-format-for-mp4-container/37839/17 "2013-01-21T14:09:36Z")

</div>

> 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?
