Greetings!
I have a network camera (this one: http://www.axis.com/products/cam_2120/ ) plugged into my home LAN. I can check out its IP with my web browser and see the video. Cool. I'd like to write a little app to receive that video stream and do some processing/remapping of the pixels. I've had a couple people recommend gstreamer to get access to the video stream. I'm looking some suggestions about where to start; some simple demo code would be great. I'm developing on a Mac, but in the long run I'd like this to be cross platform. Am I on the right track? Thanks! `Greg ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Shear, Greg wrote:
> Greetings! > > I have a network camera (this one: > http://www.axis.com/products/cam_2120/ ) plugged into my home LAN. I can > check out its IP with my web browser and see the video. Cool. > > I'd like to write a little app to receive that video stream and do some > processing/remapping of the pixels. I've had a couple people recommend > gstreamer to get access to the video stream. I'm looking some > suggestions about where to start; some simple demo code would be great. Hi Greg. I am wrestling with this at the moment. For many things I have found the gstreamer library fabulous. Personally I use the python bindings, and use gst-launch for all my pipeline testing. It sounds like what you want to do is not something supplied by one of the many plugins, in which case you are going to want to use appsink/appsrc which is what I am using at the moment. I have a synchronous pipeline working, that basically writes to an array and reads off it (easily tweaked to do the fiddling you want). It does not solve my problem, as I need to have all this work asynchronously, and when I have a solution for that I will post that to this thread. > I'm developing on a Mac, but in the long run I'd like this to be cross > platform. Am I on the right track? I have set up gstreamer to work with python on windows with very little problem for testing, but have not (yet) sorted out the mac side, but don't expect too many problems. I develop on linux myself, and for that gstreamer is very easy, so any testing you need to do when getting things to be cross platform will be a piece of cake. As for getting the stream of the camera, gstreamer has plugins for pulling with just about any protocol you can think of, and sinking it into just about any other format you can think of. Good luck, and my biggest tip is that gst-launch is your friend, and googling with gst-launch as the first term will give you lots of good pipelines. Best of luck, now to post my question. ;) Rohan ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Rohan schrieb:
> Shear, Greg wrote: >> Greetings! >> >> I have a network camera (this one: >> http://www.axis.com/products/cam_2120/ ) plugged into my home LAN. I can >> check out its IP with my web browser and see the video. Cool. >> >> I'd like to write a little app to receive that video stream and do some >> processing/remapping of the pixels. I've had a couple people recommend >> gstreamer to get access to the video stream. I'm looking some >> suggestions about where to start; some simple demo code would be great. > > Hi Greg. I am wrestling with this at the moment. For many things I > have found the gstreamer library fabulous. Personally I use the > python bindings, and use gst-launch for all my pipeline testing. > > It sounds like what you want to do is not something supplied by one of > the many plugins, in which case you are going to want to use > appsink/appsrc which is what I am using at the moment. I would also recomment to try writing and own plugin. If you e.g. use VideoFilter as a baseclass, there is really not much that you need to implement besides the actually proceessing function. Not sure is videofilter is wrapped under the python bindings. Check with bilboed on irc. Writing a video filter in python is probably not the best idea in terms of performance, but should work for prototyping. Stefan > > I have a synchronous pipeline working, that basically writes to an > array and reads off it (easily tweaked to do the fiddling you want). > It does not solve my problem, as I need to have all this work > asynchronously, and when I have a solution for that I will post that > to this thread. > >> I'm developing on a Mac, but in the long run I'd like this to be cross >> platform. Am I on the right track? > > I have set up gstreamer to work with python on windows with very > little problem for testing, but have not (yet) sorted out the mac > side, but don't expect too many problems. I develop on linux myself, > and for that gstreamer is very easy, so any testing you need to do > when getting things to be cross platform will be a piece of cake. > > As for getting the stream of the camera, gstreamer has plugins for > pulling with just about any protocol you can think of, and sinking it > into just about any other format you can think of. > > Good luck, and my biggest tip is that gst-launch is your friend, and > googling with gst-launch as the first term will give you lots of good > pipelines. > > Best of luck, now to post my question. ;) > > Rohan > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Stefan Kost wrote:
> Rohan schrieb: >> Shear, Greg wrote: >>> I have a network camera (this one: >>> http://www.axis.com/products/cam_2120/ ) plugged into my home LAN. I can >>> check out its IP with my web browser and see the video. Cool. >>> >>> I'd like to write a little app to receive that video stream and do some >>> processing/remapping of the pixels. I've had a couple people recommend >>> gstreamer to get access to the video stream. I'm looking some >>> suggestions about where to start; some simple demo code would be great. >> >> Hi Greg. I am wrestling with this at the moment. For many things I >> have found the gstreamer library fabulous. Personally I use the >> python bindings, and use gst-launch for all my pipeline testing. >> >> It sounds like what you want to do is not something supplied by one of >> the many plugins, in which case you are going to want to use >> appsink/appsrc which is what I am using at the moment. > > I would also recommend to try writing and own plugin. If you e.g. use > VideoFilter as a baseclass, there is really not much that you need to implement > besides the actually proceessing function. > > Not sure is videofilter is wrapped under the python bindings. Check with bilboed > on irc. Writing a video filter in python is probably not the best idea in terms > of performance, but should work for prototyping. Wow, this is a great tip. To be honest I had been avoiding it, because it looked quite intimidating. As for performance, getting a prototype working in python at least lets you see how to do it. From there it should be pretty fast and easy to translate to c. Thanks for the tip. I am still going to post a question to my immediate problem. ;) Rohan Btw. Here is the synchronous script that does works at this point. ------------------------------------------------------------------------ #!/usr/bin/env python import pygst pygst.require("0.10") import gst # import gobject class client(object): def __init__(self): self.buffers = [] pipeline = gst.parse_launch('''audiotestsrc name=testsrc ! decodebin ! audio/x-raw-int ! audioconvert ! vorbisenc name=vorbisenc ! appsink name=sink sync=False''') sink = pipeline.get_by_name('sink') pipeline2 = gst.parse_launch(''' appsrc name=source ! vorbisdec ! audioconvert ! alsasink''') source = pipeline2.get_by_name("source") pipeline.set_state(gst.STATE_PLAYING) pipeline2.set_state(gst.STATE_PLAYING) while True: try: # print "PULL BUFFER" buf = sink.emit('pull-buffer') self.buffers.append(buf) if self.buffers: source.emit('push-buffer', self.buffers.pop(0)) except SystemError, e: # it's probably a bug that emits triggers a SystemError print 'SystemError', e break if __name__ == "__main__": client() ------------------------------------------------------------------------ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |