Hi all!<br><br>I have made a test application that captures from webcam (using dshow filter), and saves it as a file on hard disk. My camera supports natively 640x480 resolution, so I had to forcefully open it in smaller resolution to conduct this test:<br>
<br>    pFormatCtx = avformat_alloc_context();<br>    AVDictionary *dict = NULL;<br>    av_dict_set( &dict, "video_size", "160x120" ,0);<br>    if(avformat_open_input(&this->pFormatCtx, this->finalInputName.c_str(), pInputFormat, &dict)!=0)<br>
        return -1; // Couldn't open file<br><br>finalInputName is the correctly formatted video:audio string ffmpeg recognizes for dshow.<br><br>Problem now is, no matter what the decoder's resolution is (160x120, 320x240, 640x480 etc.), output file size for approximately one minute duration is always the same - around 3 MB.<br>
<br>I tried encoding to other formats like 'mpg', 'ogg', their video sizes seems to be appropriately scaled, then what am I doing wrong with h264 format, fail to understand?<br><br>Can anyone kindly provide some guidance?<br>
<br>Thanks for your time!<br><br>Best regards...<br>