Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
MPEG1 Layer I and II Audio streams, are they possible in AVI?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
stephanV
Posted: Jul 30 2004, 10:26 PM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



Well, the topic title just pretty much says it all... I can't think of a reason why not, but it feels unintuitive. (considering there probably arent any ACMs for them)

Just a question out of interest. smile.gif

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
Wilbert
Posted: Jul 30 2004, 10:35 PM


Advanced Member


Group: Members
Posts: 132
Member No.: 6270
Joined: 11-September 03



mpeg1 layer II is possible (dunno about layer I). See AviSynth FAQ (and get the ACM codec):

http://www.avisynth.org/Section+2%3A+AviSy...ameserving#q2.9

Wilbert
 
     Top
stephanV
Posted: Jul 30 2004, 10:57 PM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



ah thx smile.gif

layer I should be possible too (cant see why not). a MP3 decoder should also be able to decode layer I and II but the problem is they dont share the same audio tag dry.gif

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
fccHandler
Posted: Jul 31 2004, 04:54 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



For some strange reason, the Fraunhofer codec will only decode Layer III, but that's OK because Windows has its own internal support for Layers I and II. IIRC both work fine in AVI files, as long as you use a DirectShow player (like Windows Media Player).

My VirtualDub-MPEG2 used to allow Direct Stream Copy of MPEG-1 Layers I, II, and III from MPEG files into AVI files, but I just discovered that the current version has this feature disabled! (Instead, it decompresses the audio and sends it along as raw PCM.) I don't remember why I disabled it, but there must have been a reason. I'll investigate...

--------------------
May the FOURCC be with you...
 
     Top
phaeron
Posted: Jul 31 2004, 09:06 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



AVI files with MPEG-1 layer II streams are indeed possible and are seen in the wild; the WinDVD Creator software that comes with the Plextor PX-M402U generates them. I haven't yet coded up support for decoding them.
 
    Top
i4004
Posted: Jul 31 2004, 03:37 PM


Advanced Member


Group: Members
Posts: 2432
Member No.: 4935
Joined: 24-June 03



this reminds me of my recent mpeg4 versus mpeg1/2 shootout....(let's call it a draw)
if we can't progress...why wouldn't we "regress"?
smile.gif

interesting stuff....

--------------------
my signature:
user posted image
 
     Top
Loadus
Posted: Jul 31 2004, 05:53 PM


Advanced Member


Group: Members
Posts: 352
Member No.: 10881
Joined: 1-July 04



I've used TooLame to encode Layer II audio to AVI
stream many times ...

It works more than fine and the audio quality of
TooLame's engine is very good. The problems
start, when I use the experimental VBR encoding
on the stream. huh.gif

More to come, after I get some time to do more
tests - Layer II VBR to MPEG-1 stream? Hmmmm....

smile.gif

--------------------
deviantART behance
 
       Top
fccHandler
Posted: Aug 1 2004, 03:17 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



It's been a while since I read the spec, but I seem to remember that VBR encoding wasn't allowed for Layers I and II, only Layer III. (Someone correct me if I'm wrong...)

Of course that doesn't mean it can't be done, just that it might be out of spec. In any case, MPEG streams fully support Layer III VBR audio and there shouldn't be any problems on a PC. But I have serious doubts whether it will work on other hardware devices, like a DVD player.

--------------------
May the FOURCC be with you...
 
     Top
stephanV
Posted: Aug 1 2004, 10:12 AM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



Well, I believe the bitrate is defined in each MPEG1 audio frame header no matter which layer you use, so in principle it should be possible. Although, IIRC I read somewhere that layer I and II decoders did not necessarily have to decode VBR for whatever reason. A layer III decoder should always be able to decode VBR. I'll try to look it up.

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
stephanV
Posted: Aug 1 2004, 01:38 PM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



then again, from toolame site

QUOTE
VBR mode works by selecting a different bitrate for each frame. Frames which are harder to encode will be allocated more bits i.e. a higher bitrate.

LayerII VBR is a complete hack - the ISO standard actually says that decoders are not required to support it. As a hack, its implementation is a pain to try and understand. If you're mega-keen to get full range VBR working, either (a) send me money (B ) grab the ISO standard and a C compiler and email me.


its a bit weird specified then though, making it possible but not being required to support it... wacko.gif
(and what does the word hack mean anyway tongue.gif )

AFAICT from that document VBR mpeg layer II is only possible for limited bit rate ranges (depending on sampling frequencies; it can only make use of one bit allocation table)

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
Loadus
Posted: Aug 2 2004, 01:11 PM


Advanced Member


Group: Members
Posts: 352
Member No.: 10881
Joined: 1-July 04



Yup. VBR for Layer II works on PC, but hardware players
say no-no when you try to play it...

I just love these insane specifications. biggrin.gif

--------------------
deviantART behance
 
       Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
10 replies since Jul 30 2004, 10:26 PM Track this topic | Email this topic | Print this topic

<< Back to Off-Topic