Closed sbraz closed 4 years ago
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()])
It returns ['fr', 'ru', 'en']
on my system. I assume that it works for you?
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.
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):