Detecting codec in a stream, aac adts vs mp3 |
Detecting codec in a stream, aac adts vs mp3 |
Oct 7 2012, 12:46
Post
#1
|
|
|
Group: Members Posts: 142 Joined: 13-December 04 Member No.: 18660 |
How does e.g. VLC detects the codec when opening a http stream?
Both AAC and MP3 has a very short sync mark which often appears in other streams. http://www.flickr.com/photos/52807817@N00/4423485655/ http://www.mp3-tech.org/programmer/frame_header.html This post has been edited by stigc: Oct 7 2012, 12:53 |
|
|
|
![]() |
Oct 7 2012, 18:38
Post
#2
|
|
|
Winamp Developer Group: Developer Posts: 662 Joined: 17-July 05 From: Ashburn, VA Member No.: 23375 |
The first four bytes of an ADTS AAC frame header look exactly like an MPEG-1/2 "Layer 4" frame. So it's quite easy to detect the difference.
|
|
|
|
stigc Detecting codec in a stream Oct 7 2012, 12:46
stigc I guess VLC parses the frame length number and see... Oct 7 2012, 13:07![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 07:45 |