# How to play embedded (HE-)AAC?

**URL:** <https://forum.kirupa.com/t/how-to-play-embedded-he-aac/266563>\
**Category:** Uncategorized\
**Created:** [July 22, 2008, 5:29am UTC](https://forum.kirupa.com/t/how-to-play-embedded-he-aac/266563 "2008-07-22T05:29:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aho](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aho](https://forum.kirupa.com/u/aho)\
**Post date:** [July 22, 2008, 5:29am UTC](https://forum.kirupa.com/t/how-to-play-embedded-he-aac/266563/1 "2008-07-22T05:29:57Z")

</div>

Embedding works like this:

```auto
[Embed(source = 'foo.mp4', mimeType = "application/octet-stream")]
private var musicClass:Class;
private var music:Video=new musicClass() as ByteArray;

```

Using the correct mime type (video/mp4) doesn’t work by the way.

Unfortunately the Sound class is somewhat restrictive - it’s only capable of playing mp3 files. Why’s that?

So, one gotta use Video, but that one wants a NetStream. Why aren’t there usual streams and convenient streams such as Java’s ByteArrayInputStream? That would solve all my problems.

Is there any workaround for this or is it completely impossible?

(Obviously I would like to use it for game BGM. MP3 requires much higher bitrates whereas you can get away with 25kbits with HE-AAC. Sure - it will sound a bit washed out, but it won’t make your ears bleed like 64-96kbits MP3s.)

Edit: as2-/as2 tags don’t work.
