Linux (or WSL windows) :
ip route | grep default
Windows:
xxxxxxxxxx
ipconfig | findstr /i "Gateway"
Mac Os X:
xxxxxxxxxx
netstat -nr | grep default
Why not?
Linux (or WSL windows) :
ip route | grep default
Windows:
xxxxxxxxxx
ipconfig | findstr /i "Gateway"
Mac Os X:
xxxxxxxxxx
netstat -nr | grep default
During Corona virus period it was good time to take few time to well manage better some local movie that my kids could watch. So instead to just cast as before the movies directly by VLC I would like to use KODI to well manage my movies lib and directly cast them to my chromecast through this nice software.
I used VSCode editor with Python extension and simply use a script as below with the library pychromecast to list the cast devices and store it in a text file:
xxxxxxxxxx
import pychromecast
txtfile = open('list.txt', 'w')
chromecasts = pychromecast.get_chromecasts()
for cc in chromecasts:
print(cc, file = txtfile)
txtfile.close()
To install pychromecast module I just get the source from github and once unziped I do in the folder source:
pip install -r requirements.txt
python setup.py install
Then in the list.txt I can read :
xxxxxxxxxx
Chromecast('192.168.1.10', port=8009, device=DeviceStatus(friendly_name='Living Room', model_name='Chromecast Ultra', manufacturer='Unknown manufacturer', uuid=UUID('8f85d4b7-44f7-4861-0493-eb7ce81fd73d'), cast_type='cast'))
Chromecast('192.168.1.16', port=8009, device=DeviceStatus(friendly_name='Speakers Living Room', model_name='HT-MT500/501', manufacturer='Sony Corporation', uuid=UUID('4e0e27b8-3722-9145-0c48-cca38bf43358'), cast_type='cast'))
(...)
where the first cast “Living Room” was the target and so the IP I need was: 192.168.1.10
After lot of test and reading forum I found my solution that I posted in VideoLan forum that is running well on my VLC (version 3.0.0). In my favoriteterminal ConEmu i just tested this line where each double quotes is important and all text in one line :
xxxxxxxxxx
"C:\Program Files\VideoLAN\VLC\vlc.exe" "C:\Temp\test.mp4" --sout "#chromecast{ip=192.168.1.10, demux-filter=demux_chromecast}"
And yeahh ! it’s running well, my TV switched on and the movie was well displayed on it !!!
In fact it’s really simple ;0) We just need to add an xml file named “playercorefactory.xml” in the folder “%AppData%\Roaming\Kodi\userdata”.
In this file we just need to indicate our command line of the step2 as here:
xxxxxxxxxx
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
<args> "{1}" --sout "#chromecast{ip=192.168.1.10, demux-filter=demux_chromecast}"</args>
<hidexbmc>true</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule video="true" player="VLC"/>
</rules>
</playercorefactory>
Once done you launch Kodi and in the Movie selected you will see a new entry in the player menu with :
Play Using > VLC (default) or Video Player
You select VLC default and “voila!” it’s running perfectly !
First step in this new Pypik World ! “That’s one small step for me, one giant leap for my humility.”