Closed mphill closed 4 years ago
Hello and thanks for your feedback.
I'll need the MP4 file to test this one. Could you send a download link please?
I have uploaded an original and the file after tags are added: https://github.com/mphill/atldotnet/tree/master/TestSamples
Once the tags are added, the file no longer will play.
Thanks for looking at this!
Got it. I'll take a look and let you know.
That bug happens because the file you used doesn't have any udta
atom. While its absence is legit according to specs, I never encountered it so far, and the current library doesn't know how to handle it.
As a consequence, it uses a fallback behaviour, that is writing an ID3v2 tag instead of the standard MP4 tag.
Stay tuned for the fix 😉
I've pushed a fix to the main repo. Tell me if you can test it or if you prefer a compiled library.
I'll publish it to NuGet as soon as you confirm it works for you.
Cheers~
The issue appears to be resolved. Thank you! Even the embedded images work.
Another issue, unrelated to your library - but it might be able to help.
On MacOS and iOS these files appear to be double the length of the file, so the audio plays, then half way is silent for the remainder. I.E., a 5 minute audio file with show as 10 minutes, with the second half silent.
I suspect this is because the native audio players (QuickTime on MacOS and AVPlayer on iOS) see 2 tracks, one for video that does not exist and another for the audio. That's my theory at least.
Can your library remove these video meta tags - essentially "cleaning up" the file?
Awesome, thanks for your fast reply 👍
Does the issue you describe appear with the edited file ? Or with the original file ?
Both files have the duration issue. Before going through and ATL and after. I am wondering if I might be able to completely remove the video meta data from this file using ATL. I think that might clear up the duration issue.
I didn't see anything in the docs that might expose that meta data so I can take it out, I do see a Remove
method that takes an int.
While you were replying, I've been able to reproduce that issue by opening the original with iTunes. All other players I have (foobar, VLC, Winamp, AIMP, MusicBee, Media player classic) open it with the correct duration but have issues when trying to jump in the middle of the track.
Imho, the potential issue is not a video vs. audio track issue, as it has one unique audio track.
By examining it closely (with AtomicParsler), it has something very different than the usual MP4's I'm used to working with : instead of one "physical data" mdat
atom, it has a bunch of them, interleaved with moof
atoms, which makes it a fragmented MP4. I'll do some more research and keep you informed on a separate issue, as this one is solved.
Follow-up in #61. Please subscribe to the new issue
Fixed by v3.05 (now available from NuGet)
This issue appears to still show with video mp4s that come from youtube. Let me know if you need a sample. Thanks.
The library hasn't been designed with videos in mind, so this in uncharted territory.
I'll open a new issue, do some tests and ask you if I need samples.
Wait, which issue are you talking about ? Double length or file seen as an MP3 by exiftool ?
The length is actually fine in the case of the video.
If you download a video, it will play fine. Add some tags with ATL, and the video will no longer play.
I believe this specific to only youtube mp4s - but could be applicable to other mp4s
Follow-up created in #62 as what you found is on video files
The problem
When adding tags to an mp4 file (ISO Media, MPEG v4 system, Dynamic Adaptive Streaming over HTTP) the file become unplayable afterwards
Environment
Details
There are no errors produced.
Code To Reproduce Issue [ Good To Have ]
A basic example will reproduce the issue:
This is an exiftool dump from the original file:
After saving tags:
The file's metadata seems to get mutated into an mp3