-
Notifications
You must be signed in to change notification settings - Fork 179
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
MP4: improve display of operating system and hardware #2189
base: master
Are you sure you want to change the base?
MP4: improve display of operating system and hardware #2189
Conversation
Here is the output with MediaInfo built from this branch on a video from S23 Ultra that someone sent to me:
Performer is still there... and hardware missing 'Galaxy S23 Ultra'... not expected right? For another model looks fine:
|
I created a file based on what I understood as being there, looks like it is not the exact way in the file :(. |
Argh, I see, I wrongly wrote "Samsung" instead of "Galaxy" in the file, I change my file and tweak the code. |
The thing is, some Samsung phones contain Samsung there and some Galaxy... |
I will manage both. |
What is the exact string of a file having "Samsung"? |
MediaTrace of file from Galaxy S23: #2179 (comment) I only have files from two types of Samsung phones so don't know if there are other possibilities. Both phones not mine. So far I have not seen other brand Android phones that write this kind of info. Others only have |
So no "S23" with "Samsung", always with "Galaxy".
Even my A41 does not have any info... but still good to show when it is present, and we'll see if we find more... |
I mean, "Samsung" seems used for the model (technical) name, "Galaxy" for the marketing name, at least up to now. |
This PR causes performers such as "Samsung Electronics Nano Philharmonic Orchestra" to not be displayed correctly. |
Argh! I need to find a more proper way... Maybe with testing only "Galaxy" there, not "Samsung". |
I just tried tagging the previous sample file with Mp3tag. That orchestra name I found on Google. If the Samsung metadata is removed first then it shows performer correctly. Take note that someone might be named Galaxy too 😉 |
Sample after tagging with Mp3tag: |
At some point I need to have a rule... :( |
For some reason, the performer saved by the phone does not show in Mp3tag or FFmpeg. Only the one added by Mp3tag shows. So there is a difference? |
This file has 2 "Performer" fields, one old fashion "auth" atom and another "©ART" in "meta" atom, but I see the idea. |
Focused on Android (Samsung and Google) and iOS but also handle some cameras
9f12d43
to
b6af6d3
Compare
I updated this PR with handling all the cases I found, including a Google Pixel 9, which has yet another method for providing the model name, and also synthetical files, which is maybe not good but let's start with such coverage and we see how it behave in practice with lot of users. |
Still has issues: M32 + Mp3tag Artist tag containing Samsung (exactly two words such as Samsung Staff / Samsung Orchestra):
Not OK, missing Artist/Performer M32 + Mp3tag Artist tag containing Galaxy:
Not OK, Artist/Performer becomes hardware model name S23 + Mp3tag Artist tag containing Samsung (exactly two words such as Samsung Staff / Samsung Orchestra):
Not OK, missing Artist/Performer S23 + Mp3tag Artist tag containing Samsung:
Not OK, Artist/Performer becomes hardware model name S23 + Mp3tag Artist tag containing Galaxy:
Not OK, , Artist/Performer becomes hardware model name S23 + Mp3tag Artist tag not containing anything related to Samsung Galaxy:
Not OK, , Artist/Performer becomes hardware model name S23
OK M32
OK M32 + Mp3tag Artist tag containing Samsung:
OK M32 + Mp3tag Artist tag not containing anything related to Samsung Galaxy:
OK Just Mp3tag Artist tag containing Galaxy (or Samsung):
OK Apple:
OK |
Trace of the Galaxy S23 file: User Data (udta) + Metadata (meta)
|
Updated comments above after re-testing because just now GitHub Desktop did not pull latest commits. I though clicking Checkout here will checkout exactly what is on this PR since previous local branches have been deleted but that is not how Git works. |
Galaxy S23, after tagging multiple Artist with Mp3tag:
Trace: User Data (udta) + Metadata (meta)
|
This is an arbitrary choice (short --> model name) because it is impossible to know if the value is an artist or model name without a database. So either we do this way or we don't consider any model name beginning by "Samsung" as a model name. Note: but it should not be completely removed, I expected that it is in the model name, I check.
Same about the arbitrary choice, but I wish to keep this one (if company is Samsung and Artist is short and starts with Galaxy for catching a real use case, the S23 thing). Any other suggestion for catching the S23 while not catching your example?
I'll implement something better there but this seems highly hypothetical case... |
What about detecting |
and maybe also don't run detection on the meta tags and only on auth atom. Since Mp3tag/FFmpeg and Samsung uses different tags. So that whatever user tags using tools they likely use, it won't be wrongly detected. |
A balance between conservative and more risk. if Samsung releases a Galaxy B something, it is not caught. Note: that said, I bet that Samsung will avoid the Artist tag in the future, using Google method, we'll see...
Right, I don't know yet what I want there, but for the moment I would keep as is (catching all "performer" fields) |
Then |
Doesn't catch |
Does not work with Please argue against |
OK this should work. letters part probably some small limit of characters. When I put |
On second thought, maybe better to relax the filtering and just check the auth atom instead. Examples: May not even need a filter since Mp3tag and FFmpeg don't even care about the auth atom so it is unlikely to contain user added data if the video originates from a Samsung device. |
It is used somewhere else and the reason we handle it as Performer. I'll implement something based on letters then digits then letters, catch of 2 uppercase letters, catch of digit at the end, for catching all known cases while avoiding to catch your other examples and we'll start with that, enough time spent on that. |
Improvement of #2179.
Focused on Android and iOS but also handle some cameras, and XML or JSON outputs have separate fields for company name, product name, model, similar to writing app and library.
e.g.
cc @cjee21.