luahttp status.json is returning localised keys in stream info
vlc is localising the keys in status.json (and status.xml) this is machine-readable data, so should be in a single language (presumably English)
enable the http interface
open a file with multiple tracks
open http://localhost:8080/requests/status.json
output is something like the following
{
"fullscreen":false,
"stats":{
"inputbitrate":0,
"sentbytes":0,
"lostabuffers":2,
"averagedemuxbitrate":0,
"readpackets":130,
"demuxreadpackets":0,
"lostpictures":0,
"displayedpictures":27,
"sentpackets":0,
"demuxreadbytes":155981,
"demuxbitrate":0,
"playedabuffers":182,
"demuxdiscontinuity":0,
"decodedaudio":182,
"sendbitrate":0,
"readbytes":213463,
"averageinputbitrate":0,
"demuxcorrupted":0,
"decodedvideo":41
},
"aspectratio":"default",
"audiodelay":0,
"apiversion":3,
"time":2,
"volume":0,
"length":58,
"random":false,
"audiofilters":{
"filter_0":""
},
"rate":1,
"videoeffects":{
"hue":0,
"saturation":1,
"contrast":1,
"brightness":1,
"gamma":1
},
"state":"playing",
"loop":false,
"version":"2.0.5 Twoflower",
"position":0.036290034651756,
"information":{
"titles":[0],
"chapters":[0],
"category":{
"Stream 0":{
"Frame_rate":"23.976216",
"Decoded_format":"Planar 4:2:0 YUV",
"Codec":"MPEG-4 Video (XVID)",
"Type":"Video",
"Language":"English",
"Resolution":"640x480"
},
"Stream 4":{
"Type":"Subtitle",
"Language":"English",
"Codec":"SubStation Alpha subtitles (ssa )"
},
"Stream 12":{
"Type":"Subtitle",
"Language":"Norsk",
"Codec":"SubStation Alpha subtitles (ssa )"
},
<snip>
now open vlc preferences and set the language to suomi. Restart VLC
{
"fullscreen":false,
"stats":{
"inputbitrate":0,
"sentbytes":0,
"lostabuffers":2,
"averagedemuxbitrate":0,
"readpackets":130,
"demuxreadpackets":0,
"lostpictures":0,
"displayedpictures":27,
"sentpackets":0,
"demuxreadbytes":155981,
"demuxbitrate":0,
"playedabuffers":182,
"demuxdiscontinuity":0,
"decodedaudio":182,
"sendbitrate":0,
"readbytes":213463,
"averageinputbitrate":0,
"demuxcorrupted":0,
"decodedvideo":41
},
"aspectratio":"default",
"audiodelay":0,
"apiversion":3,
"time":1,
"volume":0,
"length":58,
"random":false,
"audiofilters":{
"filter_0":""
},
"rate":1,
"videoeffects":{
"hue":0,
"saturation":1,
"contrast":1,
"brightness":1,
"gamma":1
},
"state":"playing",
"loop":false,
"version":"2.0.5 Twoflower",
"position":0.030115153640509,
"information":{
"titles":[0],
"chapters":[0],
"category":{
"Virta 2":{
"Koodekki":"SubStation Alpha subtitles (ssa )",
"Kieli":"English",
"Tyyppi":"Tekstitys"
},
"Virta 8":{
"Koodekki":"SubStation Alpha subtitles (ssa )",
"Kieli":"עברית",
"Tyyppi":"Tekstitys"
},
"Virta 1":{
"Koodekki":"Vorbis Audio (vorb)",
"Tyyppi":"Ääni",
"Kieli":"日本語",
"Näytteenottotaajuus":"48000 Hz",
"Bittinopeus":"112 kb/s",
"Kanavat":"Stereo"
},
<snip>
the localised categories are coming from item:info() which is defined in vlclua_input_item_info in modules/lua/libs/input.c
as far as I can tell, all files that call item:info() should be expecting non-localised keys. They are:
share/lua/http/requests/status.xml:59: local info = item:info() share/lua/intf/cli.lua:341: local categories = item:info() share/lua/intf/dumpmeta.lua:54:for cat, data in pairs(item:info()) do share/lua/intf/modules/httprequests.lua:522: local info = item:info()