[Libav-user] does mp2 (MPEG audio layer 2) -format contain timecodes?

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Mar 4 11:09:14 EET 2018


2018-03-02 15:42 GMT+01:00, Sebastian Guttenberg <sgutten at ms2-gmbh.de>:

> Is anybody familiar with the internal structure of the MPEG audio layer 2
> format? Is it similar to mp3, consisting of frames and headers? While I
> found a nice explanation of mp3 (MPEG Audio Layer 3)  on wikipedia, I
> couldn’t find it in the same detail for mp2.

Iirc, mp2 and mp3 are very similar, FFmpeg's mp3 decoder also
handles mp2 internally.

> In particular, I’m interested if the timecodes for each frame (if it exists)
> are stored in that frame, or if the timecodes belonging to a frame somehow
> have to be calculated by counting the frames?

Do you mean timestamps?
Generally, the container provides timestamps, mp2 is a codec.
For decoded audio, "counting" seems the right approach.

> This is a sub-question of my longer more ffmpeg-specific one, which
> unfortunately didn’t get a response:
> http://ffmpeg.org/pipermail/libav-user/2018-February/010945.html

I don't know the answer, you were using old FFmpeg (which is
not supported here) and it looked like "wrong mailing list".

Carl Eugen


More information about the Libav-user mailing list