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

Wenpeng Zhou zhou.wenpeng at rdnet.fi
Wed Oct 31 13:22:40 CET 2012


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.

Thanks!



More information about the Libav-user mailing list