Problems with Video scaling

This forum is about all development around libVLC.
benravin
Blank Cone
Blank Cone
Posts: 17
Joined: 03 May 2009 16:27

Problems with Video scaling

Postby benravin » 04 Jun 2009 03:46

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Problems with Video scaling

Postby Jean-Baptiste Kempf » 04 Jun 2009 08:45

Why this 1200x256 resolution?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

benravin
Blank Cone
Blank Cone
Posts: 17
Joined: 03 May 2009 16:27

Re: Problems with Video scaling

Postby benravin » 04 Jun 2009 16:31

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Problems with Video scaling

Postby Jean-Baptiste Kempf » 04 Jun 2009 18:12

Transcode and set the width and heigth.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

benravin
Blank Cone
Blank Cone
Posts: 17
Joined: 03 May 2009 16:27

Re: Problems with Video scaling

Postby benravin » 04 Jun 2009 18:40

Hi,

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

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: Problems with Video scaling

Postby kryptonite » 05 Jun 2009 11:51

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 55 guests