Page 1 of 1

Problems with Video scaling

Posted: 04 Jun 2009 03:46
by benravin
Hi,

I wanted to scale the video output from 720x480 to 1200x256 resolution. I tried using libswscale but it is not scaling the output video.

I modified the file under dir vlc\modules\codec\avcodec\video.c and include the header file "# include <libswscale/swscale.h>" and added the following functions sws_getContext() and sws_scale().

These has been added under function picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )after avcodec_decode_video(). But it is not scaling the video output.

Can anybody please help me to scale the output video before displaying, also the necessary steps and functions.

-ben

Re: Problems with Video scaling

Posted: 04 Jun 2009 08:45
by Jean-Baptiste Kempf
Why this 1200x256 resolution?

Re: Problems with Video scaling

Posted: 04 Jun 2009 16:31
by benravin
Hi j-b,

The video image is circular in nature, and I want to add my routine to make it flat, so the width will become 2*PI*R where R is the radius of the image. This turns to be 1200 in my case. Basically i want to do the post processing of the video output and then only display it. Can you suggest how to do it, I thought of first doing the scaling from 720x480 to 1200x256 so the output display becomes what I want and then do the post processing which is nothing but making it flat. How do I change the display from 720x480 to 1200x256?

Re: Problems with Video scaling

Posted: 04 Jun 2009 18:12
by Jean-Baptiste Kempf
Transcode and set the width and heigth.

Re: Problems with Video scaling

Posted: 04 Jun 2009 18:40
by benravin
Hi,

Can you please explain in detail how to do the transcode, any document which I can use to know about the APIs.

Re: Problems with Video scaling

Posted: 05 Jun 2009 11:51
by kryptonite
I guess VLC itself can be used to perform transcoding.
Don't know much details, but for e.g. we need to do audio conversion of g711 to mp3 and invoke vlc with:

Code: Select all

vlc.exe -I dummy --dummy-quiet "C:\temp.avi" :sout=#transcode{acodec=mp3,ab=64,channels=1}:duplicate{dst=std{access=file,mux=ps,dst="D:\cam17.avi"}} vlc://quit
I guess you should find more info on their site