[Libav-user] How can we set frame size for live stream?

Roger Pack rogerdpack2 at gmail.com
Mon Nov 5 11:26:51 CET 2012


On 10/31/12, Wenpeng Zhou <zhou.wenpeng at rdnet.fi> wrote:
> Hi,
>
> I use the USB camera to capture live video.
>
> The default codec context is:
> Input #0, dshow, from 'video=Mercury USB2.0 Camera':
>   Duration: N/A, start: 58890.453000, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj422p, 1280x720, 30 tbr, 10000k tbn, 30
> tbc
>
> I hope to change frame size from 1280x720 to 640x480.
>
> I tried
> AVCodecContext
> pCodecCtx->width = 640;
>   pCodecCtx->height = 480;
>
> But this did not work.

My guess is you set a "key value pair" like
http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=274


More information about the Libav-user mailing list