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

Audio languages are inverted #129

Closed
sbraz opened this issue Apr 28, 2019 · 3 comments · Fixed by #157
Closed

Audio languages are inverted #129

sbraz opened this issue Apr 28, 2019 · 3 comments · Fixed by #157

Comments

@sbraz
Copy link
Contributor

sbraz commented Apr 28, 2019

Hi, with version 1.5, it looks like the languages from the preview menu are inverted.
In the attached test file, the tracks are English, Russian and French but gaupol shows them in the opposite order (the tracks themselves are in the right order but the languages don't match):
image

@otsaloma
Copy link
Owner

Haven't seen this before. That track order comes directly from GstPbutils.Discoverer. Could be a GStreamer bug or maybe the situation is just more complicated than stream numbers being the indexes of the stream list.

Test script:

import gi
import os
import sys
import urllib.parse

gi.require_version("Gst", "1.0")
gi.require_version("GstPbutils", "1.0")

from gi.repository import Gst
from gi.repository import GstPbutils

Gst.init(None)

fname = os.path.abspath(sys.argv[1])
uri = "file://{}".format(urllib.parse.quote(fname))
info = GstPbutils.Discoverer().discover_uri(uri)
print([x.get_language() for x in info.get_audio_streams()])

@sbraz
Copy link
Contributor Author

sbraz commented Apr 28, 2019

It returns ['fr', 'ru', 'en'] on my system. I assume that it works for you?

@otsaloma
Copy link
Owner

I get ['fr', 'ru', 'en'] as well. That was just interim notes, I don't expect to look into this now, but might return to it later. If you wish you can ask or file a bug report against some appropriate part of GStreamer. That test script is minimal reproduction of what Gaupol does to construct the language menu.

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

Successfully merging a pull request may close this issue.

2 participants