[FFmpeg-trac] #7233(avcodec:new): Problem with decoding gta3 sound assets in c++ lang
FFmpeg
trac at avcodec.org
Mon May 28 00:49:51 EEST 2018
#7233: Problem with decoding gta3 sound assets in c++ lang
---------------------------------+---------------------------------------
Reporter: shfil | Type: defect
Status: new | Priority: normal
Component: avcodec | Version: unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+---------------------------------------
Summary of the bug: ffmpeg 4.0 broke mp3 compatibility with openAL
buffers(AV_SAMPLE_FMT_S16P)
How to reproduce: download latest version of openRW(requires gta3 assets),
after starting new game there's no sound in cutscenes (mp3 stereo example:
BET.mp3)
I think it's caused by switching from decoder mp3 to mp3float.
I was trying to use workaround - libswresampler. Mp3 started working, but
then started happen problems with mono wav(pcm). FFmpeg doesn't recognized
channel_layout and crashes. To fix it I've set it manually every time when
nr channels is equal one. But then when playing these sounds it possible
to hear cracking/ticking. I would say artifacts.
(there's also 80MB file with short pcm sounds, with resampling sounds are
distorted and audible everywhere(in binaural mode))
code:
https://gist.github.com/ShFil119/ebd0cf30632c89aa393913b1abf52594
pull on which I work:
https://github.com/rwengine/openrw/pull/420/files
manually trying to decode:
https://gist.github.com/ShFil119/affd3afdaa737063dba5fd115277a720
ffmpeg version 4.0
built on arch linux
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7233>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list