now videostab create a *.avi resource ,but I want to get *.mp4 so how to do? [closed]

asked 2016-11-07 07:39:37 -0500

     if (!outputPath.empty())
        if (!writer.isOpened())
  , VideoWriter::fourcc('X','V','I','D'),
                        outputFps, stabilizedFrame.size());
        writer << stabilizedFrame;
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-12-17 16:58:26.444632


See here for the list of fourcc code (so maybe fourcc('X','2','6','4') would work).

What I usually do is to save the images in an uncompressed format and after use FFmpeg to encode properly with X264 codec.

Eduardo gravatar imageEduardo ( 2016-11-07 08:25:45 -0500 )edit

The output video will always be saved in a .avi container, afaik.

LorenaGdL gravatar imageLorenaGdL ( 2016-11-07 09:27:07 -0500 )edit