2012-08-03, 16:43
predakanga
I've made some progress on the named pipe and discovered that mplayer DOES support named pipes on Windows.
So I first do this:
Then I write to flv:
And then write the data:
I connect mplayer to the pipe:
Problem. MPlayer starts; at least it says "FLV File Detected" which means it sees the FLVHeader, but it doesn't get any further than that, even though the download script is still writing to the named pipe.
I am thinking that win32file.WriteFile may be the wrong mode, but it is the only way I can see of writing to the named pipe ?
Do you have any ideas !
D
I've made some progress on the named pipe and discovered that mplayer DOES support named pipes on Windows.
So I first do this:
Quote:flv = win32pipe.CreateNamedPipe(r'\\.\pipe\bbcsport.flv', win32pipe.PIPE_ACCESS_DUPLEX, win32pipe.PIPE_TYPE_BYTE | win32pipe.PIPE_READMODE_BYTE | win32pipe.PIPE_WAIT, 50, 4096, 4096, 10000, None)
win32pipe.ConnectNamedPipe(flv, None)
Then I write to flv:
Quote:win32file.WriteFile(flv, flvHeader)
And then write the data:
Quote:win32file.WriteFile(flv, flvData)
I connect mplayer to the pipe:
Quote:mplayer \\.\pipe\bbcsport.flv
Problem. MPlayer starts; at least it says "FLV File Detected" which means it sees the FLVHeader, but it doesn't get any further than that, even though the download script is still writing to the named pipe.
I am thinking that win32file.WriteFile may be the wrong mode, but it is the only way I can see of writing to the named pipe ?
Do you have any ideas !
D