[gst-devel] how to use videoflip to rotate a image?

Jan Schmidt thaytan at noraisin.net
Wed Mar 15 07:57:04 CET 2006


On Wed, 2006-03-15 at 23:45 +0800, zs p wrote:
> I want to rotate a image and save to a copy, how to use videoflip?
> such as save a image to a copy rotated 90 degree:
> gst-launch filesrc location=test.jpg ! videoflip ??? ! ??? ! filesink
> location=temp.jpg
> 
> can you tell me what I should do? thanks.

Run gst-inspect-0.10 videoflip to see it has a bunch of properties:
Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: null Current: "videoflip0"
  qos                 : handle QoS messages
                        flags: readable, writable
                        Boolean. Default: false Current: true
  method              : method
                        flags: readable, writable
                        Enum "GstVideoFlipMethod" Current: 1,
"clockwise"
                           0) none             - Identity (no rotation)
                           1) clockwise        - Rotate clockwise 90
degrees
                           2) rotate-180       - Rotate 180 degrees
                           3) counterclockwise - Rotate
counter-clockwise 90 degrees
                           4) horizontal-flip  - Flip horizontally
                           5) vertical-flip    - Flip vertically
                           6) upper-left-diagonal - Flip across upper
left/lower right diagonal
                           7) upper-right-diagonal - Flip across upper
right/lower left diagonal


You want something like:

gst-launch filesrc location=test.jpg ! jpegdec ! videoflip
method=clockwise ! jpegenc ! filesink location=temp.jpg

Cheers,
Jan.

-- 
Jan Schmidt thaytan at noraisin.net

Have you been half-asleep? Have you heard voices?
I've heard them calling my name...
-Kermit the Frog (Rainbow Connection)






More information about the gstreamer-devel mailing list