Ricardicus/mjpeg-avi

Please add license

mixern6 opened this issue · 6 comments

Please add license description file.
Thanks!

License added. Have you found this software useful somewhere?

I have a small project for projecting videos on 3D models and need to convert proprietary video formats to something readable by Qt multimedia. The generated files don't pass validation in riffpad, can't be opened in Avidemux and QMediaPlayer. It seems, there is something wrong about chunk sizes, at least riffpad shows incorrect numbers. However, the files can be opened and played in MPC

Ok, interesting. I built this thing many years ago, but I can perhaps take a look at it and fix it if I find where it is wrong. Thanks!

I found a bug and think I fixed the program now. Can you try it out now?

I see a few problems:
After this line fwriteDWORD(file_ptr, strh.dwSampleSize);
There should be rcFarme https://manualzz.com/doc/21076623/avi-file-format-1 :
RECT rcFarme;
rcFarme.left = 0;
fwriteDWORD(file_ptr, rcFarme.left);
rcFarme.top = 0;
fwriteDWORD(file_ptr, rcFarme.top);
rcFarme.right = 800; //width
fwriteDWORD(file_ptr, rcFarme.right);
rcFarme.bottom = 600; //height
fwriteDWORD(file_ptr, rcFarme.bottom);

riffpad expects it, but it is not there and junk information is displayed instead.
Also to make it work for windows, all "r" have to be replaced with "rb" otherwise it doesn't read the jpg files.
I fixed these on my side, but the output files are still not valid.

Thank you so much! I fixed it over here now also.