Fwd: Unable to fetch video frame on amazon ec2 server

Abhishek Jain jain.abhishek347 at gmail.com
Mon Jan 27 04:48:59 PST 2014


Hi,

I am new with Gstreamer.
My requirement is fetch video frame in python code.
my code is as:

def get_frame(path, offset=5, caps=gst.Caps('image/png')):
    pipeline = gst.parse_launch('playbin2')
    pipeline.props.uri = path
    pipeline.props.audio_sink = gst.element_factory_make('fakesink')
    pipeline.props.video_sink = gst.element_factory_make('fakesink')
    pipeline.set_state(gst.STATE_PAUSED)
    # Wait for state change to finish.
    pipeline.get_state()
    assert pipeline.seek_simple(
        gst.FORMAT_TIME, gst.SEEK_FLAG_FLUSH, offset * gst.SECOND)
    # Wait for seek to finish.
    print pipeline.get_state()
    b = pipeline.emit('convert-frame', caps)
    pipeline.set_state(gst.STATE_NULL)
    return b

def main():
  url = "
https://s3.amazonaws.com/veromuse/vermose_DFu9Ug_Akon-RightNow(NaNaNa).mp4"
  buf = get_frame(url)
  with file('frame_abhiss.png', 'w') as fh:
    fh.write(bytes(buf))

if __name__ == '__main__':
  main()

Here i'm getting "None" at pipeline.emit('convert-frame', caps). it is work
properly in my local machine. I'm raaly didt know what is going wrong on
amazon EC2.

i used these command to install the plugins:
sudo apt-get install python-gst0.10 gstreamer0.10-plugins-good \
    gstreamer0.10-plugins-ugly

Here i'm using the s3 url for fetching the video frame. and want to save
frame it into Amazon s3.

Please suggest me.
Thanks in advance.

-- 
Regards
Abhishek Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140127/af49e658/attachment.html>


More information about the gstreamer-devel mailing list