Tuesday, January 5, 2010

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)

No comments:

Post a Comment