Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output file corrupt #23

Open
crra opened this issue Aug 30, 2022 · 5 comments
Open

Output file corrupt #23

crra opened this issue Aug 30, 2022 · 5 comments

Comments

@crra
Copy link
Owner

crra commented Aug 30, 2022

Hello @crra

Thank you for making this addition.

There is something about the created output file that Windows Media Player doesn't like, unfortunately. I can play it with VLC though.

Using mpck (https://github.com/Sjord/checkmate) on the built file, it reports the following:

SUMMARY: foo.mp3
    version                       MPEG v1.0
    layer                         3
    average bitrate               -21743 bps (VBR)
    samplerate                    44100 Hz
    frames                        2020051
    time                          -743:-42.-869
    unidentified                  886 b (0%)
    errors                        unidentified bytes
                                  inconsistent frame headers
                                  invalid header values
    result                        Bad

If I use the same tool on the (397) source files, they are all reported OK.

I hope that helps. Please let me know if you need me to run anything else over the files.

Originally posted by @pcolmer in #22 (comment)

@crra crra changed the title Output file invalid Output file corrupt Aug 30, 2022
@pcolmer
Copy link

pcolmer commented Aug 30, 2022

@crra Please download the following two files from OneDrive:

https://1drv.ms/u/s!AmDqniI9VUvGgZdQ2X2ODQd5QnBnHQ?e=Dy5i8D
https://1drv.ms/u/s!AmDqniI9VUvGgZdPqnAMNw_iS7MBoQ?e=f3JbgG

The links are valid until Saturday.

The original filenames are 'Matthew Reilly - Ice station 01 - 01.mp3' and 'Matthew Reilly - Ice station 01 - 02.mp3'. I then used this command:

mp3binder --verbose 'Matthew Reilly - Ice station 01 - 01.mp3' 'Matthew Reilly - Ice station 01 - 02.mp3' --output ~/tmp.mp3 --lang "en-GB"

and ran mpck over ~/tmp.mp3 and it reported:

$ mpck ~/tmp.mp3
SUMMARY: /home/philip/tmp.mp3
    version                       MPEG v2.0
    layer                         3
    average bitrate               69595 bps (VBR)
    samplerate                    44100 Hz
    frames                        9975
    time                          4:20.571
    unidentified                  473 b (0%)
    errors                        unidentified bytes
                                  inconsistent frame headers
                                  invalid header values
    result                        Bad

I'm running mp3binder in Ubuntu 20.04.4 on WSL2 Windows 11.

@crra
Copy link
Owner Author

crra commented Aug 30, 2022

I have the files, you can delete them now. I'll look into it.

@crra
Copy link
Owner Author

crra commented Aug 30, 2022

Here is a first clue:

$ sox -m M* sox.mp3
sox WARN sox: Input files don't have the same # channels
$ file 01.mp3
Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v2,  96 kbps, 22.05 kHz, >>JntStereo<<
$ file 02.mp3
Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v2,  64 kbps, 22.05 kHz, >>Monaural<<

@pcolmer
Copy link

pcolmer commented Sep 1, 2022

@crra Here is the third file: https://1drv.ms/u/s!AmDqniI9VUvGgZdO25YHBoV6K8YSqw?e=ekG0ni

$ sox -m 'Matthew Reilly - Ice station 01 - 02.mp3' 'Matthew Reilly - Ice station 01 - 03.mp3' sox.mp3
$ mpck sox.mp3
SUMMARY: sox.mp3
    version                       MPEG v2.0
    layer                         3
    bitrate                       32000 bps
    samplerate                    22050 Hz
    frames                        7080
    time                          3:04.946
    unidentified                  0 b (0%)
    errors                        none
    result                        Ok

However, if I use mp3binder to join these two files, I still have a problem with the created output:

$ mp3binder --verbose 'Matthew Reilly - Ice station 01 - 02.mp3' 'Matthew Reilly - Ice station 01 - 03.mp3' --output ~/tmp.mp3 --lang "en-GB"
The following language will be used: 'en-GB'
The following files will be 'bound' as: '/home/philip/tmp.mp3'
- 1: /mnt/c/Users/phili/OneDrive/Audio books/Matthew Reilly/Scarecrow01 - Ice Station/Matthew Reilly - Ice station 01 - 02.mp3
- 2: /mnt/c/Users/phili/OneDrive/Audio books/Matthew Reilly/Scarecrow01 - Ice Station/Matthew Reilly - Ice station 01 - 03.mp3
Processing stage: 'Bind' and action: 'Binding'
- Binding: 'Matthew Reilly - Ice station 01 - 02.mp3'
- Binding: 'Matthew Reilly - Ice station 01 - 03.mp3'
Processing stage: 'Apply Metadata' and action: 'applying text metadata'
- Adding tag: 'Software/Hardware and settings used for encoding (TSSE)' with value 'https://github.com/crra/mp3binder, 5.0.0+15-g655792e'
- Adding tag: 'Title (TIT2)' with value 'Scarecrow01 - Ice Station'
- Adding tag: 'Track number/Position in set (TRCK)' with value '1'
Processing stage: 'Apply Metadata' and action: 'notify visitor'
Processing stage: 'Build Chapers' and action: 'adding chapters'
- Adding tag: 'Chapter: 1 from '0s' to '3m5s'' with value '2/397 Ice Station'
- Adding tag: 'Chapter: 2 from '3m5s' to '5m34s'' with value '3/397 Ice Station'
Processing stage: 'Write Metadata' and action: 'writing metadata'
Processing stage: 'Combine Id3 And Audio' and action: 'combining metadata and audio'

$ mpck ~/tmp.mp3
SUMMARY: /home/philip/tmp.mp3
   version                       MPEG v2.0
   layer                         3
   average bitrate               58685 bps (VBR)
   samplerate                    44100 Hz
   frames                        12770
   time                          5:33.583
   unidentified                  204 b (0%)
   errors                        unidentified bytes
                                 inconsistent frame headers
   result                        Bad

I hope that helps.

@pcolmer
Copy link

pcolmer commented Sep 6, 2022

Out of interest, I've just used mp3cat to try joining the two files and it also generates a bad output file. Interestingly, the file generated by sox is NOT variable bitrate. I know I've successfully used mp3cat before with VBR files so I'm curious as to what is "special" about these files :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants