Author Topic: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)  (Read 1008042 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12280
  • Emergencies only
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1650 on: March 28, 2014, 09:52:04 PM »
The issue is also present in dcraw. These were cold pixels, but their value was not zero.

I've just fixed the issue in raw2dng.

cc @escho and g3gg0 to port the fix in mlv_dump. I did a quick grep and couldn't find the cold pixel fix code.

arturochu

  • Member
  • ***
  • Posts: 129
  • Filmmaker based in Mexico City
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1651 on: March 28, 2014, 10:25:55 PM »
thx, will try fix tomorrow.
Chu

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1652 on: March 28, 2014, 10:53:37 PM »
cc @escho and g3gg0 to port the fix in mlv_dump. I did a quick grep and couldn't find the cold pixel fix code.

mlv_dump:2079   find_and_fix_cold_pixels(fix_cold_pixels, block_hdr.frameNumber);

as mlv_dump uses raw2dng.c, the next build should have a1ex' fix.
will build them tonight. done, see the main post.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

GooDween

  • New to the forum
  • *
  • Posts: 17
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1653 on: March 29, 2014, 06:31:39 AM »
I don't have tracemodule in the list.

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1654 on: March 29, 2014, 12:51:21 PM »
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

GooDween

  • New to the forum
  • *
  • Posts: 17
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1655 on: March 29, 2014, 02:43:15 PM »
installed this, and reinstal ml now it show right info, able to record 10s 23,976 1080p
waiting for more speedy cards.
but there are no files of trace on card.
don't understand why in camera card is much slower 68mb in camera 112mb on pc.

far.in.out

  • New to the forum
  • *
  • Posts: 34
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1656 on: March 29, 2014, 07:51:15 PM »
Hi. I'm getting magenta tint on my .mlv's. Something I should know about?
50D (was 600D) Helios 44M-4, Canon 18-55mm IS II

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1657 on: March 29, 2014, 07:56:27 PM »
Hi. I'm getting magenta tint on my .mlv's. Something I should know about?

well, you could explain a bit more.
one frame? all frames? all videos? just some videos?
camera? module version? settings? sample image?
etc
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

far.in.out

  • New to the forum
  • *
  • Posts: 34
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1658 on: March 29, 2014, 08:04:11 PM »
Omg. Sorry.
50D. Latest Nightly. All videos all frames. It's not like it's corrupted, just a tint. I've seen somewhere it has been reported before. Can't find now...
BTW, legacy RAW is OK...
50D (was 600D) Helios 44M-4, Canon 18-55mm IS II

escho

  • Contributor
  • Hero Member
  • *****
  • Posts: 555
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1659 on: March 29, 2014, 08:23:18 PM »
mlv_rec has this nice recording symbol, followed by the elapsed recording time. But if frames are skipped, which happens to me from time to time, the elapsed time isn´t shown anymore. I can only see, how many frames are skipped acually. But I would like to see both, the elapsed time and the skipped frames.

I played a bit with the code and solved this problem for me like this in mlv_rec.c

 
Code: [Select]
if(!DISPLAY_REC_INFO_NONE && liveview_display_idle() && should_run_polling_action(DEBUG_REDRAW_INTERVAL, &auxrec))
        {
            if(DISPLAY_REC_INFO_ICON)
            {
                int32_t fps = fps_get_current_x1000();
                int32_t t = ((frame_count + frame_skips) * 1000 + fps/2) / fps;
                int32_t predicted = predict_frames(measured_write_speed * 1024 / 100 * 1024);
                /* print the Recording Icon */
                int rl_color;
                if(predicted < 10000)
                {
                    int time_left = (predicted-frame_count) * 1000 / fps;
                    if (time_left < 10) {
                        rl_color = COLOR_DARK_RED;
                    } else {
                        rl_color = COLOR_YELLOW;
                    }
                }
                else
                {
                    rl_color = COLOR_GREEN1;
                }
               
                int rl_icon_width=0;
                /* Draw the movie camera icon */
                rl_icon_width = bfnt_draw_char(ICON_ML_MOVIE, MLV_ICON_X, MLV_ICON_Y, rl_color, COLOR_BG_DARK);
               
                /* Display the Status */
                bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+5, "%02d:%02d", t/60, t%60);
                if(frame_skips)
                {
                    bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+30, "%d skipped", frame_skips);
                }
            }

My changes:

int32_t t = ((frame_count + frame_skips) * 1000 + fps/2) / fps;

 /* Display the Status */
                bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+5, "%02d:%02d", t/60, t%60);
                if(frame_skips)
                {
                    bmp_printf(FONT(FONT_MED, COLOR_WHITE, COLOR_BG_DARK), MLV_ICON_X+rl_icon_width+5, MLV_ICON_Y+30, "%d skipped", frame_skips);
                }

           
I don´t know, whether my change is a proper solution for this problem or whether this must be done in another way. Can this feature, showing skipped frames and elapsed time, be integrated in mlv_rec, please?

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

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1660 on: March 29, 2014, 08:50:52 PM »
Omg. Sorry.
50D. Latest Nightly. All videos all frames. It's not like it's corrupted, just a tint. I've seen somewhere it has been reported before. Can't find now...
BTW, legacy RAW is OK...


ok disable the black fix option in menu and try again.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1661 on: March 29, 2014, 08:54:58 PM »
I don´t know, whether my change is a proper solution for this problem or whether this must be done in another way. Can this feature, showing skipped frames and elapsed time, be integrated in mlv_rec, please?

added your code, thanks ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

far.in.out

  • New to the forum
  • *
  • Posts: 34
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1662 on: March 29, 2014, 09:40:29 PM »
That was it. Thank you.
50D (was 600D) Helios 44M-4, Canon 18-55mm IS II

chmee

  • Contributor
  • Hero Member
  • *****
  • Posts: 1031
  • raw2cdng
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1663 on: March 31, 2014, 11:01:18 AM »
@g3gg0
old question: (old) raw_rec solved splitting files by leaving the file-split done by the OS, thus it happends, the raw-frames are splitted as well. was it changed? it seems, in mlv there are not splitted anymore, did it changed in raw_rec as well?

regards chmee

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1664 on: March 31, 2014, 01:14:41 PM »
Hey.
Splitting in raw_rec was not done by the OS. raw_rec handled that on its own.

In mlv_rec this is handled differently. Every chunk contains only complete blocks.
This way you can read every file on its own, you don't need the previous one.
There is no split in the middle of a block/frame.

But you can still merge them by simply concatenating them.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

gideonplus

  • New to the forum
  • *
  • Posts: 35
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1665 on: March 31, 2014, 01:27:51 PM »
@g3gg0
Does the 5Diii 123 nightly from mar 31 have your latest
changes to the MLV_REC ?
I still see this problem
ML ASSERT:
hdr->blockSize >= (sizeof(mlv_vidf_hdr_t) + hdr->frameSpace + frame_size)
at mlv_rec.c:1984 (process_frame), task Evf
lv:1 mode:3

Magic Lantern version : Nightly.2014Mar31.5D3123
Mercurial changeset   : 9765bab7157b (5D3-123) tip
Built on 2014-03-30 22:53:25 UTC by jenkins@magiclantern.fm.
Free Memory  : 152K + 3747K

Jakobmen

  • Member
  • ***
  • Posts: 122
  • Canon 5D3
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1666 on: March 31, 2014, 02:08:39 PM »
@g3gg0
Does the 5Diii 123 nightly from mar 31 have your latest
changes to the MLV_REC ?
I still see this problem
ML ASSERT:
hdr->blockSize >= (sizeof(mlv_vidf_hdr_t) + hdr->frameSpace + frame_size)
at mlv_rec.c:1984 (process_frame), task Evf
lv:1 mode:3

Magic Lantern version : Nightly.2014Mar31.5D3123
Mercurial changeset   : 9765bab7157b (5D3-123) tip
Built on 2014-03-30 22:53:25 UTC by jenkins@magiclantern.fm.
Free Memory  : 152K + 3747K

me to
Canon 5D3

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1667 on: March 31, 2014, 03:19:37 PM »
Its still happening? Ok then ill check.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

chmee

  • Contributor
  • Hero Member
  • *****
  • Posts: 1031
  • raw2cdng
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1668 on: March 31, 2014, 03:45:41 PM »
i just hoped to throw away my file-reading-module for raw_rec. without merging files its a little bit annoying with (part@FileA) + (part@FileB) -> deltaOffset@FileB etc pp.. ok. thanks a lot, i'll rewrite the code..

regards chmee

Canon eos m

  • Hero Member
  • *****
  • Posts: 562
  • 5D Mark III, Canon EOS M
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1669 on: March 31, 2014, 07:23:33 PM »
Hi g3gg0. All my issues with mlv_rec are sorted except when the card fills up the screen of my 5DM3 throws up and error message and freezes.

Uploaded whatever the camera produced here:


Edit: The youtube upload has an error. Will try to upload again.
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 :-)

core_32

  • New to the forum
  • *
  • Posts: 25
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1670 on: April 01, 2014, 11:22:39 PM »
i added a workaround for that black level issue. (next nightly)
i am not sure why the raw backend has trouble in detecting the correct black level so often now.
did you all use zoomed modes?

a) mlv_rec will by default fix that value to 2048. depending on your camera this may be wrong.
iirc alex told me that there may be some models which have 4096. (maybe i mixed smth up)
for this reason there is a menu option to disable that black-fix if you need it.

b) mlv_dump has an option --black-fix to override black level to 2048. for existing footage just run
'./mlv_dump in.mlv --black-fix -o out.mlv' and your footage in out.mlv will have black level set to 2048.
(for windows users: here is a version with the fix)

the changes will take effect with the next nightly.

I'm sorry g3gg0, how can I prevent this dark-green-clip issue happening when using RAW_REC module? I've tried a few latest builds they all had this issue (with ~70% chance in cropped mode)
I noticed a "Black Level" option in the "image finetuning" menu, it can be set to -100..100, is this a cure? If so which value should I use?
Thanks.

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1671 on: April 02, 2014, 01:11:57 AM »
you could try to patch the raw_rec footer or implant the hack into raw2dng.c.
there is no ready-to-run solution for that.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

scarluuk

  • Freshman
  • **
  • Posts: 61
  • From herp to derp in 45 seconds
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1672 on: April 02, 2014, 06:12:04 PM »
Is there any way to fix the underexposed green DNG's on mac?
Been using RAW on the 5DmkIII with 1.2.3. and the 26 march build.
You don't need eyes to see, you need vision.
Canon 5D mark III / Canon 24-105mm F4L IS / Samyang 14mm T3.1 / Samyang 24mm T1.5 / Canon 50mm F1.4 / Samyang 85mm T1.5

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0
« Reply #1673 on: April 02, 2014, 07:22:42 PM »
thats the way to fix the .dng files you got using raw2dng.

Change the black level.

exiftool -BlackLevel=2048 *.DNG

(or 1024 or just adjust it until you get rid of the color cast)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3154
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1674 on: April 03, 2014, 07:15:43 PM »
i currently have 1.1.3 on my 5D3 and cannot reproduce this fault.
did it happen to you with the old firmware version?

ML ASSERT:
hdr->blockSize >= (sizeof(mlv_vidf_hdr_t) + hdr->frameSpace + frame_size)
at mlv_rec.c:1984 (process_frame), task Evf
lv:1 mode:3

Magic Lantern version : Nightly.2014Mar31.5D3123
Mercurial changeset   : 9765bab7157b (5D3-123) tip
Built on 2014-03-30 22:53:25 UTC by jenkins@magiclantern.fm.
Free Memory  : 152K + 3747K
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!