Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)

Started by g3gg0, July 15, 2013, 10:58:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

Quote from: mucher on August 15, 2013, 03:59:51 PM
I think their Q/DQ methods tie up the CPU too much, these tasks are really slow to complete, and on a slow cpu the things get even worse. There might be ways to free up the CPU from these seeking jobs to let it do what CPU is supposed to do -- like compressing files. I still sturbbonly believe that the DIGIC4 is fast enough to do something like /4 an interger. :D

The cpu is currently not involved at all.
The video is copied by dma controllers and they cant divide.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

Quote from: gnarr on August 15, 2013, 03:45:39 PM
Could someone post a (or send me) short dual-iso mlv file?

Dual iso support isnt implemented yet.
But here some example files: https://docs.google.com/folder/d/0BwQ2MOkAZTFHb3lmaTMzUV9uMWc/edit

Folder contains a spanning mlv, a compressed one, 10 bit uncompressed and compressed etc.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

gnarr

I just updated mlv2dng.

Fixed / working:
Headers are now correctly matched to frames via timestamps.
Almost all available exif and ifd info should be included in dng's.
There shouldn't be any memory leaks.
file spanning.
Little bit of error output in case it crashes.

What doesn't work / todo:
preview image. (although I'm closer to getting it right now.. will be there soon)
converting mlv to mlv for changing file compression or bit level.
converting non 14 bit mlv to dng.
converting LZMA compressed files to dng
converting dual iso mlv to dng.
more detailed error logging.

https://dl.dropboxusercontent.com/u/3181048/mlv2dng.zip

gnarr

Quote from: g3gg0 on August 15, 2013, 06:35:55 PM
Dual iso support isnt implemented yet.
But here some example files: https://docs.google.com/folder/d/0BwQ2MOkAZTFHb3lmaTMzUV9uMWc/edit

Folder contains a spanning mlv, a compressed one, 10 bit uncompressed and compressed etc.

Thanks :) this will help a lot with development.

g3gg0

Quote from: gnarr on August 16, 2013, 02:12:08 AM
What doesn't work / todo:
converting mlv to mlv for changing file compression or bit level.

this is not needed, as it is the mlv_dump main use case :)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

oddname

Is there a version yet for the 5D2 to test run and check? :)

g3gg0

5D2: no

5D3: here the latest one with some write performance gain
getting continuous 1920x1280 at 23.976 fps with CF only :)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

chmee

@g3gg0
(*) Format-Description - RAWI-Block - isnt it better to refer to the raw.h?
(*) would it make sense to put a badpixel-block into? i havent seen it. "we" could write a camera-module to mark bad pixels via 100%/200%/400%-photoview, then saving their positions.. this data we could use in the converter-modules to recalculate the badpixels, taking into account, that they're static and marking has to be done only once..

Blocktype - BPIX
Blocksize - 10+bpixCount*4
bpix-count - uint16
array of (x/y) uint16/uint16

regards chmee 
[size=2]phreekz * blog * twitter[/size]

Nikita_MV

For Time Lapse Interested RAW "video" High-resolution, the speed of the card is not as important (for example frequency of 1 frame per second). I can not understand now have that opportunity. Camera 60D.

g3gg0

Quote from: chmee on August 16, 2013, 11:57:24 AM
@g3gg0
(*) Format-Description - RAWI-Block - isnt it better to refer to the raw.h?

right, but i wanted to copy-paste the raw structure into the mlv header file.
not sure if i should put the 'struct raw_info' into mlv.h too, refer to the raw.h or if
i should put the fields from 'struct raw_info' in the RAWI block in the same format.

Quote from: chmee on August 16, 2013, 11:57:24 AM
(*) would it make sense to put a badpixel-block into? i havent seen it.
thanks for the hint.
at the moment there is a rudimentary method for detecting such pixels.
you can record an unlimited number of frames with lens cap on and allowed frame skipping.
using mlv_dump you can average all frames in the video (using './mlv_dump -a -o ref.mlv lenscap.mlv')
the output mlv is a single video frame with all noise (sensor and readout) and deviations (sensel offsets, dead sesels) averaged together.

using the subtract command (using './mlv_dump -s ref.mlv -o out.mlv in.mlv') , this reference frame can get subtracted from every single video frame.
this will eliminate some kinds of noise and will make your dead pixels dark.

this file we could use to reconstruct the dead pixels too.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

Quote from: Nikita_MV on August 16, 2013, 01:02:13 PM
For Time Lapse Interested RAW "video" High-resolution, the speed of the card is not as important (for example frequency of 1 frame per second). I can not understand now have that opportunity. Camera 60D.

not yet. sorry.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

chmee

@g3gg0
i like the idea of simple subtracting - but every time you change the resolution, you have to think of recording the lenscap-video. is there any examplevideo of your approach? practically i think there are no more than ~10badpixels on whole picture - 15 minutes of marking them and having static data for every kind of video (luckily we have the sensor-offset to do the calculations)..

but in general - there's already this approach to start immediately. and its able to neutralize noise and other sideeffects. like it.

regards chmee
[size=2]phreekz * blog * twitter[/size]

g3gg0

Yeah it might no be the perfect solution, but a good start.
As soon we know how bad pixels can be detected, we can specify the format.
Is a simple x/y coordinate of defective pixels enough?
Or do we have to save more?

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Canon eos m

Quote from: g3gg0 on August 16, 2013, 11:10:35 AM
5D2: no

5D3: here the latest one with some write performance gain
getting continuous 1920x1280 at 23.976 fps with CF only :)

:)
Canon 5D Mark III, Gopro Hero Blacks with 3D Casing, A Few Lenses, Adobe CC 2014, MacBook Pro, Windows 8 PC, Lots of Video Rig!

Started Nuke. Loved it but then the 15 day trial ran out. Back to After Effects and loving it :-)

chmee

i tried to find an example-tag inside a cr2-file - but -awakening! - there s no tag for it - so a logical conclusion is, a bad/hot-pixel-tag is only existent in DNG, because they're found/analysed only in the converter :) look into the  chdk-description.. so, finally it makes sense to give an int8 to any pixelposition - and we try to use them if we know more about hot/dead/bad-pixel- for now it's ok if we tell

0 = defective (recalculate with neighbours-data - general approach if no info about kind of problem)

if we had any information about kind of badpixel and/or differing repairalgorithm
1 = hotpixel on hi-iso
2 = hotpixel on longexposure
4 = recalculate only red
8 = rec.e only blue
16 = rec. only green
and so on.. for now i dont know for sure.
[size=2]phreekz * blog * twitter[/size]

MA Visuals

Quote from: g3gg0 on August 16, 2013, 11:10:35 AM
5D2: no

5D3: here the latest one with some write performance gain
getting continuous 1920x1280 at 23.976 fps with CF only :)

Here are my test results using your latest compared to Alex's latest.  I ran each test 7 times and then removed the 2 outlier results...

  Buffer fill method: 0
  CF-only buffers:    3
  Memory hack:      On
  Small hacks:        On

1920 x 1080, 29.97 fps
----------------------------
  g3gg0   a1ex   g3gg0 
    CF        CF     w/Span   
   634     1417     3002     frames
   754     1446     3594
   633     1622     2563   
   663     1638     3006   
   781     1635     2603   

1920 x 672, 48.00 fps
---------------------------
  g3gg0   a1ex   g3gg0 
    CF        CF     w/Span   
   391      751       550   
   442      751       642
   392      755       634   
   389      680       682   
   439      745       684

For 29.97 fps and spanning enabled, I got double the frames of Alex's latest. Nice :).  But without spanning, I got double the frames using Alex's.
For 48.00 fps, Alex's latest always performed significantly better.

Danne

Nice test! I really like the spanning feature and all the other possibilities of course adding the new format. Also very curious what spanning would accomplish in Alex,s raw format :).
Really nice to follow the skillfull developing going on.
//D

g3gg0

another bit of performance increase, but not much.
here
always try to use buffering method 4.

btw, couldnt get more than 1000 frames with alex code
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

RenatoPhoto

Quote from: g3gg0 on August 17, 2013, 12:54:43 AM
another bit of performance increase, but not much.
here
always try to use buffering method 4.

New code gave me slower results for 1920x1080, and cropped digital video 2048x1152 but slightly faster rates for high speed at 1728x606 at 60 fps.

Test 1 1920x1080 at 29.97

Yesterdays test G3GGo
95-103
103.5-103.4
103.2 101.9
Total recorded on three tests  17.2 GB

Today's latest code:
86-102
103-100
101-103
Total recorded on three tests  16 GB

Test 2 Cropped 3X 2048x1152 at 29.97

Yesterdays G3GGo
80-103.7 recorded 8 sec
75-86 recorded 5 sec
76-95.8 recorded 5 sec
Total recorded on three tests 3.07 GB

Todays G3GGo
86-96
101-102
78-96
Total recorded on three tests 2.39 GB

Test 3 1728x606 60 fps

Yesterdays G3GGo
73-86  recorded 9 sec
78.6-88.5 recorded 11 sec
78-87 recorded 9 sec
Total recorded on three tests  3.17 GB

Todays G3GGo
86-101
90-90.8
90-85
Total recorded on three tests 3.26

Slightly better speed on this videos.
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

Toffifee

Why is Alex not involved in this thread btw?

It would make sense to involve him, doesn't it?

Michael Zöller

Premature optimization is the root of all evil... :)
neoluxx.de
EOS 5D Mark II | EOS 600D | EF 24-70mm f/2.8 | Tascam DR-40


g3gg0

really cool :)

btw, do you also get "failed to get properties" for serial numbers with the latest build?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

okay, fixed.
(here with 5D3 autoexec/sym)
i played with edmac alignment in this version. please report if you get pink frames or lock ups.

@gnarr:
can you convert the camera serial number to a 12 digit decimal?
e.g. 110091F150 (hex) is 073024008528 (dec)

in camera i wanted to prevent 64 bit integer to string conversion, so i decided to put it as hex string.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

gnarr

Quote from: g3gg0 on August 18, 2013, 12:46:01 AM
@gnarr:
can you convert the camera serial number to a 12 digit decimal?
e.g. 110091F150 (hex) is 073024008528 (dec)

done :)