I just figure out how to make the sliders actual work, it all had to be done in glade and the answer came after thirty minutes of google searches.
http://tadeboro.blogspot.com/2009/09/glade3-tutorial-4-gtktreeview-data.html
I finally found this site, which told me to set the page_size = 0.00, after I did that and opened TimeLapse again, the sliders worked.
Thursday, January 7, 2010
Because the def image was not creating a snapshot, I wondered if maybe it was because of the Video function which was maybe conflicting with image, because we never set an order for the program. This means that it was trying to take a snapshot and record video at the same time. So you can see where this might have cause problems. We ended up having the computer take a picture first then record video and sound. So we changed the order in which they ran, making image run first then video and audio at the same time.
Tuesday, January 5, 2010
This involved making the image button function, so that when data was collected and image was taken and not just a video and sound.
def image(self):
self.image_path = "/tmp/tmp" + str(time.time())
IMAGE_GST_PIPE = ['v4l2src', 'ffmpegcolorspace', 'pngenc']
pipe = IMAGE_GST_PIPE + ['filesink location=%s' % (self.image_path)]
self.bus = self.pipe.get_bus()
self.pipe.set_state(gst.STATE_PLAYING)
self.bus.poll(gst.MESSAGE_EOS, -1)
self.file_dsobject = datastore.create()
self.file_dsobject.metadata['title'] = "Image Sample"
self.file_dsobject.metadata['mime_type'] = 'image/png'
self.file_dsobject.set_file_path(self.image_path)
datastore.write(self.file_dsobject)
self.file_dsobject.destroy()
def image(self):
self.image_path = "/tmp/tmp" + str(time.time())
IMAGE_GST_PIPE = ['v4l2src', 'ffmpegcolorspace', 'pngenc']
pipe = IMAGE_GST_PIPE + ['filesink location=%s' % (self.image_path)]
self.bus = self.pipe.get_bus()
self.pipe.set_state(gst.STATE_PLAYING)
self.bus.poll(gst.MESSAGE_EOS, -1)
self.file_dsobject = datastore.create()
self.file_dsobject.metadata['title'] = "Image Sample"
self.file_dsobject.metadata['mime_type'] = 'image/png'
self.file_dsobject.set_file_path(self.image_path)
datastore.write(self.file_dsobject)
self.file_dsobject.destroy()
Today
After finally getting internet after being on vacation for two weeks, I find myself scrambling to catch up on all the new emails and updates going around. I looked at the new code and immediately saw a problem with the video recordings. All of the video recordings came back very pixelated.
To fix this problem i went into cameramic.py and looked at
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=160,height=120',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
I had originally tried to up the video scale to
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=640,height=480',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
but it ended up creating a very crisp video but it was incredibaly choppy. I spent a long time fiddling with the video scale til I came up
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=200,height=150',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
To fix this problem i went into cameramic.py and looked at
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=160,height=120',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
I had originally tried to up the video scale to
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=640,height=480',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
but it ended up creating a very crisp video but it was incredibaly choppy. I spent a long time fiddling with the video scale til I came up
def video(self):
VIDEO_GST_PIPE = ['v4l2src', 'queue', 'videorate',
'video/x-raw-yuv,framerate=15/1', 'videoscale',
'video/x-raw-yuv,width=200,height=150',
'ffmpegcolorspace', 'theoraenc', 'oggmux']
pipe = VIDEO_GST_PIPE + ["filesink location=%s" % (self.video_path)]
self.video_pipe = gst.parse_launch('!'.join(pipe))
self.video_pipe.set_state(gst.STATE_PLAYING)
Today
Hello All!!!
Yes I am a few weeks behind, but I am hoping that with some extra time and elbow grease, I will be able to fully update this sight.
Yes I am a few weeks behind, but I am hoping that with some extra time and elbow grease, I will be able to fully update this sight.
Subscribe to:
Posts (Atom)