Author Topic: The MLV format  (Read 23582 times)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #25 on: October 12, 2019, 07:50:53 PM »
Looking forward to this Ilia3101. Mlv app integration maybe?

ilia3101

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #26 on: October 13, 2019, 11:52:17 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #27 on: October 13, 2019, 11:53:15 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #28 on: October 13, 2019, 11:56:29 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #29 on: October 13, 2019, 12:50:11 PM »
both working

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2104
Re: The MLV format
« Reply #30 on: October 13, 2019, 03:11:23 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #31 on: October 13, 2019, 03:33:47 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

  • Contributor
  • Hero Member
  • *****
  • Posts: 2104
Re: The MLV format
« Reply #32 on: October 13, 2019, 03:39: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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #33 on: October 13, 2019, 03:47:41 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

  • Contributor
  • Hero Member
  • *****
  • Posts: 2104
Re: The MLV format
« Reply #34 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.
5D3.113 | EOSM.202

ilia3101

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #35 on: October 13, 2019, 09:52:46 PM »
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.


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

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: The MLV format
« Reply #36 on: October 13, 2019, 11:24:56 PM »
Awesome progress so far fellas!  8)
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2104
Re: The MLV format
« Reply #37 on: October 14, 2019, 08:13:49 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:
Code: [Select]
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #38 on: October 14, 2019, 08:28:31 PM »
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.

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

  • Senior
  • ****
  • Posts: 323
Re: The MLV format
« Reply #39 on: October 15, 2019, 02:09:44 AM »
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.

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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #40 on: October 16, 2019, 06:17:24 PM »
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.

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

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #41 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
Code: [Select]
Unique Camera Model             : Unknown Camera

ilia3101

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #42 on: November 09, 2019, 12:46:55 PM »
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
Code: [Select]
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

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #43 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.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #44 on: November 10, 2019, 03:50:12 PM »
Some helping out utilizing raw2mlv workflows. Only mac atm:
https://www.magiclantern.fm/forum/index.php?topic=24631.msg222250#msg222250

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8665
Re: The MLV format
« Reply #45 on: November 10, 2019, 05:32:42 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #46 on: November 10, 2019, 07:21:47 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #47 on: November 10, 2019, 08:11:19 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

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: The MLV format
« Reply #48 on: November 10, 2019, 08:21:55 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1001
Re: The MLV format
« Reply #49 on: November 10, 2019, 08:37:39 PM »
Sounds like something that libraw should know about. I will look in to it.