Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,347
|
ATRAC3Plus .WAV files: how to unbork them
As everybody already knows, since Sony released the command-line .EXEs at3tool and PS3at3tool ages ago,
it's possible for anyone to convert 16-bit 44.1 & 48 kHz PCM audio to .WAV-wrapped atrac3plus streams. The problem is, such .WAV files contain an irregular FACT chunk, which "confuses" the normal AVI muxers and makes these generate broken .AVI files. So those borked .WAV files must be fixed through a hex editor. In a "normal" 44.1 kHz at3+ WAV, the dwSampleLength field is 8 bytes long and the cksize field says "08 00 00 00". In a "normal" 48 kHz at3+ WAV, the dwSampleLength field is 12 bytes long and the cksize field says "0C 00 00 00". So all one has to do is 1) delete the last 4 or 8 bytes between the actual dwSampleLength value and the data chunk && 2) overwrite "08" or "0C" with "04" in the cksize field. Then the fixed at3+ .WAV file is processed normally by VirtualDub — but not by AVI-Mux GUI nor by ffmpeg ![]() NOTICE: the resulting .AVI files are demuxed correctly by LAV Splitter, Microsoft AVI Splitter, MPlayer and MPV, but not by the current internal AVI splitter of MPC-BE (1.5.7.6180) :-/ sample file: https://www.mediafire.com/file/zntw0...0x720.avi/file Last edited by filler56789; 10th June 2021 at 06:50. Reason: update |
![]() |
![]() |
![]() |
#2 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,730
|
I'm not sure if your sample avi have the problematic atrac3p track or the already edited and correct track.
ffmpeg inform of the .avi file: Quote:
Code:
File ........: C:\tmp\0136MF-intro-interview-960x720.wav Size ........: 75916208 bytes ---------------------------------------------- Header Info ChunkID .....: RIFF RiffLength ..: 75916200 Container ...: WAVE SubchunkID ..: fmt (Length: 40) AudioFormat .: 65534 (WAVE_FORMAT_EXTENSIBLE) NumChannels .: 2 SampleRate ..: 44100 ByteRate ....: 352800 BlockAlign ..: 8 BitsPerSample: 32 ValidBitsPS .: 32 MaskChannels : 3 (FL FR) SubType .....: 3 (Float) SubchunkID ..: JUNK (Length: 52) SubchunkID ..: data (Length: 75916080) Offset data .: 128 Duration ....: 215.18163 sec., (0h. 3m. 35.18163s.) ------------------------------------------------- End Info The .wav play without problems in mpc-hc, vlc, foobar2000, Audacity and GoldWave Can you upload the problematic track?
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 10th June 2021 at 09:38. |
|
![]() |
![]() |
![]() |
#6 | Link | ||
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,347
|
Quote:
To make things clearer: the atrac3+ stream itself was not modified at all, what I had to change is its .WAV header — otherwise VirtualDub would generate an unplayable .AVI file :-/ Whereas both AVI-Mux GUI and ffmpeg always fail at muxing, regardless of how correct is the .WAV header of the .at3+ track. Quote:
Last edited by filler56789; 10th June 2021 at 18:10. Reason: more clarity |
||
![]() |
![]() |
![]() |
#8 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,730
|
Quote:
__________________
BeHappy, AviSynth audio transcoder. |
|
![]() |
![]() |
![]() |
#9 | Link | ||
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,730
|
Quote:
The created by the at3tool is: Code:
File ........: C:\tmp\Test\at3\file2.wav Size ........: 3448536 bytes ---------------------------------------------- Header Info ChunkID .....: RIFF RiffLength ..: 3448528 Container ...: WAVE SubchunkID ..: fmt (Length: 52) AudioFormat .: 65534 (WAVE_FORMAT_EXTENSIBLE) NumChannels .: 2 SampleRate ..: 44100 ByteRate ....: 16021 BlockAlign ..: 744 BitsPerSample: 0 (WARNING: must be 8 multiple to verify BlockAlign) ValidBitsPS .: 2048 MaskChannels : 3 (FL FR) SubType .....: 43711 (Search in MMREG.H) SubchunkID ..: fact (Length: 8) SampleLength : 9489510 (fact Duration: 215.18163 sec.) SubchunkID ..: data (Length: 3448440) Offset data .: 96 Duration ....: 215.24499 sec., (0h. 3m. 35.24499s.) ------------------------------------------------- End Info Quote:
But maybe the RiffLength ..: 3448528 D0 9E 34 00 must also to be modified to 3448524 -> CC 9E 34 00
__________________
BeHappy, AviSynth audio transcoder. |
||
![]() |
![]() |
![]() |
#10 | Link | |
Registered User
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 741
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,347
|
Quote:
![]() LeeAudBi6, both 32-bit and 64-bit .EXEs + source-code. https://www.mediafire.com/file/92jhv...udBi6.rar/file Last edited by filler56789; 13th June 2021 at 22:35. Reason: more info |
|
![]() |
![]() |
![]() |
#13 | Link | |
Registered User
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 741
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
atrac, atrac3, atrac3plus, leeaudbi, leeaudbi6 |
Thread Tools | Search this Thread |
Display Modes | |
|
|