Kodi Community Forum

Full Version: Start external VLC-player with variable option (like --start-time=xxx seconds)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am using VLC as an external player in my Video-plugin.
Almost all is working fine.

There is one situation i cannot code with the external player.
That is when i want to start a video with an extra parameter (for instance --start-time=360)

My playercorefactory.xml:
Quote:<playercorefactory>
    <players>
        <player name="VLC" type="ExternalPlayer" audio="true" video="true">
            <filename>C:/Program Files/VideoLAN/VLC/vlc.exe</filename>
            <args>"{1}" --fullscreen --video-on-top</args>
        </player>
    </players>
    <rules action="prepend">
    </rules>
</playercorefactory> 
I cannot add this option in the args section because this option must be variable.
 
In windows i use the following command (the start-time will vary):
Quote:"C:\Program Files\VideoLAN\VLC\vlc.exe" --fullscreen --video-on-top --start-time=360  "dvdsimple:///M:\DVDsNK\DVD's Gezin\Gezin01. 199209-199210"
plugin-coding:
Quote:        xbmcplugin.addDirectoryItem(_handle, url, list_item, is_folder)
        xbmcplugin.endOfDirectory(_handle)

url:
Quote:plugin://plugin.video.examplenk/?action=play&video=dvdsimple%3A%2F%2F%2FM%3A%5CDVDsNK%5CDVD%27s+Gezin%5CGezin01.+199209-199210
 
Please help.
(2020-02-06, 22:11)n.kooij Wrote: [ -> ]Hello,

I am using VLC as an external player in my Video-plugin.
Almost all is working fine.

There is one situation i cannot code with the external player.
That is when i want to start a video with an extra parameter (for instance --start-time=360)

My playercorefactory.xml:
Quote:<playercorefactory>
    <players>
        <player name="VLC" type="ExternalPlayer" audio="true" video="true">
            <filename>C:/Program Files/VideoLAN/VLC/vlc.exe</filename>
            <args>"{1}" --fullscreen --video-on-top</args>
        </player>
    </players>
    <rules action="prepend">
    </rules>
</playercorefactory> 
I cannot add this option in the args section because this option must be variable.
 
In windows i use the following command (the start-time will vary):
Quote:"C:\Program Files\VideoLAN\VLC\vlc.exe" --fullscreen --video-on-top --start-time=360  "dvdsimple:///M:\DVDsNK\DVD's Gezin\Gezin01. 199209-199210"
plugin-coding:
Quote:        xbmcplugin.addDirectoryItem(_handle, url, list_item, is_folder)
        xbmcplugin.endOfDirectory(_handle)

url:
Quote:plugin://plugin.video.examplenk/?action=play&video=dvdsimple%3A%2F%2F%2FM%3A%5CDVDsNK%5CDVD%27s+Gezin%5CGezin01.+199209-199210
 
Please help. 
My problem is solved. In the VLC-forum they suggested to use een playlist file and that works like a charm. This thread can be marked solved.