[FFmpeg-user] where ffmpeg parses mpeg audio headers?
Andrew Randrianasulu
randrianasulu at gmail.com
Thu Feb 1 18:28:51 EET 2024
I was looking into https://trac.ffmpeg.org/ticket/1258#comment:12
(mpeg2 multichannel audio in HDV) and reading documents linked in
this ticket.
I still have very vague understanding on where ffmpeg audio (PES?)
headers read by ffmpeg
somewhere in ffmpeg/libavformat/mpeg.c ?
According to this picture https://ericdevos.be/kask/2BA/2BA
videoformaten/MPEG-2 description.htm
Figure 2 -- Structure of an MPEG-2 Audio block of data
multichannel extension can be carried (partially!) in IEC 11172-3
layer II frame. You just need to search in very beginning of ancillary
data for Multichannel header.
Extension stream, touched in more details in "An Implementation of the
MPEG—2 Audio Decoding Specification by Chad Mikkelson" (p. 38) sounds a
bit more mysterious to me: mc-capable encoder from dist10 [1] output
extension stream as separate file only their decoder can read. I
wonder how it must be interleaved in real system mpeg stream? And how
it may work in transport stream (as used in HDV) ?
[1] - https://github.com/Randrianasulu/iso-dist10 (hopefully read
sox-generated uncompressed multichannel 16 bit AIFF correctly).
More information about the ffmpeg-user
mailing list