CannotReadException with m4a file
I'm receiving a CannotReadException with the attached m4a file. The exception message says the file is either corrupted or an mp4.
I'm however able to edit it with any other tag editor. I'm using JAudioTagger 2.2.6.
Comments (25)
-
repo owner -
repo owner Atomic Parsley reports:
C:\Apps\AtomicParsley-win32-0.9.0\AtomicParsley-win32-0.9.0>atomicparsley test.m4a -T AtomicParsley error: unsupported MPEG-4 file brand found 'dash'
so it seems the file is non-standard at tleast
-
I second this. All files downloaded from Youtube (e.g. via youtube-dl or NewPipe) possess this error.
-
-
Looks like STBL header is located after SMHD header, not before
-
https://forum.videolan.org/viewtopic.php?t=115509 - Example of structure
-
@ijabz can you do something about this situation?
-
repo owner Are they actually video files (i.e Youtube) or just audio, because if they are video jaudioatgger should fail to read them
-
@IJabz I couldn't see any video stream so I suppose audio only
-
@Antic1tizen is correct, in fact replacing this line with:
mvhdBuffer.position(pos);
is now successfully reading the file. I don't know whether it is safe or not to do so. Writing it, throws an exception about discrepancy, because it's badly calculating the length difference of audio data I suppose...
-
I just now read tags from an m4a file downloaded from Youtube and had no issues. Has this been resolved?
-
@Xerus2000 would you try the provided file?
-
Okay, the error appears with that one. Apparently I've edited my file once with mp3tag and that fixed it.
-
repo owner The error is specific to this file, doesn't apply to all mp4 files
-
@ijabz it applies to all mpeg dash files. As I said above, changing one line of code will make the read succeed
-
repo owner okay, great )but what exactly is an mpeg dash file) but we need a fix that will work for these but not break other mp4s
-
@IJabz We have tests for that, right?
@fillobotto Did you test tag saving back to the file? Does it rewrite dash-mp4 header?
-
repo owner Yes but thats not the point, it will clearly not work for regular mp4s.
-
@Antic1tizen I didn't really check the structure after having the file edited.
When I tried to change the library, the writing process failed because of a discrepancy test. Commented it out, the thing apparently worked fine for every kind of mp4s.
-
repo owner - changed status to resolved
Okay, your change seems to work so committed, thanks
-
Wait, this is closed, does that mean I can read/write dash-files?
-
@Antic1tizen read yes, write no. I gives error in a discrepancy test. It must be fixed or at least commented out.
-
repo owner Whats the error, everthing passes for me
-
@ijabz I just remembered that I tested it using a pretty old commit so it was likely to be fixed.
-
@ijabz I'm still getting error while writing to mp4 dash files. Using Android and jaudiotagger 2.2.3:
org.jaudiotagger.audio.exceptions.CannotReadException: This file does not appear to be an Mp4 Audio file, could be corrupted or video at org.jaudiotagger.audio.mp4.Mp4InfoReader.read(Mp4InfoReader.java:195) at org.jaudiotagger.audio.mp4.Mp4FileReader.getEncodingInfo(Mp4FileReader.java:41) at org.jaudiotagger.audio.generic.AudioFileReader.read(AudioFileReader.java:104) at org.jaudiotagger.audio.AudioFileIO.readFile(AudioFileIO.java:288) at org.jaudiotagger.audio.AudioFileIO.read(AudioFileIO.java:151)
- Log in to comment
stack trace when read is