I am building an app for work to demo some streaming functionality. I've built the entire client in web2py and need to stream some video. I need a way to stream mp4 content without using a tool like XmooV to do it (because PHP is not running on this server and it will be incredibly difficult to get it on there). If I can implement it in web2py it will also allow me to do some stuff behind the scenes as far as communicating with a back office app without having to deal with javascript insanity. I have a feeling I am just doing something wrong regarding headers but I really have no clue what I am doing. Here is a code example:
def stream(): import os if len(request.args): title_id = int(request.args[0]) filename = db(db.content.id == title_id).select() [0].filename.replace('.mpi','.mp4') path = os.path.join(request.folder,'static','video',filename) response.headers['ContentType']="video/mp4" return response.stream(open(path),chunk_size=4096) else: redirect(URL(request.application,'default','index')) I am trying to get this to stream to a flash based tool called JW Player and basically have no clue what I am doing. http://developer.longtailvideo.com/trac/wiki/Player4Formats#HTTPStreaming is the website. The part I was supposed to be responsible for was the client, but since I was able to do it so quickly I have had a bunch of other stuff I have no clue about dumped on me. Any insight would be helpful as to how to stream this mp4 file out of web2py. Thanks a lot.
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.