I am creating animations in a MFC based application using opencascade. Is there any way to export it to a video file like MP4 ?
Thanks,
Prajwal
gkv311 n Tue, 11/01/2022 - 08:02
The code of vanimation command in src/ViewerTest/ViewerTest_ViewerCommands.cxx might be useful to see how Image_VideoRecorder class could be used (considering that OCCT was built with FFmpeg dependency enabled).
When exporting videos at 4K 60 FPS or 4K 30 FPS, the first 8–9 frames are high quality, but after that, the quality drops, and frames become pixelated. The maximum stable frame rate I achieve is 6 FPS, causing the video to appear choppy.
Attached zip file for reference.
Referance :
src/ViewerTest/ViewerTest_ViewerCommands.cxx
When exporting videos at 4K 60 FPS or 4K 30 FPS, the first 8–9 frames are high quality, but after that, the quality drops, and frames become pixelated. The maximum stable frame rate I achieve is 6 FPS, causing the video to appear choppy.
Mpeg4 codec doesn't suit well for 4K resolution (at least with default parameters - probably they should be adjusted somehow to improve quality).
I may propose using another codec like mjpeg (and reconvert result video file using external tools), or vp9 (with .mkv container), or h264 (but for the latter you need using FFmpeg built with this codec enabled):
Tue, 11/01/2022 - 08:02
The code of vanimation command in src/ViewerTest/ViewerTest_ViewerCommands.cxx might be useful to see how Image_VideoRecorder class could be used (considering that OCCT was built with FFmpeg dependency enabled).
Tue, 11/01/2022 - 15:05
Thanks, I'll try it.
Mon, 03/17/2025 - 12:07
When exporting videos at 4K 60 FPS or 4K 30 FPS, the first 8–9 frames are high quality, but after that, the quality drops, and frames become pixelated. The maximum stable frame rate I achieve is 6 FPS, causing the video to appear choppy.
Attached zip file for reference.
Referance :
src/ViewerTest/ViewerTest_ViewerCommands.cxx
Mon, 03/17/2025 - 15:56
rahulmulik9 wrote:
Mpeg4 codec doesn't suit well for 4K resolution (at least with default parameters - probably they should be adjusted somehow to improve quality).
I may propose using another codec like
mjpeg
(and reconvert result video file using external tools), orvp9
(with.mkv
container), orh264
(but for the latter you need using FFmpeg built with this codec enabled):