Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - thenickdude

#1
Just a note for anybody having trouble exporting audio recorded with mlv_snd. My MLV videos started with the "WAVI" chunk that describes the audio configuration, which is good:

# mlv_dump --visualize --skip-xref M25-1629.MLV

...
Processing...
[MLVI]
[RAWI][RAWC][IDNT][EXPO][LENS][RTCI][WBAL][VERS]++++++++[WAVI][NULL]
[VIDF]+++++++++++++++++++++++[AUDF]++++++++++++++++++++++[NULL]
[VIDF]++++++++++++++++[AUDF]++++++++[NULL]++++++++++++++++++++++++++
Reached end of chunk 1/1 after 947 blocks
Processed 592 video frames at 0.01 FPS (86558.85 s)


But for some reason the "WAVI" chunk appeared last in the "IDX" index file:

# mlv_dump --visualize M25-1629.MLV

...
M25-1629.MLV File M25-1629.IDX opened (XREF)
XREF table contains 730 entries
Processing...
[MLVI]
[RAWI][RAWC][IDNT][EXPO][LENS][RTCI][WBAL][VERS]++++++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]++++[AUDF]
[VIDF]+[AUDF][WAVI]
Reached end of all files after 730 blocks
Processed 592 video frames at 0.01 FPS (86558.85 s)
Done


When dumping the video using mlv_dump, it seems to read the chunks in the order specified in the index, so although it encountered "AUDF" chunks throughout the video, it never wrote them to the wav file, because it hadn't seen the "WAVI" audio information chunk yet. This resulted in an empty 2kB wav file.

Adding "--skip-xref" to the mlv_dump command fixed this and I recovered my 4.6MB of audio! (i.e. mlv_dump --dng --skip-xref M25-1629.MLV)
#2
I'm having some troubles with mlv_dump and my MLV files on OS X High Sierra. My videos play fine on mlv_play, but while trying to unpack the MLV to DNGs with mlv_dump, I get a segfault:

XREF table contains 20 entries
Processing...
File Header (MLVI)
    Size        : 0x00000034
    Ver         : v2.0
    GUID        : 9216039327435021128
    FPS         : 2.501000
    File        : 0 / 0
    Frames Video: 4
    Frames Audio: 0
    Class Video : 0x00000021
    Class Audio : 0x00000000
Block: RAWI
  Offset: 0x00000034
  Number: 1
    Size: 180
    Time: 0.754000 ms
    Res:  4096x3072
    raw_info:
      api_version      0x00000001
      height           3102
      width            4248
      pitch            7434
      frame_size       0x015FDF2C
      bits_per_pixel   14
      black_level      2047
      white_level      16200
      active_area.y1   30
      active_area.x1   146
      active_area.y2   3102
      active_area.x2   4248
      exposure_bias    0, 0
      cfa_pattern      0x02010100
      calibration_ill  1
Block: RAWC
  Offset: 0x000000e8
  Number: 2
    Size: 32
    Time: 0.761000 ms
    raw_capture_info:
      sensor res      5760x3840
      sensor crop     1.00 (Full frame)
      sampling        1x1 (read every line, read every column)
Block: IDNT
  Offset: 0x00000108
  Number: 3
    Size: 84
    Time: 0.767000 ms
     Camera Name:   'Canon EOS 5D Mark III'
     Camera Serial: '4E58BA31B' (21031002907)
     Camera Model:  0x80000285
Block: EXPO
  Offset: 0x0000015c
  Number: 4
    Size: 40
    Time: 0.773000 ms
     ISO Mode:   0
     ISO:        1600
     ISO Analog: 104
     ISO DGain:  0/1024 EV
     Shutter:    19016 microseconds (1/52.59)
Block: LENS
  Offset: 0x00000184
  Number: 5
    Size: 96
    Time: 0.794000 ms
     Name:        '35-35mm'
     Serial:      '000000000' (no valid S/N)
     Focal Len:   35 mm
     Focus Dist:  0 mm
     Aperture:    f/2.80
     IS Mode:     0
     AF Mode:     3
     Lens ID:     0x00000028
     Flags:       0x00000000
Block: RTCI
  Offset: 0x000001e4
  Number: 6
    Size: 44
    Time: 0.810000 ms
     Date:        30.08.2018
     Time:        05:16:09 (GMT+0)
     Zone:        ''
     Day of week: 4
     Day of year: 241
     Daylight s.: 0
Block: WBAL
  Offset: 0x00000210
  Number: 7
    Size: 44
    Time: 1.446000 ms
     Mode:   1
     Kelvin:   5200
     Gain R:   491
     Gain G:   1024
     Gain B:   638
     Shift GM:   0
     Shift BA:   0
Block: VERS
  Offset: 0x0000023c
  Number: 8
    Size: 152
    Time: 599.243000 ms
  String: 'crop_rec built 2018-07-09 21:48:22 UTC; commit c76ef16 on 2018-07-04 12:58:01 UTC by alex: crop_rec: fix case fallthrough warnings '
Block: VERS
  Offset: 0x000002d4
  Number: 9
    Size: 148
    Time: 774.878000 ms
  String: 'ettr built 2018-02-17 21:49:58 UTC; commit 5aa7ec6 on 2018-02-16 23:44:52 UTC by alex: Merged 70D_merge_fw112 into crop_rec_4k '
Block: VERS
  Offset: 0x00000368
  Number: 10
    Size: 176
    Time: 809.217000 ms
  String: 'file_man built 2018-02-17 21:49:56 UTC; commit bcbabb3 on 2018-02-17 20:28:28 UTC by alex: Moved timer functions to timer.h (always included from dryos.h) '
Block: VERS
  Offset: 0x00000418
  Number: 11
    Size: 180
    Time: 999.310000 ms
  String: 'mlv_lite built 2018-07-03 23:13:14 UTC; commit f4213dd on 2018-07-03 23:10:22 UTC by g3gg0: mlv_lite: do not write all metadata again on every single chunk '
Block: VERS
  Offset: 0x000004cc
  Number: 12
    Size: 164
    Time: 1038.454000 ms
  String: 'mlv_play built 2018-06-20 20:32:09 UTC; commit 0e38b89 on 2018-06-18 22:11:42 UTC by g3gg0: mlv_play: use less RAM, proper cleanup on error '
Block: VERS
  Offset: 0x00000570
  Number: 13
    Size: 160
    Time: 1223.783000 ms
  String: 'mlv_rec built 2018-07-22 13:10:25 UTC; commit c1e44b8 on 2018-07-21 21:31:09 UTC by g3gg0: mlv_dump: pass INFO blocks as image description '
Block: VERS
  Offset: 0x00000610
  Number: 14
    Size: 160
    Time: 1296.649000 ms
  String: 'pic_view built 2017-08-19 10:52:04 UTC; commit fca6399 on 2017-08-19 06:39:25 UTC by alex: pic_view: lossless DNG support (experimental) '
Block: VERS
  Offset: 0x000006b0
  Number: 15
    Size: 148
    Time: 1331.059000 ms
  String: 'silent built 2018-07-09 21:48:10 UTC; commit 3d26697 on 2018-06-30 16:48:59 UTC by alex: lossless.c: fix warning in comment '
Block: VIDF
  Offset: 0x00000800
  Number: 16
    Size: 13493760
    Time: 2310.348000 ms
   Frame: #0000
    Crop: 152x30
     Pan: 152x30
   Space: 32
    LJ92: Decompressing
    LJ92: 2048x3072x2 14 bpp (25165824 bytes buffer)
    LJ92: 22020096 -> 22020096  (100.00% ratio)

Thread 2 received signal SIGSEGV, Segmentation fault.
dng_unpack_image_bits (input_buffer=0x10a2d5000, output_buffer=0x10c000000, max_size=<optimized out>,
    bpp=14) at dng/dng.c:739
739         uint32_t uncorrected_data = *((uint32_t *)&packed_bits[bits_address]);


The faulting video (54MB): https://s3.sherlockphotography.org/posts/2018/M30-0516.MLV

The video is 4096x3072 recorded at 2.5 FPS on the 5D III.

If I build mlv_dump using "USE_X64=1", some of my videos will decode without crashing, but some still crash, including this one. Running under Valgrind, I get:

==17989== Invalid read of size 4
==17989==    at 0x10000FE1F: dng_init_data (dng.c:739)
==17989==    by 0x1000084C6: main (mlv_dump.c:3486)
==17989==  Address 0x10bc1003e is 22,020,094 bytes inside a block of size 22,020,096 alloc'd
==17989==    at 0x1007243E4: realloc (vg_replace_malloc.c:788)
==17989==    by 0x1000061F8: main (mlv_dump.c:2917)
==17989==
==17989== Invalid write of size 4
==17989==    at 0x100010313: dng_save (dng.c:772)
==17989==    by 0x10000932D: main (mlv_dump.c:3632)
==17989==  Address 0x10d11103e is 22,020,094 bytes inside a block of size 22,020,096 alloc'd
==17989==    at 0x100723A36: malloc (vg_replace_malloc.c:302)
==17989==    by 0x10000FD75: dng_init_data (dng.c:823)
==17989==    by 0x1000084C6: main (mlv_dump.c:3486)
==17989==


It looks like dng_pack_image_bits is writing 2 bytes beyond the end of its buffer, because it writes 4 bytes at a time and that write can begin 2 bytes before the end of the buffer. I've submitted a PR to fix that by adding 2 bytes of padding to the allocated buffer size:

https://bitbucket.org/hudson/magic-lantern/pull-requests/944/mlv_dump-fix-segfault-while-writing-dngs/diff

dng_unpack_image_bits has a problem with invalid reads too, but I'm not sure of the best way to fix that one.

EDIT: The culmination of this morning's shooting with crop_rec, thanks for the great software!:



#3
Odd. The nightly build (magiclantern-v2.3.NEXT..) zip is only used for the fonts/other data, not the Magic Lantern autoexec.bin itself, so pretty much any nightly should work. I'm not sure what I did differently to you, because it works for me™.
#4
So, I haven't seen any clear instructions for how people can try out the (unstable) development release yet (instead of the older Alpha 3), so here's my guide. Because it is an unstable development release, it could wreck your camera, so do this at your own risk. Please correct me if I get any of this wrong.

1. Start by updating your camera's firmware to the latest Canon version (1.1.3).

2. Because this isn't a final release, your camera needs a little modification made to it so that it can load Magic Lantern from the SD card. This is called turning on the camera's bootflag. When the bootflag is turned on, and a bootable SD card is inserted, the camera will load and run the file "autoexec.bin" from the SD card. Here, autoexec.bin will be the Magic Lantern software.

To turn on the bootflag, format your SD card in your camera, then copy this file to the root of your card:

http://a1ex.magiclantern.fm/bleeding-edge/5D3/5D3-113-bootflag.fir

Put it back into your camera, then run the firmware update option from the menus. The update will turn on your camera's bootflag.

3. Download the nightly Magic Lantern zip here. Unpack the zip file and copy just the "ML" folder to your SD card. Delete any .fir files that are on the SD card. You've now copied just the fonts and other data that ML needs to operate to your SD card.

4. Now you can copy a Magic Lantern development build (autoexec.bin) to the root of the SD card. Building this file is tricky, but NerveGas has kindly built a copy for us and posted it here. Unpack that zip file and copy the autoexec.bin to the root of your SD card.

5. You should now have an "ML" folder and an "autoexec.bin" file in the root of your SD card. That's the data/fonts and the actual Magic Lantern software. All that is left now is to set the "bootable" flag on the SD card, which tells the camera that it should look for and run the autoexec.bin file for us.

On Windows, you can use the EOSCard utility to do this:

http://pel.hu/eoscard/

Select your SD card, tick the EOS_DEVELOP and BOOTDISK options, install no FIR files, and Save.

On Linux / OSX, you can use the make_bootable.sh script instead. Plug in your SD card, then run the script from the terminal with sudo ./make_bootable.sh . Hopefully you know how to use the terminal.

6. Okay, so now you have the bootflag turned on in your camera (so it looks for bootable SD cards), you've marked your SD card as bootable, and you've copied the development Magic Lantern build "autoexec.bin" and the Magic Lantern data files "ML" to your SD card, you're ready to go! Turn off your camera, put the card in, and turn the camera back on. It should boot and run Magic Lantern.

Note: The nightly builds available on the main site do NOT support the 5D Mark III yet. You need to build autoexec.bin yourself or use the version provided by NerveGas instead (as these instructions already mentioned :)).