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 4 Guests are viewing this topic.

escho

https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

escho

Quote from: escho on October 06, 2013, 05:51:21 PM
to raw.c or to chdk-dng.c ?

Edgar

OK, to raw.h  :)

I compiled the whole stuff new with this changes and now the sigsegfault has gone. mlv_dump runs and I can decode the file with raw2dng

ThankYou


Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

g3gg0

ok thats the reason why i always use stdint types "uint32_t" etc instead of the random width types "int, long, short".
this saves you from architecture trouble.

(ok i rarely care for endianess conversion in my code and always assume we work on little endian, but thats an other issue)
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!

escho

Quote from: g3gg0 on October 06, 2013, 04:18:03 PM
i guess it is not your fault, but mine :)
you can keep the -m32 removed maybe.

can you check if compression still works?

Compression and decompression seems to work

edgar@linux-lyl7:~/test> ./mlv_dump -c -l 9 -o compress.mlv 1.MLV

MLV Dumper v1.0
-----------------

[i] Mode of operation:
   - Input MLV file: '1.MLV'
   - Rewrite MLV
   - Compress frame data
   - Output into 'compress.mlv'
[i] File 1.MLV opened
[i] Processing...
[i] Unknown Block: NULL, skipping
  saving: 790272 -> 740650  (93.72%)
[i] Unknown Block: NULL, skipping
  saving: 790272 -> 748475  (94.71%)

https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

escho

The camera-name looks a bit strange  :)

edgar@linux-lyl7:~/test> ./mlv_dump -v 1.MLV >test
...
Block: IDNT
  Offset: 0x000001ac
    Size: 84
    Time: 28.726000 ms
     Camera Name:   'ERR:1 md:0x       0 ml:0'
     Camera Serial: ''
     Camera Model:  0x00000000
...


Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

g3gg0

thats because of:
"/* 00:00:36.154540  */ WARNING: This model doesn't have 'PROPAD_GetPropertyData' defined. Reading properties not possible."

they usually can be found by searching for the string and checking who is being called.
PROP_GetMulticastProperty is usually named prop_get_value, thats the reason why it has the same address.

e.g. 7D:
/** corectly named canon property reading functions **/
NSTUB(0xFF0687C8, PROP_GetMulticastProperty)
NSTUB(0xFF06934C, PROPAD_GetPropertyData)

5D3:
/** corectly named canon property reading functions **/
NSTUB(0xFF123DE4, PROP_GetMulticastProperty)
NSTUB(0xFF12523C, PROPAD_GetPropertyData)
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

can you hg pull and recompile magic lantern again?
no need to recompile the modules.
it may be necessary to undo the stdint.h and raw.h changes you made

you then should see your camera information in the recorded movie.
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

Quote from: g3gg0 on October 06, 2013, 02:18:46 PM
you wanted to try it again, you said a few weeks ago ;)

the module is not camera-dependent, you can use it for any model.

it should work with any camera on which the original raw_rec works too.
but it may require some symbols in the ML/MODULES/<model>.SYM, so you may get an error.

which error do you get? which model?

Which I did, but i noticed ppl with 5d2 posted logs and videos showing the same results.
Tried again  with the same results, lock-up.

Thought there was another recent build to try :)

escho

Quote from: g3gg0 on October 06, 2013, 07:18:08 PM
can you hg pull and recompile magic lantern again?
...
you then should see your camera information in the recorded movie.

I added the prop... per hand to stubs.S, because your repos are a little bit amazed at the moment  ;) . Now the IDNT-Block with camera-name is ok.

ThankYou

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

1%

I'm still getting hsuite error on 7D, second record

Replaced the raw struct too.

Quote
ML ASSERT:
(int)size == hSuite->size
at ../../src/exmem.c:122 (shoot_malloc_suite), task raw_rec_task
lv:1 mode:3

g3gg0

hmm so on 600D and 7D there are such errors?
i tried a bunch of videos on 7D with some older version and had no such errors. damn.

which settings?
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!

1%

Just normal stuff/ gd off + hacks.

I'm trying the binary and it says no info structure found...

mk11174

Cool, I see MLV works on 550D, just made my first MLV clip.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

1%

6D freezes when stopping 2nd record

ML ASSERT:
(int)size == hSuite->size
at ../../src/exmem.c:122 (shoot_malloc_suite), task raw_rec_task
lv:1 mode:3


Have i f'ed something up?
https://bitbucket.org/OtherOnePercent/tragic-lantern-6d/src/0ae870f7dbd161440955320583c5eff381fb8b60/modules/mlv_rec/mlv_rec.c

escho

Some other hints for this camera-crash on my 600d, maybe

I can record as many videos I want, if I switch off the camera after every video.

I record a video and stop it and than switch away from videomode. Now, if i switch back to videomode, the camera tells me: busy, please wait (beschäftigt, bitte warten)

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

mk11174

500D/T1i  550D/T2i  600D/T3i  700D/T5i

g3gg0

ok there seems to be some weird shoot mem issue... hmm
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

Tested todays build on 5D3.

At the moment the spanning function records both files on CF card and SD is not being used.
Recorded files are ok.
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

1%

Ok, I found the commits, thank you for fixing it.. I see 83 -85MB/s instant writes but seems a bit inconsistent.

When I do the buffer test:

7D FULL 1x

M 0 B 3 79.1 5GB
M 0 B 3 80.1 6GB
M 0 B 3 81.9 14GB
M 0 B 3 82.1 14GB

As card becomes more full...

M1 81.2 8GB
M1  80.1 7GB
M1  72.1 1.2GB
M1  77.4 3.2GB

M2 78.1 2.5GB
M2 79.2 4.3GB
M2 70.4 1.5GB

M3 60.5 800MB
M3 73 1.5GB
M3 74.4 1.7GB

M4 71.1 1.3GB
M4 74.5 1.9GB
M4 72.2 1.4GB
M4 75.2 2GB

Raw_rec writes  a full card 2nd time recording.

Maybe this test needs to be done on 2.5K in zoom mode?




escho

raw_rec doesn´t compile with latest sources (magic-lantern-mlv) on my 600d. I have to change raw_rec.c like this:

edgar@linux-lyl7:~/MagicLantern/magic-lantern-mlv/modules/raw_rec> diff raw_rec_original.c raw_rec.c
68,69c68,69
< #include <math.h
< #include <cropmarks.h>>
---
> #include <math.h>
> #include <cropmarks.h>
342c342
< static unsigned int raw_rec_should_preview(unsigned int ctx);
---
> static uint32_t raw_rec_should_preview(uint32_t ctx);


Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed


escho

Didn´t see the pull request.  Great

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

g3gg0

thanks for the support!
merged in the necessary stuff for 5D2.

i still have the write performance drops every few seconds and no idea where they come from.
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!

escho

600D:

Any reasons not to append these changes to the mlv-sources?  mlv_dump doesnt run wifhout for me

Quote from: g3gg0 on October 06, 2013, 04:38:06 PM
can you open raw.h in src/ directory and replace the raw_info struct with this one?


/* raw image info (geometry, calibration levels, color, DR etc); parts of this were copied from CHDK */
struct raw_info {
    int32_t api_version;            // increase this when changing the structure
    uint32_t buffer;               // points to image data
   
    int32_t height, width, pitch;
    int32_t frame_size;
    int32_t bits_per_pixel;         // 14

    int32_t black_level;            // autodetected
    int32_t white_level;            // somewhere around 13000 - 16000, varies with camera, settings etc
                                // would be best to autodetect it, but we can't do this reliably yet
    union                       // DNG JPEG info
    {
        struct
        {
            int32_t x, y;           // DNG JPEG top left corner
            int32_t width, height;  // DNG JPEG size
        } jpeg;
        struct
        {
            int32_t origin[2];
            int32_t size[2];
        } crop;
    };
    union                       // DNG active sensor area (Y1, X1, Y2, X2)
    {
        struct
        {
            int32_t y1, x1, y2, x2;
        } active_area;
        int32_t dng_active_area[4];
    };
    int32_t exposure_bias[2];       // DNG Exposure Bias (idk what's that)
    int32_t cfa_pattern;            // stick to 0x02010100 (RGBG) if you can
    int32_t calibration_illuminant1;
    int32_t color_matrix1[18];      // DNG Color Matrix
   
    int32_t dynamic_range;          // EV x100, from analyzing black level and noise (very close to DxO)
};



Quote from: g3gg0 on October 06, 2013, 04:18:03 PM

you can keep the -m32 removed maybe.


Quote from: g3gg0 on October 06, 2013, 05:38:50 PM
add a
#include <stdint.h>
to the c file as first line

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

g3gg0

can you enable the buffer graphs and check if you also get some write rate drop every now and then?

green line = buffer fill level
red line = write rate
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!