2

I have configured a VLC .xpsf file to point to a video stream, which prompts for a username and pw. Is it possible to somehow bake the username and pw into the file so that it is automatically sent?

.xpsf file content:

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
    <trackList>
        <track><location>rtsp://192.168.8.108:554/live/ch00_0</location><title>Full resolution</title></track>
        <track><location>rtsp://192.168.8.108:554/live/ch01_0</location><title>Half resolution</title></track>
    </trackList>
</playlist>
  • You should give a try to this syntax: rtsp://user:pass@192.168.8.108:554/..... – A. Loiseau Dec 30 '16 at 10:18
  • This seemed to work. Promote this to an answer and you will receive credit. Thank you – gatorback Dec 30 '16 at 14:32
3

VLC MRLs are based on URIs which syntax allows for the insertion of optional scheme-specific userinfo:

# (simplified)
scheme://[userinfo@]host[:port]/path

with the userinfo field taking almost always the form user[:password]. Hence, you can inject your username and password this way:

rtsp://user:password@host:port/path

which gives you this xpsf file:

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
  <trackList>
    <track>
      <location>rtsp://user:password@192.168.8.108:554/live/ch00_0</location>
      <title>Full resolution</title>
    </track>
    <track>
      <location>rtsp://user:password@192.168.8.108:554/live/ch01_0</location>
      <title>Half resolution</title>
    </track>
  </trackList>
</playlist>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.