- edited description
CannotReadException: Unable to determine start of audio in file
I have just implemented jaudiotagger and editong mp3 files works fine. However I am stuck at the opening of an m4a file. I have tried many different m4a files but the error occurs for all. Looking at the output, it clearly reads the file. How can I progress?
public String getmp4AlbumTag(File SourceFile)
throws Exception {
String album = null;
try {
AudioFile musicFile = AudioFileIO.read(SourceFile);
if (musicFile != null ) {
Mp4Tag tag = (Mp4Tag)musicFile.getTag();
if(tag!=null) {
album = tag.getFirst(Mp4FieldKey.ALBUM);
}
}
} catch (CannotReadException | IOException | TagException
| ReadOnlyFileException | InvalidAudioFrameException e5) {
throw e5;
}
return album;
}
Stacktrace:
11-22 10:04:03.366 2165-2165/com.flyingdutchman.newplaylistmanager I/org.jaudiotagger.audio: Reading file:path/storage/sdcard/Music/Top20/01. Omi - Cheerleader (Felix Jaehn Remix Radio Edit).m4a:abs:/storage/sdcard/Music/Top20/01. Omi - Cheerleader (Felix Jaehn Remix Radio Edit).m4a
11-22 10:04:03.366 2165-2165/com.flyingdutchman.newplaylistmanager I/generic: File /storage/sdcard/Music/Top20/01. Omi - Cheerleader (Felix Jaehn Remix Radio Edit).m4a being read
11-22 10:04:03.366 2165-2165/com.flyingdutchman.newplaylistmanager I/atom: Encoding infos content:
SAMPLING : 44100
PROFILE : LOW_COMPLEXITY
CHANNB : 2
VBR : true
INFOS :
BITRATE : 256
KIND : MPEG4_AUDIO
BRAND : M4A
LENGTH : 180.0
TYPE : AAC
11-22 10:04:03.366 2165-2165/com.flyingdutchman.newplaylistmanager W/System.err: org.jaudiotagger.audio.exceptions.CannotReadException: Unable to determine start of audio in file
11-22 10:04:03.366 2165-2165/com.flyingdutchman.newplaylistmanager W/System.err: at org.jaudiotagger.audio.mp4.Mp4AtomTree.buildTree(Mp4AtomTree.java:191)
Comments (10)
-
repo owner -
repo owner Could you email support@jthink.net a problem file please
-
repo owner Are you using the latest code in source control ?
-
reporter In Gradle I have added:
// https://mvnrepository.com/artifact/org/jaudiotagger
compile group: 'org', name: 'jaudiotagger', version: '2.0.3'
regards, Theo Klink. http://www.theo.klinkweb.nl
-
reporter Do you mean the Stacktrace and code or something specific?
regards, Theo Klink. http://www.theo.klinkweb.nl
-
repo owner I meant an audio file, but if you are using 2.0.3 that is extremely old, you need to use the latest code base, and then I expect it will work
-
reporter Thanks, I will get the latest version first before I send any files.
regards, Theo Klink. http://www.theo.klinkweb.nl
-
reporter I am having all sorts of trouble with jaudiotagger-2.2.6-SNAPSHOT.jar but jaudiotagger-2.2.4-SNAPSHOT.jar seems to behave.
jaudiotagger-2.2.6-SNAPSHOT.jar fails when trying to read the file. It gets to
private void prepareReadersAndWriters()
where is crashes on
this.writers.put(SupportedFileFormat.FLAC.getFilesuffix(), new FlacFileWriter());
with the following:
this=com.android.internal.os.ZygoteInit$MethodAndArgsCaller ex=java.lang.reflect.InvocationTargetException cause=java.lang.VerifyError: org/jaudiotagger/audio/flac/FlacTagWriter
-
repo owner The latest codebase doesnt work with Android (see the issue list) , but Ill close this issue now it is resolved
-
repo owner - changed status to resolved
Fixed by updating to a later version
- Log in to comment