Rotate Vs Transform
Posted: 30 Oct 2008 18:09
Hi,
I'm trying to rotate a video by 90 deg and stream it via sout. I googled and found there are two video filters, rotate and transform. Seems like somehow I can't use transform in the sout (#transcode{vfilter=transform{type=90}} doesnt work). Only rotate vfilter works in the sout->transcode.
Anyway, when I play a file locally using rotate and transform filter, I get different results. The rotate 90 deg will rotate the picture, but will clip the left and right of the original picture. So, when the picture is flipped, the video has clipped top and bottom. When playing the video using rotate, the vlc window size doesn't change, just the movie is rotated inside, thus clipping the original sides and leaving blank bars vertically.
When I use transform filter, the video is actually rotated 90 deg and the vlc window changes to show complete vertical image. Seems like transformation filter is what I really need. But somehow I can't use it inside sout->transcode->vfilter=transform. May be I'm giving some wrong syntax.
My question is if rotate filter is what its supposed to do , that means clipping the image ? I'd have thought rotate will be same as transform. I looked at the code in motion.c and it says, transform is obsolete, use rotate.
I've attached images at the bottom for explanation.
Thanks
Mudit
Here is the normal image.
Here is the rotated image.
Here is the transformed image --- sorry forgot deinterlacing, but you can see its completely turned 90 deg.
I'm trying to rotate a video by 90 deg and stream it via sout. I googled and found there are two video filters, rotate and transform. Seems like somehow I can't use transform in the sout (#transcode{vfilter=transform{type=90}} doesnt work). Only rotate vfilter works in the sout->transcode.
Anyway, when I play a file locally using rotate and transform filter, I get different results. The rotate 90 deg will rotate the picture, but will clip the left and right of the original picture. So, when the picture is flipped, the video has clipped top and bottom. When playing the video using rotate, the vlc window size doesn't change, just the movie is rotated inside, thus clipping the original sides and leaving blank bars vertically.
When I use transform filter, the video is actually rotated 90 deg and the vlc window changes to show complete vertical image. Seems like transformation filter is what I really need. But somehow I can't use it inside sout->transcode->vfilter=transform. May be I'm giving some wrong syntax.
My question is if rotate filter is what its supposed to do , that means clipping the image ? I'd have thought rotate will be same as transform. I looked at the code in motion.c and it says, transform is obsolete, use rotate.
Code: Select all
#define USE_ROTATE_TEXT N_("Use the rotate video filter instead of transform")
Thanks
Mudit
Code: Select all
VLC media player 1.0.0-git Goldeneye
[0x804ba38] main libvlc debug: VLC media player - version 1.0.0-git Goldeneye - (c) 1996-2008 the VideoLAN team
[0x804ba38] main libvlc debug: libvlc was configured with ./configure '--prefix=/usr' '--enable-wxwidgets' '--enable-dvdread' '--enable-dvdplay' '--enable-esd' '--enable-v4l' '--enable-dvb' '--enable-x264' '--enable-lirc' '--with-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-dts' '--with-ffmpeg-vorbis' '--with-ffmpeg-ogg' '--enable-ffmpeg' '--enable-theora' '--enable-faad' '--enable-live555' '--with-live555-tree=../../liveMedia/live' '--enable-debug' '--enable-visual' '--enable-bonjour=no'
Code: Select all
vlc --snapshot-path . --snapshot-prefix normal_ 5100_20081030093409.mpg
Code: Select all
vlc --snapshot-path . --snapshot-prefix rotated_ --video-filter "rotate{angle=90}" 5100_20081030093409.mpg
Code: Select all
vlc --snapshot-path . --snapshot-prefix transform_ --vout-filter=transform --transform-type=90 5100_20081030093409.mpg