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

Recoverable frame level error while processing MP3 file #196

Closed
SolarGuy8 opened this issue Mar 20, 2024 · 11 comments
Closed

Recoverable frame level error while processing MP3 file #196

SolarGuy8 opened this issue Mar 20, 2024 · 11 comments

Comments

@SolarGuy8
Copy link

Hi!

I have a problem with file, which almost down our production env. It's an MP3 file and my processing command:

audiowaveform -i 3a13529c-bad0-4278-a0ff-17cefda8168b.mp3 --pixels-per-second 1 --bits 8 --output-format json

The result:

Recoverable frame level error: reserved sample frequency value
Recoverable frame level error: lost synchronization
Recoverable frame level error: forbidden bitrate value
Recoverable frame level error: reserved sample frequency value
Recoverable frame level error: forbidden bitrate value
Recoverable frame level error: forbidden bitrate value
...

Ffmpeg result:

[STREAM]
index=0
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=11140096
duration=252.609887
bit_rate=93609
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=10879
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=2
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:language=und
TAG:handler_name=SoundHandler
TAG:vendor_id=[0][0][0][0]
[/STREAM]
[FORMAT]
filename=3a13529c-bad0-4278-a0ff-17cefda8168b.mp3
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=252.609887
size=3000205
bit_rate=95014
probe_score=100
TAG:major_brand=M4A 
TAG:minor_version=512
TAG:compatible_brands=isomiso2
TAG:encoder=Lavf57.28.100
TAG:comment=highlight_start:2193 highlight_end:28596 user_delay=0
[/FORMAT]

Could you help me? Cause I really don't know what I should do with this problem

@chrisn
Copy link
Member

chrisn commented Mar 20, 2024

The ffmpeg output shows that this file isn't MP3 format, it's AAC, which audiowaveform doesn't support.

@SolarGuy8
Copy link
Author

@chrisn, could you please provide a list of supported codecs?

@chrisn
Copy link
Member

chrisn commented Mar 21, 2024

The documentation for the --input-filename and --input-format command line options describe the supported formats.

@SolarGuy8
Copy link
Author

SolarGuy8 commented Mar 21, 2024

@chrisn, some of our tracks have mp3 extenstion, but codec:

codec_name=pcm_s16le
codec_long_name=PCM signed 16-bit little-endian

or

codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)

it's also not OK? We should have codec_name=mp3 for this case?

@SolarGuy8
Copy link
Author

And why audiowaveform doesn't throw an error in this case, but still tries to get the data and the process goes on forever? Interrupts only when I kill the instance myself

@chrisn
Copy link
Member

chrisn commented Mar 21, 2024

audiowaveform will behave unexpectedly if the actual formal of the audio doesn't agree with the file extension or the --input-format option.

For formats that audiowaveform doesn't support, you could try converting using ffmpeg first, e.g:

ffmpeg -i test.mp4 -f wav - | audiowaveform --input-format wav --output-format json -b 8 > test.json

@SolarGuy8
Copy link
Author

Codec name should be mp3 only? Not pcm_s16le or aac

@chrisn
Copy link
Member

chrisn commented Mar 21, 2024

This is described in the documentation I linked to: wav, mp3, flac, ogg, opus, raw.

@chrisn
Copy link
Member

chrisn commented Mar 21, 2024

And why audiowaveform doesn't throw an error in this case, but still tries to get the data and the process goes on forever? Interrupts only when I kill the instance myself

This is something that could be improved, yes.

@SolarGuy8
Copy link
Author

Okay, thank you! I really enjoy your library, thank you for your help!

@chrisn
Copy link
Member

chrisn commented Mar 21, 2024

Thanks! I appreciate your feedback.

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