Opened 7 years ago

Last modified 7 months ago

#6140 new enhancement

Add support for AMR-WB+ codec

Reported by: boris Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: amrp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

FFmpeg currently does not have a decoder for AMR-WB+ codec.

A free encoder + decoder for AMR-WB+ can be downloaded from https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1451. The ZIP file has both binaries (encoder.exe, decoder.exe) and source code.

Here are some usage instructions,

$ wget http://www.music.helsinki.fi/tmt/opetus/uusmedia/esim/a2002011001-e02-16kHz.wav

$ wine encoder.exe -rate 16 -if a2002011001-e02-16kHz.wav -of out.3gp
3gp File Format
Encoding @  16.00kbps
 --- Running ---

$ mediainfo out.3gp
General
Complete name                            : out.3gp
Format                                   : MPEG-4
Format profile                           : 3GPP Media Release 6 Basic
Codec ID                                 : 3gp6 (3gp6/isom)
File size                                : 110 KiB
Duration                                 : 54 s 160 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 16.7 kb/s
Encoded date                             : UTC 2017-02-10 06:10:58
Tagged date                              : UTC 2017-02-10 06:10:58

Audio
ID                                       : 1
Format                                   : sawp
Codec ID                                 : sawp
Duration                                 : 54 s 160 ms
Bit rate mode                            : Constant
Bit rate                                 : 16.2 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 6 464 Hz
Bit depth                                : 16 bits
Stream size                              : 107 KiB (97%)
Encoded date                             : UTC 2017-02-10 06:10:58
Tagged date                              : UTC 2017-02-10 06:10:58

$ wine decoder.exe  -if out.3gp  -of out.wav
...
File type brand '3gp6' minor version 256
Compatible brands: 'isom' (yes) '3gp4' (no) '3gp5' (no)
Track 1 'sawp'  Duration 54.160s  Time scale 72000
Decoding @  16.00kbps

$ mediainfo out.wav
General
Complete name                            : out.wav
Format                                   : Wave
File size                                : 9.92 MiB
Duration                                 : 54 s 160 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 536 kb/s

Audio
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 54 s 160 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 9.92 MiB (100%)

It would be great to get support for AMR-WB+ codec in FFmpeg.

Attachments (4)

out.3gp (110.3 KB ) - added by boris 7 years ago.
Audio sample using AMR-WB+ codec
26290-h00.zip (481.1 KB ) - added by LanMarc77 7 months ago.
3GPP TS 26.290 V17.0.0 (2022-04), Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Transcoding functions
samples.zip (1.7 MB ) - added by LanMarc77 7 months ago.
differnet audiosamples of AMR-WB+ in 3gp and raw format
26304-h00.zip (1.2 MB ) - added by LanMarc77 7 months ago.
3GPP TS 26.304 V17.0.0 (2022-04) Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Floating-point ANSI-C code

Change History (8)

by boris, 7 years ago

Attachment: out.3gp added

Audio sample using AMR-WB+ codec

comment:1 by Carl Eugen Hoyos, 7 years ago

Keywords: amrp added
Priority: normalwish

comment:2 by boris, 7 years ago

http://samples.mplayerhq.hu/A-codecs/amr/amr-wb+_encoded/ has another sample which is correctly decoded by "decoder.exe".

https://ffmpeg.org/pipermail/ffmpeg-devel/2008-December/044239.html also seems relevant to this ticket.

by LanMarc77, 7 months ago

Attachment: 26290-h00.zip added

3GPP TS 26.290 V17.0.0 (2022-04), Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Transcoding functions

by LanMarc77, 7 months ago

Attachment: samples.zip added

differnet audiosamples of AMR-WB+ in 3gp and raw format

comment:3 by LanMarc77, 7 months ago

I am the maintainer of https://github.com/lanmarc77/playaway and would also like to see AMR-WB+ implemented in ffmpeg.
The Playaways I am using can now only be rewritten with the already mentioned windows based encoder.exe which is 32bit.

My findings so far:
There is a 3gp and raw encapsulation format for AMR-WB+. The Playaways use the raw format.
The raw format file structure is explained in 3GPP TS 26.290 V17.0.0 (2022-04) (.zip attached) at chapter 8 starting on page 78. The 3gp format is already known I guess.
The audio encoding is explained in the chapters before.

The example encoder and decoder which run fine with wine are explained in 3GPP TS 26.304 V17.0.0 (2022-04) (.zip attached).
I would be able and willing to test files created with ffmpeg using my Playaway hardware.
Attached as samples.zip you can also find encodings with different bitrates and formats which were created using encoder.exe.

by LanMarc77, 7 months ago

Attachment: 26304-h00.zip added

3GPP TS 26.304 V17.0.0 (2022-04) Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Floating-point ANSI-C code

comment:4 by LanMarc77, 7 months ago

There is also a Linux port of the encoder/decoder https://github.com/kholia/amr-wbp-plus
I can confirm that this ports creates files that can be played on Playaway hardware.

Note: See TracTickets for help on using tickets.