[Cin] OT: multichannel mpeg 2 audio encoder/decoder hacks!
Andrew Randrianasulu
randrianasulu at gmail.com
Tue Jan 23 02:16:09 CET 2024
https://github.com/Randrianasulu/mctoolame-experiments-enc
(encoder)
and
https://github.com/Randrianasulu/mctoolame-experiments
(decoder)
I think they roundtrip finally!
You need to check non-default branch 'master' (it just happen to be
default on my Slackware's git install!)
then try to make in each folder
initial source aiff was made with SoX (-M mode)
bash-5.1$ ./mctoolame 5ch.aiff
ISO MPEG Audio Subgroup Software Simulation Group (1996)
ISO 13818-3 MPEG-2 Audio Multichannel Encoder
$Revision: 2.0 $
Num. ch: 5
Samples per frame 511584
Sample size in bits 16
Sample rate 48000.000000
Sound data is not PCM in "5ch.aiff".
>>> Using 3/2 configuration.
Encoding configuration:
Layer=II mode=stereo extn=0 psy model=1
samp frq=48.0 kHz mpeg1 bitrate=192 kbps
No multilingual coding.
de-emph=0 c/right=0 orig=0 errprot=0
matrix=0 center=1 surround=2 stereo=2 stereomc=3 stereoaug=0
input file: '5ch.aiff' output file: '5ch.aiff.mp2'
bash-5.1$ mc
bash-5.1$ rm *.wav
bash-5.1$ ../lamedecoder/mctoolamed 5ch.aiff DECODED
ISO MPEG Audio Subgroup Software Simulation Group (1996)
ISO 13818-3 MPEG-2 Audio Multichannel Decoder
$Revision: 2.2 $
Could not find "5ch.aiff.ext".
No extension bitstream <5ch.aiff.ext> present
Input file = '5ch.aiff.mp2'
Output file = 'DECODED.aiff' >>>
A MPEG 2 Layer-1/2 bitstream will be decoded
Output file written in AIFF format
the bit stream file 5ch.aiff.mp2 is a BINARY file
HDR: s=FFF, id=1, l=2, ep=1, br=A, sf=1, pd=0, pr=0, m=0, js=0, c=0, o=0, e=0
layer=II, MPEG1-bitrate=192, sfrq=48.0, mode=stereo, sblim=27,
jsbd=27, MPEG1-ch=2
mc-channel=3, MPEG2-ext-length=0 kbit/s
initialising 5 output files
next mpg header not found
Frame cannot be located, end of input stream
Decoding of "5ch.aiff.mp2" with 445 frames is finished
The decoded PCM output file name is "DECODED.aiff"
"DECODED.aiff" has been written with AIFF header information
bash-5.1$ cin *.wav
Cinelerra Infinity - built: Dec 22 2023 12:26:23
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams
2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy
2003-2017 mods for Cinelerra-CV by CinelerraCV team
2015-2023 mods for Cinelerra-GG by Cinelerra-GG team
Libav version: Lavc60.31.102
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.
RenderFarmClient::main_loop: client started
Total excess of backups: -50
Session time: 0:01:58
Cpu time: user: 0:00:27.111 sys: 0:00:06.654
bash-5.1$ cin DECODED.aiff
Cinelerra Infinity - built: Dec 22 2023 12:26:23
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams
2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy
2003-2017 mods for Cinelerra-CV by CinelerraCV team
2015-2023 mods for Cinelerra-GG by Cinelerra-GG team
Libav version: Lavc60.31.102
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.
RenderFarmClient::main_loop: client started
Total excess of backups: -50
Session time: 0:00:52
Cpu time: user: 0:00:06.783 sys: 0:00:01.854
bash-5.1$ rm DECODED.aiff
bash-5.1$ rm *.wav
bash-5.1$
I think for viewing decoded files one AIFF file is better ?
Note, I only tested them on x86-32 Slackware!, currently broken on Big
Endian (native for AIFF sound format) hardware
More information about the Cin
mailing list