I would like to write out a .wmv video using ffmpeg_ostream. Here is my code snippet:

vidl_ffmpeg_ostream my_ostream ("video.wmv",
.encoder( vidl_ffmpeg_ostream_params::MSMPEG4V2 )
.frame_rate( (frame_rate) )
.bit_rate (5000));

// iterate through the FIFO from oldest to newest frame
// write the video sequence

while (current->frame != NULL && --i) {

 wframe = current->frame ;
  my_ostream.write_frame(wframe) ;

 current  = current->prev ;


my_ostream.close () ;

The resulting video.wmv is very choppy and doesn't seem to contain every frame. Also, Windows does not seem to be able to read properties like the frame rate or video length. If, however, I switch the extension to ".avi", all of this info is present in the file, and the video plays normally. I'm wondering, are there extra parameters to set when writing WMV files? Or is ffmpeg_ostream not intended for this?

Many thanks,

The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free!