Playing a file while writing to it.
#1
I have a python script that is streaming a mpg file from a source and saving it locally to play on the xbmc.Player. I had planned to play the file while still writing to it, but the Player gives me the following error when trying to play: ERROR: CDVDPlayer::OpenInputStream - error opening [filename]. If I close the file before playing it works fine. The file was opened using open(filename,"wb"). I am assuming that either the open function or the Player's open is not allowing sharing for the file. (testing on Window, haven't moved to the XBox to test if it is a quark with the Windows port)

Is there anyway to write to a file and play it? Or is there another way to pump a stream to the player?
Reply
#2
it's a quirk with windows (and hence xbox).

in any case, if the objective is to pump a stream to the player you can do it using say, a named pipe, or over http.
Reply
#3
The stream is non standard therefore I cant use http. The named local pipe for the script to write to and the player to read sounds good, but my lack of experience with python and xbmc has me wondering how to do that. Any suggestion on that.
Reply

Logout Mark Read Team Forum Stats Members Help
Playing a file while writing to it.0