[FFmpeg-devel] [DISCUSSION] Atrac3+ streams inside PSMF

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Nov 25 17:56:36 CET 2014

Maxim Polijakowski <max_pole <at> gmx.de> writes:

> In the current FFMpeg, PSMF will be 
> (mis)-identified as MPEG-TS stream.

I thought it is correctly identified as mpeg-ps.

> Atrac Audio is carried out in PRIVATE_STREAM_1 
> packets. Their format is proprietary but rather 
> simple to understand.

> Atrac3+ audio streams are delivered inside of 
> packets of the same size, usually 2048 bytes. 
> They usually contain several audio frames. Frames 
> can be splitted across two packets and need to be 
> stitched together in the demuxer.

That means you have to implement an atrac3p parser, 
see many examples in the libavcodec directory.

> Now my questions:
> 1) what's the proper code to be extended? I 
> attached a very draft patch that extends the MPEG 
> demuxer. Is it the right place or should I look 
> for any other?

If the files can be identified as pmf, please add 
a new field similar to the existing imkh_cctv and 
sofdec fields and use that new field to decide that 
PRIVATE_STREAM_1 packets are atrac3p.
(Additionally, allow users to force atrac3p for 
cut streams with ffmpeg -acodec atrac3p -i input.)

Carl Eugen

More information about the ffmpeg-devel mailing list