The MLV format

Started by ilia3101, August 08, 2019, 12:09:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Danne

Looking forward to this Ilia3101. Mlv app integration maybe?

ilia3101

We could add a feature to MLV App for converting other raw formats to MLV, but that doesn't really fit in to the design seamlessly, it would be like a whole separate app within MLV App, so I would like to create a separate GUI app for that (but command line converter coming first).

And as a reading/writing library, it won't be integrated in to MLV App. Partly because it's difficult, but I think it also adds some competition.

I didn't want to release anything yesterday because bit packing was not working, but I sorted it this morning.

Will release some stuff very soon, github.com/ilia3101/LibMLV soon to be made unprivate.

Also would like advice/help on compiling methods. Want it  to work on Windows too.

ilia3101

Quote from: garry23 on October 12, 2019, 07:43:05 PM
At the risk of making a fool of myself I thought I would flag an interest here, ie as a non video guy.

The use case for me is taking a series of .cr2 images to simulate a long exposure, convert them onto a MLV file and process that file in MLVapp, ie to simulate a LE exposure longer than the ND or base image I can take.

That should be possibe.

Danne

Quote from: Ilia3101 on October 13, 2019, 11:52:17 AM
And as a reading/writing library, it won't be integrated in to MLV App. Partly because it's difficult, but I think it also adds some competition.

I didn't want to release anything yesterday because bit packing was not working, but I sorted it this morning.

Will release some stuff very soon, github.com/ilia3101/LibMLV soon to be made unprivate.

Also would like advice/help on compiling methods. Want it  to work on Windows too.
Awesome.
By the way. Is it linux or mac right now?

ilia3101


masc

Quote from: Ilia3101 on October 13, 2019, 11:52:17 AM
Also would like advice/help on compiling methods. Want it  to work on Windows too.
If you like to have it working on all platforms with mostly one code base: Qt is again our best friend ;)
You wrote it again in C/C++?
5D3.113 | EOSM.202

ilia3101

Quote from: masc on October 13, 2019, 03:11:23 PM
If you like to have it working on all platforms with mostly one code base: Qt is again our best friend ;)
You wrote it again in C/C++?

Qt for the converter GUI yes, I agree. But I want the library itself to depend on almost nothing. CMAKE seems like a good compiling solution just for the library.

Yes, it's written in C, But it will also have a nice C++ wrapper.

This time I'm not making the mistake of having millions of variables like mlvObject_t in MLV App has. LibMLV reading object contains only MLV blocks themselves and array of where frames are in the file (and which file).

masc

Quote from: Ilia3101 on October 13, 2019, 03:33:47 PM
Qt for the converter GUI yes, I agree.
Qt is not just GUI. You can also build command line tools in Qt.
5D3.113 | EOSM.202

ilia3101

Quote from: masc on October 13, 2019, 03:39:47 PM
Qt is not just GUI. You can also build command line tools in Qt.

You mean use qt project (.pro) and let Qt do compiling work?

masc

Yapp, exactly. I am just not 100% sure if that works without Qt libs - this would be overkill. To be tested...

Edit: if you open QtCreator -> new project -> non-qt project -> Plain C/C++ Application..." This should do the job for Win/Linux/OSX.
5D3.113 | EOSM.202

ilia3101

Ok here's a little bit of libMLV: https://github.com/ilia3101/LibMLV (raw2mlv included, compiles on mac and linux, writing functionality not released yet, generally unfinished)

Quite tired from all this, macOS compiling/linking decided to break today, so I'm also going to have a break.


Quote from: masc on October 13, 2019, 04:10:18 PM
Yapp, exactly. I am just not 100% sure if that works without Qt libs - this would be overkill. To be tested...

Edit: if you open QtCreator -> new project -> non-qt project -> Plain C/C++ Application..." This should do the job for Win/Linux/OSX.

Thanks. I will try using that for something. I have a command program thing that is simple C, won't use it for that, as it really would be overkill. But there will be more than one program with libMLV so it could come in useful. Definitely going to use Qt for the GUI app.

DeafEyeJedi

Awesome progress so far fellas!  8)
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

masc

Quote from: Ilia3101 on October 13, 2019, 09:52:46 PM
Thanks. I will try using that for something. I have a command program thing that is simple C, won't use it for that, as it really would be overkill. But there will be more than one program with libMLV so it could come in useful. Definitely going to use Qt for the GUI app.
If you like to try with Qt, this would be your .pro file:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += read_raw.c \
    camera_matrices.c \
    raw2mlv.c \
    ../LibMLV/MLVFrameUtils.c \
    ../LibMLV/MLVWriter.c

HEADERS += \
    ../LibMLV/LibMLV.h \
    ../LibMLV/mlv_structs.h \
    ../LibMLV/MLVFrameUtils.h \
    ../LibMLV/MLVWriter.h

Shouldn't be much overkill, because it just uses the compiler and nothing else for building. But it is nice to handle, because you can use QtCreator's editor and buttons to compile - so much comfort.
5D3.113 | EOSM.202

ilia3101

Wow thank you! I will try that out. I'll try and add as many build methods as possible to all aspects of the library later.

Quote from: masc on October 14, 2019, 08:13:49 PM
But it is nice to handle, because you can use QtCreator's editor and buttons to compile - so much comfort.

Also allows you to use "qmake" command, comfort for me too :D

Luther

Quote from: Ilia3101 on October 12, 2019, 03:57:49 PM
Edit: just realised you suggested ISC. What is the advantage over MIT?

Both say basically the same: use how you want, just mention authors name. Legally speaking it is also the same (AFAIK, I'm not a lawyer). The difference is: ISC is very short and has less ambiguity. It's also easier for bigger projects to use, because it doesn't increase the text size too much.

Quote from: Ilia3101 on October 13, 2019, 03:33:47 PM
But I want the library itself to depend on almost nothing. CMAKE seems like a good compiling solution just for the library.

Nice. I think Qt is unnecessary. Even CMAKE is. Why not simply use make?

ilia3101

Quote from: Luther on October 15, 2019, 02:09:44 AM
Both say basically the same: use how you want, just mention authors name. Legally speaking it is also the same (AFAIK, I'm not a lawyer). The difference is: ISC is very short and has less ambiguity. It's also easier for bigger projects to use, because it doesn't increase the text size too much.

Ah ok. I may switch to this, still undecided on most aspects of libMLV. I will see what similar libraries are licensed with.

Quote from: Luther on October 15, 2019, 02:09:44 AM
Nice. I think Qt is unnecessary. Even CMAKE is. Why not simply use make?

LibRaw has many build files, makefile, CMAKE, Visual Studio project, even Qt project. I think it's worth trying to have many options in libMLV, so it can integrate with as many software projects as possible, as easy as possible. I like makefiles, but I also don't understand them and they are quite hard to make compatible with all systems.

Edit: maybe I will just do makefiles, turns out even microsoft has an official implementation of make called NMAKE, that uses same makefile format.

Danne

Hi Ilia3101. Your tool is working as expected. Very nice. Is it possible to add the Unique Camera Model  tag into the exported dng format? Well the tag is there, only the camera model is reported as Unknown Camera
Unique Camera Model             : Unknown Camera

ilia3101

Quote from: Danne on November 08, 2019, 07:36:03 AM
Hi Ilia3101. Your tool is working as expected. Very nice. Is it possible to add the Unique Camera Model  tag into the exported dng format? Well the tag is there, only the camera model is reported as Unknown Camera
Unique Camera Model             : Unknown Camera

Do you mean the mlv_idnt_hdr_t->cameraModel field?

Is this a Canon/ML specific thing ? Or do all cameras have this and can I extract it with Libraw?

Danne

Camera model is correctly reported but not the unique tag. The name should be the same as for the camera model tag.

Danne


Walter Schulz

Hmh ... found this. Any issue with MLV?
https://www.eoshd.com/comments/topic/39917-red-claim-victory-in-apple-raw-patent-battle/?tab=comments#comment-327129
Quote
Big bummer. The RED patent also poses a threat to MagicLantern as MLV is compressed RAW video.

ilia3101

Fuck. REally Annoying news.

I think that person on EOSHD is wrong (luckily), as from what I've heard RED's patent is for "visually lossless" compression, which just means high quality lossy (STILL A RIDICULOUS PATENT). However I have not read the whole patent so Im not an expert.

This video explains it well: https://www.youtube.com/watch?v=NZ20yQhMYx4 (all of this guy's videos about RED are great)

And here's the clip of Jim pretending that REDCODE didn't exist at a time when RED had already revealed everything about it: https://youtu.be/faEXjulgujk?t=55m53s

ilia3101

Quote from: Danne on November 09, 2019, 01:09:26 PM
Camera model is correctly reported but not the unique tag. The name should be the same as for the camera model tag.

Do you know if I can get the value for this tag using LibRaw?

Is this a commonly used way of identifying cameras? Or something that's only used/known in the Magic Lantern world?

If I cannot get it with LibRaw, I will have to add slightly annoying code that matches camera name to this tag, and it will only be useful for ML Canons anyway.

Danne

Lack of time here but the tag is used with adobe camera raw. And yeah. Camera tag for dng files.
Sorry, not familiar with libraw and how it works :(

ilia3101

Sounds like something that libraw should know about. I will look in to it.