You are not logged in.
I am using kodi to watch some files on my HDD. How can I use the shell to see which file kodi is playing? I looked into lsof but it isn't showing me the video file I know is being read while it is playing.
Offline
Use the command:
lsof -p $(ps axf | grep kodi | grep -v grep | awk '{printf $1 ","}')Displays a playable file
Offline
lsof -p $(ps axf | grep kodi | grep -v grep | awk '{printf $1 ","}')
https://man.archlinux.org/man/core/procps-ng/pidof.1.en
Though the OP stated that lsof wouldn't list the file - what raises the question how he approached that and whether kodi is using a subprocess (mpv, ffmpeg, …) or hardlinks the file, opens the hardlink and then unlinks it or some shenanigans like that (for whatever reason)
Offline
The lsof command does not give any matches while kodi is playing. Kodi must be hiding things.
Offline
grep -r '^.*VideoPlayer::OpenFile: ' /var/lib/kodi/.kodi/temp/kodi.logIf you want to keep a record of watched content, see kodi-logger
Offline