Re: [Zope-dev] Streaming large files
thanks a lot for your answeres! I think switching to Zope 2.7.1 and using IStreamIterators did the job for me :-) thilo Thilo Staebler wrote: hi! I have to stream large mpeg-files over http with range support. this works quite nice until the client seeks in the (media)player and the files aren't to large, because zope caches the whole file... ...so each seek means streaming the whole file from the requested position till end *g* -> my RESPONSE object doesn't even know, that the player has seeked e.g. back to the beginning... is there a way to bypass the zope caching? and how do I know if the player has disconnected, so I can stop streaming? thanks in advance thilo ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming large files
On Thursday, July 8, 2004, at 01:07 PM, Thilo Staebler wrote: hi! I have to stream large mpeg-files over http with range support. this works quite nice until the client seeks in the (media)player and the files aren't to large, because zope caches the whole file... ...so each seek means streaming the whole file from the requested position till end *g* -> my RESPONSE object doesn't even know, that the player has seeked e.g. back to the beginning... is there a way to bypass the zope caching? and how do I know if the player has disconnected, so I can stop streaming? you mean cacheing in memory? Anything based on "File" does not do that. thanks in advance thilo ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming large files
Hello Thilo, Thursday, July 8, 2004, 9:07:18 PM, you wrote: I don't know how it relates to Zope. There's FFServer (http://ffmpeg.sf.net) - powerful streaming solution. Or you may be interested in www.MMManager.org - Multimedia manager for Zope. TS> hi! TS> I have to stream large mpeg-files over http with range support. this TS> works quite nice until the client seeks in the (media)player and the TS> files aren't to large, because zope caches the whole file... TS> ...so each seek means streaming the whole file from the requested TS> position till end *g* ->> my RESPONSE object doesn't even know, that the player has seeked e.g. TS> back to the beginning... TS> is there a way to bypass the zope caching? and how do I know if the TS> player has disconnected, so I can stop streaming? TS> thanks in advance TS> thilo TS> ___ TS> Zope-Dev maillist - [EMAIL PROTECTED] TS> http://mail.zope.org/mailman/listinfo/zope-dev TS> ** No cross posts or HTML encoding! ** TS> (Related lists - TS> http://mail.zope.org/mailman/listinfo/zope-announce TS> http://mail.zope.org/mailman/listinfo/zope ) -- Best regards, Eugenemailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming and PCGI
On Wed, 6 Jun 2001, Andre Schubert wrote: > Can anybody explain me why streaming over PCGI doesn't work, or has > anybody a solution of streaming with PCGI ??? Perhaps the PCGI has its own timeout that doesn't wait even if it has been given some headers. I wonder if Apache ProxyPass has the same issue? --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
Lalo Martins wrote: > > Never mind, I found it. Just for the record, if anyone else > needs this: > > > I don't know if this is documented somewhere, but it does what > I wanted. It is documented in the online help system, under API documentation, under the 'Response' object. -Michel ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
Never mind, I found it. Just for the record, if anyone else needs this: The class HTTPResponse (in ZPublisher/HTTPResponse.py) has a "write" method. When you're publishing to the web, the RESPONSE object is an instance of this class. def write(self,data): """\ Return data as a stream HTML data may be returned using a stream-oriented interface. This allows the browser to display partial results while computation of a response to proceed. The published object should first set any output headers or cookies on the response object. Note that published objects must not generate any errors after beginning stream-oriented output. """ I don't know if this is documented somewhere, but it does what I wanted. On Sun, Oct 29, 2000 at 11:05:25PM -0200, Lalo Martins wrote: > Is it possible to "stream" (send data to the client via HTTP > incrementally) from Python code, or does ZPublisher only send > the data as a single wad when the method returns? > > Assuming it is possible, obviously it requires using some other > API rather than just 'return'ing a string... where can I find > documentation and/or examples on that? If there is no existing > documentation or examples, source code would do. > > (Context: when the tests are running on ZUnit, I'd like to give > some visual feedback, if possible by sending the dots returning > by PyUnit in real-time) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
On Mon, Oct 30, 2000 at 12:48:53PM +1100, Terry Kerr wrote: > That is not streaming. That is just as you said..lack of bandwidth delaying > the entire page arriving at once at you browser. That is not contolled. The > server doesn't send it 'bit by bit' in a controlled manner. But if it did, the results would be exactly the same. Actually, that's exactly what most people refer to when they say "streaming". This is getting way off-topic. I want to know if there is an API for that, not to discuss the meaning of the word. []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
That is not streaming. That is just as you said..lack of bandwidth delaying the entire page arriving at once at you browser. That is not contolled. The server doesn't send it 'bit by bit' in a controlled manner. terry Lalo Martins wrote: > On Mon, Oct 30, 2000 at 12:23:36PM +1100, Terry Kerr wrote: > > Isn't that dependant on the protocol u are using to transfer the data? > > HTTP can't do streaming. You can sort of do streaming using the > > experimental multipart content type, but IE browers don't recognise it, > > so it is pretty useless. > > What are you talking about? Try to load any standard html page > with a very slow connection. If you just send the data slowly, > the browser will show it as it is received. That's streaming. > > You can point an mp3 or realaudio player at an URL and it will > download the file and play it as it arrives. > > That's the kind of streaming I want to do. > > []s, >|alo >+ > -- > Hack and Roll ( http://www.hackandroll.org ) > News for, uh, whatever it is that we are. > > http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] > pgp key: http://zope.gf.com.br/lalo/pessoal/pgp > > Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
On Mon, Oct 30, 2000 at 12:23:36PM +1100, Terry Kerr wrote: > Isn't that dependant on the protocol u are using to transfer the data? > HTTP can't do streaming. You can sort of do streaming using the > experimental multipart content type, but IE browers don't recognise it, > so it is pretty useless. What are you talking about? Try to load any standard html page with a very slow connection. If you just send the data slowly, the browser will show it as it is received. That's streaming. You can point an mp3 or realaudio player at an URL and it will download the file and play it as it arrives. That's the kind of streaming I want to do. []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Streaming?
Isn't that dependant on the protocol u are using to transfer the data? HTTP can't do streaming. You can sort of do streaming using the experimental multipart content type, but IE browers don't recognise it, so it is pretty useless. With the context you gave, you could probably do that with the experimental multiplart content, but it would only work with netscape. terry Lalo Martins wrote: > Is it possible to "stream" (send data to the client via HTTP > incrementally) from Python code, or does ZPublisher only send > the data as a single wad when the method returns? > > Assuming it is possible, obviously it requires using some other > API rather than just 'return'ing a string... where can I find > documentation and/or examples on that? If there is no existing > documentation or examples, source code would do. > > (Context: when the tests are running on ZUnit, I'd like to give > some visual feedback, if possible by sending the dots returning > by PyUnit in real-time) > > []s, >|alo >+ > -- > Hack and Roll ( http://www.hackandroll.org ) > News for, uh, whatever it is that we are. > > http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] > pgp key: http://zope.gf.com.br/lalo/pessoal/pgp > > Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )