Comments (7)
Does your system have GLib >= 2.52? Because the code to ensure that non utf8 strings are properly handled depends on a function added in GLib 2.52, and is skipped in systems with an older GLib version.
from mpv-mpris.
Chiming in: I have GLib 2.54.3 and I'm experiencing the same problem.
from mpv-mpris.
Yes, I have 2.56.2.
from mpv-mpris.
Do you have a link to a radio stream or file I can use to test this issue with?
from mpv-mpris.
I also have same issue, here follows an example of the error and url of a radio stream causing it. Of course, it not always happens, just when the title of the song or author contains some "special" characters (in this radio is quite frequent, anyway, given the type of music -classical- and authors).
>mpv http://stream.srg-ssr.ch/m/rsc_it/aacp_96
Playing: http://stream.srg-ssr.ch/m/rsc_it/aacp_96
(+) Audio --aid=1 (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
A: 00:00:07 / 00:00:15 (50%) Cache: 7s+152KB
File tags:
icy-title: Leopold Antonin Kozeluch - Sinfonia in fa maggiore
A: 00:15:51 / 00:17:37 (89%) Cache: 106s+2MB
File tags:
icy-title: Fr�d�ric Chopin - Valzer brillante in la bemolle maggiore op. 34 n. 1
(process:3442): GLib-CRITICAL **: 14:53:32.327: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed
from mpv-mpris.
I've had a look into the issue and it seems that, according to http://icecast.org/docs/icecast-2.4.1/config-file.html, many radio streams use latin1 encoding instead of utf-8 when they are not an ogg stream. Radio streams can specify their character encoding, but I'm not sure if that is actually done, and how I would get that information from mpv.
It may be possible to detect the encoding of the text and convert it accordingly, but I'm not sure how to reliably do that without introducing more bugs relating to the text conversion.
I am already calling g_utf8_make_valid
but that seems to let the strings through without catching the fact that they are not valid utf-8.
from mpv-mpris.
Sorry this took so long. I've decided the best thing to do would be to call g_utf8_validate
myself before passing it to glib and give a placeholder string if it isn't valid even after trying to fix it. I guess it's better than crashing.
from mpv-mpris.
Related Issues (20)
- undefined symbol when run mpv with LD_DEBUG=libs
- i get this error spamed my log
- GLib-GIO-CRITICAL message spam when running mpv from terminal
- Plugin doesn't work inside terminal. HOT 1
- Does not send an event on exit HOT 1
- Cover image in opus file is not shown in KDE media control in system tray HOT 7
- Setting or defining seek distance HOT 2
- Can you add fullscreen status signals (true/false)?
- g_dbus_connection_register_object: assertion 'error == NULL || *error == NULL' failed HOT 6
- test failed because not pass `--no-config `
- Multiple delimiters for splitting artist field
- Position provided by Seeked signal inaccuracies
- Stops working after waking up from standby HOT 2
- Cover Image in notification HOT 1
- mpv-mpris not detected HOT 3
- How to make this work on Windows? HOT 1
- Could not load SO plugin: libavformat.so.58 HOT 1
- Can't detect installed libavformat HOT 3
- ffmpeg/demuxer warning after embedded cover art support HOT 4
- libavformat.so.58: cannot open shared object file: No such file or directory HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-mpris.