-
Notifications
You must be signed in to change notification settings - Fork 494
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
show languages on statusbar #627
Conversation
When track language is unknown it incorrectly shows the locale language. It also shows squares (invalid char) for the two unicode chars here. |
It seems it only works for internal track. |
I fixed it by checking if lcid is null. |
Yes, it also seems to fail for external subs. |
Another bug: it only updates the audio language when creating the menu, not when changing the selection in the menu |
External sub can signal language in filename: movie.eng.srt |
Good sample to test the audio menu issue: |
should be fixed
Will look into that |
It seems GetStreamInfo() doesn't get the lcid without passing the pName as well, should be fixed. |
Chinese have many variants, such as zh_cn, zh_tw, zh_hk, zh_hans, zh_hant etc. It seems mpc-hc identify them all as zh_hans. This is another problem. |
Maybe, but I misread your other statement, it was talking about internal (which I had thought before was working, but in this case it wasn't). |
Yea. It also only display zh- on OSD. It seems missing the variant of a language. |
LAVFilters did not get an LCID at all. The name gets [zh-] only. |
So vlc has same bugs. |
How do you know it's a bug? |
This is what I could extract using mkvinfo: | + Track Looks like it knows more about the languages than mpc-hc |
Maybe MPC-HC should just display Chinese but not Chinese(Simplified). |
Looks like it's a bug in MatroskaParser. It's quite an old source and can only read 3 characters of the lang, hence the zh- that shows up. |
I do think matroskaparser is pulling too little data, as the matroska spec allows for a 639-2 code plus a dash and country code. But this mkv is actually not following spec. The "Language" tag cannot have a bcp47 code, yet that's exactly what zh-Hans is. And mkvtoolnix does not recognize it but changes it to zh. If you want to use bcp47 you have to use languageietf. Once I've done that, the mkv actually shows ZHO, and chose "chi" in the menu. I'm not sure how it did that, as matroskaparser doesn't even understand languageietf--maybe it defaulted to something else. So, mpc-hc doesn't parse the whole tag, but it's not a valid tag anyway. If it were a valid tag, it probably would work better. But to get zh-hans you would need ietf tag, which mpc-hc doesn't support. |
Some related PRs: clsid2/FFmpeg#1 After these changes and updating your MKV to have the same tags, but in a valid field (LanguageIETF), we get the following: |
No description provided.