Page 1 of 1

TC Media url: Incorrectly Encoded url videopath

Posted: 2017-08-23, 10:06 UTC
by alex_
Hi!

My setup is:
TC 2.80/2.81b7 + Lan Plugin

My data is:
Two identical mkv video files with the following names:
"The_hidden.mkv" and "The_hidden[111].mkv" located on my lan share

Test Scenario is:
1) Connect to the share from plugin, open share root folder
2) Try to "play (foreground)" both video files in VLC

Expected results:
Both files are opened and played

Actual Results:
File without '[',']' special symbols opened successfully
File with brackets failed to open


Little debug:

Opening url for file without brackets proceeds the following in logcat:
08-23 12:27:44.743 22124 22124 D VLC : [0000007827addd88/566c] core input: Creating an input for 'The_Hidden.mkv'
08-23 12:27:44.751 22124 22124 E BitmapFactory: Unable to decode stream: java.lang.NullPointerException
08-23 12:27:44.753 22124 22677 D VLC : [0000007827addd88/5895] core input: using timeshift granularity of 50 MiB
08-23 12:27:44.753 22124 22677 D VLC : [0000007827addd88/5895] core input: using default timeshift path
08-23 12:27:44.754 22124 22677 D VLC : [0000007827addd88/5895] core input: `http://127.0.0.1:43276/ghg/The_Hidden.mkv' gives access `http' demux `' path `127.0.0.1:43276/ghg/The_Hidden.mkv'
08-23 12:27:44.754 22124 22677 D VLC : [000000782a5b9588/5895] core input source: specified demux: any
08-23 12:27:44.754 22124 22677 D VLC : [000000782a5b9588/5895] core input source: creating demux: access='http' demux='any' location='127.0.0.1:43276/ghg/The_Hidden.mkv' file='(null)'
08-23 12:27:44.754 22124 22677 D VLC : [0000007823e81288/5895] core demux: looking for access_demux module matching "http": 6 candidates
08-23 12:27:44.755 22124 22677 D VLC : [0000007823e81288/5895] core demux: no access_demux modules matched
08-23 12:27:44.755 22124 22677 D VLC : [0000007823e81788/5895] core access: creating access: http://127.0.0.1:43276/ghg/The_Hidden.mkv
08-23 12:27:44.755 22124 22677 D VLC : [0000007823e81788/5895] core access: looking for access module matching "http": 25 candidates
08-23 12:27:44.756 22124 22678 D VLC : [0000007823e81788/5896] transport access: resolving 127.0.0.1 ...
08-23 12:27:44.756 22124 22678 D VLC : [0000007823e81788/5896] transport access: connecting to 127.0.0.1 port 43276 ...
08-23 12:27:44.758 22124 22677 D VLC : [0000007823e81788/5895] h1conn access: outgoing request:
08-23 12:27:44.758 22124 22677 D VLC : GET /ghg/The_Hidden.mkv HTTP/1.1
08-23 12:27:44.758 22124 22677 D VLC : Host: 127.0.0.1:43276
08-23 12:27:44.758 22124 22677 D VLC : Accept: */*
08-23 12:27:44.758 22124 22677 D VLC : Accept-Language: en_US
08-23 12:27:44.758 22124 22677 D VLC : User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
08-23 12:27:44.758 22124 22677 D VLC : Range: bytes=0-
08-23 12:27:44.758 22124 22677 D VLC :
08-23 12:27:44.761 22124 22124 E BitmapFactory: Unab
Opening url File with brackets within TC ecosystem (TC+Lan Plugin) proceeds the following:
08-23 12:29:40.187 24461 24461 D VLC : [000000782d6f6d88/5f8d] core input: Creating an input for 'The_Hidden[111].mkv'
08-23 12:29:40.189 24461 24482 D VLC : [000000782d6f6d88/5fa2] core input: using timeshift granularity of 50 MiB
08-23 12:29:40.189 24461 24482 D VLC : [000000782d6f6d88/5fa2] core input: using default timeshift path
08-23 12:29:40.190 24461 24482 D VLC : [000000782d6f6d88/5fa2] core input: `http://127.0.0.1:45411/ghg/The_Hidden[111].mkv' gives access `http' demux `' path `127.0.0.1:45411/ghg/The_Hidden[111].mkv'
08-23 12:29:40.190 24461 24482 D VLC : [000000783f8a9488/5fa2] core input source: specified demux: any
08-23 12:29:40.190 24461 24482 D VLC : [000000783f8a9488/5fa2] core input source: creating demux: access='http' demux='any' location='127.0.0.1:45411/ghg/The_Hidden[111].mkv' file='(null)'
08-23 12:29:40.190 24461 24482 D VLC : [000000783f831348/5fa2] core demux: looking for access_demux module matching "http": 6 candidates
08-23 12:29:40.190 24461 24482 D VLC : [000000783f831348/5fa2] core demux: no access_demux modules matched
08-23 12:29:40.190 24461 24482 D VLC : [000000783f831488/5fa2] core access: creating access: http://127.0.0.1:45411/ghg/The_Hidden[111].mkv
08-23 12:29:40.190 24461 24482 D VLC : [000000783f831488/5fa2] core access: looking for access module matching "http": 25 candidates
08-23 12:29:40.192 24461 24483 D VLC : [000000783f831488/5fa3] transport access: resolving 127.0.0.1 ...
08-23 12:29:40.192 24461 24483 D VLC : [000000783f831488/5fa3] transport access: connecting to 127.0.0.1 port 45411 ...
08-23 12:29:40.193 24461 24482 D VLC : [000000783f831488/5fa2] h1conn access: outgoing request:
08-23 12:29:40.193 24461 24482 D VLC : GET / HTTP/1.1
08-23 12:29:40.193 24461 24482 D VLC : Host: 127.0.0.1:45411
08-23 12:29:40.193 24461 24482 D VLC : Accept: */*
08-23 12:29:40.193 24461 24482 D VLC : Accept-Language: en_US
08-23 12:29:40.193 24461 24482 D VLC : User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
08-23 12:29:40.193 24461 24482 D VLC : Range: bytes=0-
08-23 12:29:40.193 24461 24482 D VLC :

And finally (successful) opening "the brackets file" using the same approach (url streaming with webserver) from different application provides the following:
08-23 13:01:17.478 27737 27916 D VLC : [000000782a375388/6d0c] core input source: creating demux: access='http' demux='any' location='127.0.0.1:44245/FAT/The_Hidden%5B111%5D.mkv' file='(null)'
08-23 13:01:17.478 27737 27916 D VLC : [000000782a3da288/6d0c] core demux: looking for access_demux module matching "http": 6 candidates
08-23 13:01:17.478 27737 27916 D VLC : [000000782a3da288/6d0c] core demux: no access_demux modules matched
08-23 13:01:17.478 27737 27916 D VLC : [000000782a3daa08/6d0c] core access: creating access: http://127.0.0.1:44245/FAT/The_Hidden%5B111%5D.mkv
08-23 13:01:17.479 27737 27916 D VLC : [000000782a3daa08/6d0c] core access: looking for access module matching "http": 25 candidates
08-23 13:01:17.480 27737 27917 D VLC : [000000782a3daa08/6d0d] transport access: resolving 127.0.0.1 ...
08-23 13:01:17.480 27737 27917 D VLC : [000000782a3daa08/6d0d] transport access: connecting to 127.0.0.1 port 44245 ...
08-23 13:01:17.481 27737 27916 D VLC : [000000782a3daa08/6d0c] h1conn access: outgoing request:
08-23 13:01:17.481 27737 27916 D VLC : GET /FAT/The_Hidden%5B111%5D.mkv HTTP/1.1
08-23 13:01:17.481 27737 27916 D VLC : Host: 127.0.0.1:44245
08-23 13:01:17.481 27737 27916 D VLC : Accept: */*
08-23 13:01:17.481 27737 27916 D VLC : Accept-Language: en_US
08-23 13:01:17.481 27737 27916 D VLC : User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git
08-23 13:01:17.481 27737 27916 D VLC : Range: bytes=0-


So the only difference between "fail" and "pass" cases is the URL path encoding passed to VLC:
"The_Hidden%5B111%5D.mkv" - in successful case
and
"The_Hidden[111].mkv" - in failed case


May this been fixed on TC side? VLC is one of the most popular players on market and brackets and other special character are quite common in media file names.[/quote]

Posted: 2017-08-24, 09:39 UTC
by ghisler(Author)
Looks like VLC is very strict with URL encodings - while brackets should be encoded, they should also work unencoded.

Did you find any other characters which don't work with VLC?

Posted: 2017-08-24, 10:28 UTC
by alex_
The following symbols leads to the same issue:
[]?{}^`|

While some other special symbols (:!()$#@% and some other) and national symbols (cyrillic, chinese) do not cause the issue

Posted: 2017-08-28, 10:38 UTC
by ghisler(Author)
OK, changed that in the latest beta 8! Please try it.

Play store:
https://www.ghisler.com/betatc
APK:
https://www.ghisler.com/tcbeta.apk

Posted: 2017-08-28, 12:15 UTC
by alex_
Thanks Christian

Confirming this beta has the issue resolved!

Looking forward to see this beta as stable release :)