Hi Carl,

Thanks for your reply!

I mean this command.
ffplay -f dshow -i video="Mercury USB2.0 Camera" -s 640x480

How can we set 640x480 in C++ code?



-----Original Message-----
From: libav-user-boun...@ffmpeg.org [mailto:libav-user-boun...@ffmpeg.org]
On Behalf Of Carl Eugen Hoyos
Sent: 31. lokakuuta 2012 14:34
To: libav-user@ffmpeg.org
Subject: Re: [Libav-user] How can we set frame size for live stream?

Wenpeng Zhou <zhou.wenpeng@...> writes:

> 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. 

If your question is:
"How can I convince the decoder to output the frames that where originally
encoded with a size of 1280x720 as 640x480, ie how can the decoder do a
resize?"
Then the answer is: This is generally impossible, a decoder outputs the
frame that was encoded, there is libswscale (or the scale filter that uses
libswscale) to do the resizing.

There is an exception though:
You can use -lowres 1 with some decoders (for example mjpeg
iirc) to decode with lower resolution (and quality!) and faster speed to
"half" (actually quarter) resolution, in your case that would be 640x360.
(I don't think this is what you are searching for, but it is useful on very
low-end hardware.)

Carl Eugen

_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to