Is it possible to open programmaticaly vlc and send to it one subtitle file (programmatically too)?

For example I want to run vlc(I know how to do that) and then programmatically press video-->subtitles track-->open file...

If it's not possible with c# is it possible with any other language?

Hm... why do you need that? You can simply put the subtitle file in the same folder as the movie, with the same name, and run VLC with the command to movie and it should auto-load the subtitle.

No i need that for online streams videos... for example a youtube video... instead of giving him the subtitle I want to load it from my server so he can not download it

Hm... see if this helps.

EDIT:
Found the subtitle commands:

Subtitles:
      --sub-file=<string>        Use subtitle file
          Load this subtitle file. To be used when autodetect cannot detect
          your subtitle file.
      --sub-autodetect-file, --no-sub-autodetect-file
                                 Autodetect subtitle files (default enabled)
          Automatically detect a subtitle file, if no subtitle filename is
          specified (based on the filename of the movie). (default enabled)
      --sub-autodetect-fuzzy=<integer>
                                 Subtitle autodetection fuzziness
          This determines how fuzzy subtitle and movie filename matching will
          be. Options are:
0 = no subtitles autodetected
1 = any subtitle
          file
2 = any subtitle file containing the movie name
3 = subtitle
          file matching the movie name with additional chars
4 = subtitle file
          matching the movie name exactly
      --sub-autodetect-path=<string>
                                 Subtitle autodetection paths
          Look for a subtitle file in those paths too, if your subtitle file
          was not found in the current directory.
      --sub-margin=<integer>     Force subtitle position
          You can use this option to place the subtitles under the movie,
          instead of over the movie. Try several positions.

Can you show one example please? I don't understand how i can use this on c#

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.