Skip to content
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

Incorrect encoding in the notification area #4891

Open
2 tasks
ademaro opened this issue Apr 24, 2024 · 5 comments
Open
2 tasks

Incorrect encoding in the notification area #4891

ademaro opened this issue Apr 24, 2024 · 5 comments

Comments

@ademaro
Copy link

ademaro commented Apr 24, 2024

System and IINA version:

  • macOS 14.3.1 (23D60)
  • IINA 1.3.4 Build 140

Expected behavior:
Normal display of file name

Actual behavior:

Screenshot 2024-04-24 at 17 11 55

Steps to reproduce:

  • Open a file with a non-Latin name.
  • Look in the notification area.
@low-batt
Copy link
Contributor

Can you provide an example filename that triggers the problem?

@Nemowang2003
Copy link

I can provide a perfect example. This problem has nothing about filename. It only relates to the mp3 metadata.
It seems that IINA would display the "title" by detecting the title field of mp3 metadata of the music file, as the picture sent below.
image
To reproduce, just manually tag the title field of a mp3 file with non-utf8 encoding.
Hope is helpful.

@low-batt
Copy link
Contributor

Did not reproduce for me. Apparently there is an additional factor involved. Here is what I tried…

To generate a file with a title tag I ran this FFmpeg command in Terminal:

ffmpeg -i sample-15s.mp3 -map 0 -codec copy -write_id3v2 1 -metadata "title=¿íË" tagged.mp3

That generated this file (with .txt added to make GitHub happy):
tagged.mp3.txt

When playing that file with IINA 1.3.4 the Now Playing widget in Control Center properly displayed the title:
Now-Playing

What does the Now Playing widget show when you play that file?

If that file does not reproduce the problem in your environment then we need to look into how the problematic files are tagged. Running ffprobe on the above file shows:

low-batt@gag issue-4891$ ffprobe -hide_banner -show_entries stream_tags tagged.mp3 
Input #0, mp3, from 'tagged.mp3':
  Metadata:
    title           : ¿íË
    encoder         : Lavf61.1.100
  Duration: 00:00:19.20, start: 0.025057, bitrate: 128 kb/s
  Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s
      Metadata:
        encoder         : Lavc57.10
[STREAM]
TAG:encoder=Lavc57.10
[/STREAM]
low-batt@gag issue-4891$ 

If you are able to post an example file I will see if it reproduces for me and if so investigate what is going wrong.

@Nemowang2003
Copy link

Oh, I see. It seems that my example cannot reproduce either. Sorry for misunderstanding the meaning of this issue.

@low-batt
Copy link
Contributor

@Nemowang2003 Not a problem. I very much appreciate your effort to help.

As you indicated, when available IINA will use an embedded title instead of the filename. In the screen shot provided by @ademaro the corrupted title shown does not include a file extension, so it likely came from a title tag.

Another way to check the title is to use ExifTool:

low-batt@gag issue-4891$ exiftool -s -T -title tagged.mp3
¿íË
low-batt@gag issue-4891$ 

At this point we know for certain there is a problem based on the posted screenshot.

Hopefully @ademaro can point out what I missed about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants