SSH command to play media from network share
#1
Hello, apologies if this question has be asked elsewhere. If so please point me to it as I was unable to find it. 

I am attempting to control different RPI 3 running OSMC on a local network. I can successfully connect and control them via ssh. However I can not seem to get them to play media from a NAS on the network. 

The following command does not do anything.
Code:
kodi-send --action="PlayMedia(//IPAddress/folderPath/file.mp4)"

I am able to manually add the folder in OSMC to play the media file directly from the device. However this is not an option as I need to send this command remotely. 


Thank you for any help you are able to provide.
Reply
#2
I suggest you use a JSON/RPC call over http.

In any event

Code:
PlayMedia(//IPAddress/folderPath/file.mp4)

does not point to a file, as you give it no clue about the method to access over the network. I suggest trying

Code:
PlayMedia(//SMB://IPAddress/folderPath/file.mp4)
or whatever network addressing you are using.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Thank you for the reply. I guess I am unsure what protocol I need to use. I am trying to pull media from a Buffalo Terrastation NAS on the network. 

What are the advantages of using a JSON/RCP call over http? Do you have any articles describing this process?

Thank you
Reply
#4
Have you searched the wiki?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
I am researching it currently. I do not quite understand what I need to do to get it to work. But I will keep looking in those threads. 

In any case, the NAS is set up for SMB protocol and I am still unable to get any response from the command you have posted.

Code:
PlayMedia(//SMB://IPAddress/folderPath/file.mp4)

There are no permissions currently required to access this share over the network. Any suggestions for this would be appreciated.

Thank you,
Reply
#6
Your command still isn't right.
kodi-send --action="PlayMedia(<pathtofile>)"

eg on my system this works:
kodi-send --action="PlayMedia(smb://192.168.1.91/Passport4TB/Video/Films/Musicals/Mama Mia [2008]/Mama Mia [2008].avi)"
Reply

Logout Mark Read Team Forum Stats Members Help
SSH command to play media from network share0