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

Toffifee

  • Member
  • ***
  • Posts: 104
  • 5D Mark III Happy tester
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1025 on: December 27, 2013, 04:56:12 PM »
Sound recording! Yes!

I tested 30 seconds with 48k + 23,976fps + 1920x1080p, perfect sync so far   :D

It was quite a struggle getting the .mlv files to work on a mac, but thanks to Danne's post I got it working.

Does anybody have a program or developing such as rawmagic with support for mlv?

kgv5

  • Hero Member
  • *****
  • Posts: 643
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1026 on: December 27, 2013, 05:19:00 PM »
The newest MLV browser has ability to unpack mlv to dng with wav or raw with wav. Right click on the file icon.
www.pilotmovies.pl   5D Mark III, 6D, 550D

Toffifee

  • Member
  • ***
  • Posts: 104
  • 5D Mark III Happy tester
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1027 on: December 27, 2013, 05:49:26 PM »
Where can I download the mlv browser? Can't seem to find it.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6861
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1028 on: December 27, 2013, 06:00:50 PM »
See reply 101-111
http://www.magiclantern.fm/forum/index.php?topic=8447.100
It,s a work in progress. g3gg0 hasn,t implemented audio export on mac yet I think.

Another work in progress is this fine viewer
http://www.magiclantern.fm/forum/index.php?topic=9560.msg91651;topicseen#msg91651

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1664
  • 6d - Nightly build user
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1029 on: December 27, 2013, 08:11:11 PM »
I had the same problem. Newest build resolves this, just make sure sound recording is set to 48khz in the sound menu. This should help. Cheers

Thanks will check the newest build.

I see at the bottom of your posts that you also have 6d, do you use the new sound module and new MLV-rec  module with it, or did you only test it on 5d mark 3?

kgv5

  • Hero Member
  • *****
  • Posts: 643
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1030 on: December 27, 2013, 08:55:20 PM »
Thanks will check the newest build.

I see at the bottom of your posts that you also have 6d, do you use the new sound module and new MLV-rec  module with it, or did you only test it on 5d mark 3?

No, currently tested only on 5d3.
www.pilotmovies.pl   5D Mark III, 6D, 550D

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1031 on: December 28, 2013, 01:02:55 AM »
Tested longer clips on 5D3.

1920x1080 at 29.97 fps
Preview: Hacked
Memory Hack: ON
Extra Hack: ON
Buffer: 4:3
Card Spanning: ON
Global Draw ON but nothing selected ( I use this to get proper framing without much speed lost)

Recorded for 3 min and audio was in synch.  about 20,7 GB  Recording stopped automatically on frame skip

Tried the same on cropped video.

Once recorded for 4 min and the audio was OK untill 2 min 10 sec.  After which point the audio skipped ahead, it seems that the ordering of the frames was lost.
Same thing happened on second recording for 3.5 minutes.  The audio skipped ahead at 1 min 50 sec.
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

Eran

  • New to the forum
  • *
  • Posts: 10
  • 50D, 5DM3
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1032 on: December 28, 2013, 02:58:05 AM »
The Sound recording is amazing!

Davinci Resolve have no problem to recognize 48khz, thanks g3gg0 !
My workflow: MLVBrowseSharp ---  raw2cdng.1.4.8 --- dropping each WAV into his DNG's file  --- premiere pro cc  ----  davinci resolve 10 lite.

But when I am exporting the final timeline as XML from premiere pro cc to davinci resolve 10, I'm not getting any signal on the sound tracks (I do get all the tracks though but mute). Anyone have same experience?

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1033 on: December 28, 2013, 03:03:50 AM »
More details of sound skipping during cropped video:

I counted the seconds on the recording information and then listened to hear how the numbers are scrambled:

From beginning to second 92 is OK, then it starts counting on second 152 until 211, then it skips to 231 and continues counting until the 240 (end of recording), then it picks ups from 93 till 151, then it picks from 132 until 151.

1....92
152...211
231....240
93...151

So yes definitely the audio frames are being mixed up in cropped recording.
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

andy kh

  • Hero Member
  • *****
  • Posts: 530
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1034 on: December 28, 2013, 07:37:59 AM »
The Sound recording is amazing!

Davinci Resolve have no problem to recognize 48khz, thanks g3gg0 !
My workflow: MLVBrowseSharp ---  raw2cdng.1.4.8 --- dropping each WAV into his DNG's file  --- premiere pro cc  ----  davinci resolve 10 lite.

But when I am exporting the final timeline as XML from premiere pro cc to davinci resolve 10, I'm not getting any signal on the sound tracks (I do get all the tracks though but mute). Anyone have same experience?

everything works fine for me in resolve 10. make sure u dont mute ur sound track in premiere pro n resolve
5D Mark III - 70D

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3157
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1035 on: December 28, 2013, 10:55:45 AM »
So yes definitely the audio frames are being mixed up in cropped recording.

can you create an index before dumping?
(run mlv_dump with -x first)
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!

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1036 on: December 28, 2013, 01:51:24 PM »
can you create an index before dumping?
(run mlv_dump with -x first)

Yes it creates, with MLVSharpBrowser it gives the same results.

With mlv_dump I get the following results:

Code: [Select]
F:\0-Videos\14-test\sound\cropped>mlv_dump -x M27

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

[i] Mode of operation:
   - Input MLV file: 'M27-1927.MLV'
   - Verify file structure
   - Output .idx file for faster processing
[i] File M27-1927.MLV opened
[i] File M27-1927.M00 opened
[i] File M27-1927.M01 opened
[i] File M27-1927.M02 opened
[i] File M27-1927.M03 opened
[i] File M27-1927.M04 opened
[i] File M27-1927.M05 opened
[i] Processing...
[i] Reached end of chunk 0/7 after 2422 blocks
[i] Reached end of chunk 1/7 after 3167 blocks
[i] Reached end of chunk 2/7 after 2393 blocks
[i] Reached end of chunk 3/7 after 2490 blocks
[i] Reached end of chunk 4/7 after 2484 blocks
[i] Reached end of chunk 5/7 after 2389 blocks
[i] Reached end of chunk 6/7 after 788 blocks
[i] Processed 7215 video frames
[i] XREF table contains 16133 entries
[i] File M27-1927.IDX opened for writing
[i] Done


F:\0-Videos\14-test\sound\cropped>mlv_dump --dng

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

[i] Mode of operation:
   - Input MLV file: 'M27-1927.MLV'
   - Convert to DNG frames
   - Output into 'M27-1927_frame_'
[i] File M27-1927.MLV opened
[i] File M27-1927.M00 opened
[i] File M27-1927.M01 opened
[i] File M27-1927.M02 opened
[i] File M27-1927.M03 opened
[i] File M27-1927.M04 opened
[i] File M27-1927.M05 opened
[i] File M27-1927.IDX opened (XREF)
[i] XREF table contains 16133 entries
[i] Processing...
Error: GUID within the file chunks mismatch!
[i] Processed 0 video frames
[i] Done
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

dubzeebass

  • Senior
  • ****
  • Posts: 360
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1037 on: December 28, 2013, 02:35:15 PM »
What's the point in building the index first?

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3157
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1038 on: December 28, 2013, 02:50:39 PM »
all blocks are save in some random order, depending on the current buffer usage.
the recoding module picks the largest block to write so you get maximum write rate.

when saving .raw or single .dng with mlv_dump, it doesnt matter in which order they are written.
but the .wav must (currently) be written in the correct order.
for parsing the blocks in the correct order, you need an index file that can be created using the -x option.
all subsequent mlv_dump executions will use the index for correct processing (in terms of time order)
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!

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1039 on: December 28, 2013, 03:26:36 PM »
In case you did not see it, I get the following error:

Error: GUID within the file chunks mismatch!

First I did the mlv_dump -x
Then I used mlv_dump --dng

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

NedB

  • Freshman
  • **
  • Posts: 85
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1040 on: December 28, 2013, 03:31:23 PM »
@g3gg0: During one of my first recordings with mlv_snd, my 550D camera locked up (got a "busy" text, sorry I don't remember the exact wording) and apparently the sound file didn't get written properly: I get a "Received AUDF without WAVI, the .wav file might be corrupt" message after all the .dng's are (correctly, it seems) extracted.

Despite this, the .dng's look fine and the length of the resulting .wav file is roughly what one would expect for a 40 second (at 25fps) clip. Of course, it is corrupt, as its metadata indicates "MPEG AAC Audio at 7350 Hz, 28kb/s" instead of the correct "PCM S16 LE Stereo 44100 Hz, 16bps (from VLC player)" as on my other clips.

Question: is it possible to rescue this .wav clip by inserting a WAVI block into the .mlv file, or by hex-editing the .wav itself to correct the header? [Update: SOLVED! See two posts down]
In any case, thanks again for raw with sound, it's a quantum leap in usability and enjoyment! Cheers.
550D - Kit Lens | EF 50mm f/1.8 | Zacuto Z-Finder Pro 2.5x | SanDisk ExtremePro 95mb/s | Tascam DR-100MkII

NedB

  • Freshman
  • **
  • Posts: 85
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1041 on: December 28, 2013, 03:39:45 PM »
To all ML users trying out raw with sound: I was shooting a scene with my 550D, using mlv_raw and mlv_snd. One of the clips turned out to have an ugly greenish-black tint over all the .dng's, even though I didn't consciously change any settings between the various clips of the same scene. After I tried and failed to correct this in ACR (Photoshop/After Effects), I thought of using a more scientific method. Using Phil Harvey's exiftool (Google it), I compared the metadata of a .dng from a "good" clip to the metadata of one of these "green-black" .dng's. The only difference I noticed was in the data tagged "Exif:BlackLevel", which had a value of 2046 in the "good" .dng but 2509 in the "bad" clip.

I used exiftoolGUI (Google it) to change the value of "Exif:BlackLevel" on all the "bad" .dng's to 2046, and the problem was solved: the .dng's now looked exactly like ones from the other clips I shot of this scene.

Again, I don't know whether or not I did something to cause this error, or whether it will just crop up from time to time. But if you have this symptom (.dng's with a crushed-black/greenish tint), give it a try. Cheers!
550D - Kit Lens | EF 50mm f/1.8 | Zacuto Z-Finder Pro 2.5x | SanDisk ExtremePro 95mb/s | Tascam DR-100MkII

NedB

  • Freshman
  • **
  • Posts: 85
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1042 on: December 28, 2013, 07:10:48 PM »
@g3gg0 (again): Again the principle of "if you formulate a question clearly enough, you almost have your answer" applies. Pasted the header (Addresses 00000000 - 0000002B) of one of the "good" audio files over the same addresses in the "bad" audio file and it worked. FYI for anyone with a similar problem (shooting with mlv_rec and mlv_snd and you have a crash or skipped frames, resulting in an error message about a possible corrupt .wav file). Cheers and I hope TLDR didn't apply too much...
550D - Kit Lens | EF 50mm f/1.8 | Zacuto Z-Finder Pro 2.5x | SanDisk ExtremePro 95mb/s | Tascam DR-100MkII

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3157
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1043 on: December 28, 2013, 10:53:03 PM »
the latest binaries should not need mlv_dump -x anymore.
(although it should work. can you check if you still get such GUID error?)
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!

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6861
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1044 on: December 29, 2013, 02:35:59 AM »
Updated batchscript command for mac-users(30dec 2013) Thanks to dubzeebass, g3gg0, daisermac, jerrykil

Ok.
I modified a command script from a member here,  jerrykil, and put in your script-instruction dubzeebass and g3gg0. So if doubleclicking the commandscript from within the folder with the mlv,s it starts the conversion without having to go through terminal.

Instruction would be:

1. Download mlv_dump.osx http://upload.g3gg0.de/pub_files/c02de9a0b17fc909b5494ddbd0fd249e/mlv_rec.zip
2. Open a Terminal
3. Go to the folder where you downloaded mlv_dump.osx (extract if needed) and type: sudo mv ./mlv_dump.osx /usr/bin/mlv_dump
4. Type sudo chmod +x /usr/bin/mlv_dump
5. Run the recursive.command file below from the same folder as the .mlv files. Need admin rights. Go to command script through terminal and write chmod +rxw recursive.command0.2 press enter
6. run the recursive.command by doubleclicking

You can doubleclick the recursive.command0.2 script a couple of times to have them work in parallell.

commandscript https://drive.google.com/file/d/0B4tCJMlOYfirWDd2RldZVXdjck0/edit?usp=sharing

Thanks
/D

*updated recursive.command 29 dec (g3gg0)
*updated recursive.command0.2 30 dec (daisermac moving spanned files to folder)

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1045 on: December 29, 2013, 04:32:00 AM »
the latest binaries should not need mlv_dump -x anymore.
(although it should work. can you check if you still get such GUID error?)

Compiled new build for 5D3, and downloaded new MLVBrowser

I recorded 4 minutes 4 seconds of CROPPED video 1920x1080 at 29,97 fps = 24.5 GB  I stopped the recording.

The audio file is now in correct order, I counted all the way up and never missed any numbers during playback.

To aligned the video I had to shrink the audio file form 4:02,24  to 4:01,08 which is 0.48% 
In other words, I had to shrink the audio file by 1.16 seconds.  Everything was properly aligned at this point.
To check for alignment I hit a little crystal bottle every ten seconds and record the strike, once the file was shrunk the strike matched perfectly on every hit.

Congratulations, you definitely got the wav frame order correct!

Tomorrow I will check 50 and 60 fps.
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

daisermac

  • New to the forum
  • *
  • Posts: 9
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1046 on: December 29, 2013, 01:42:13 PM »
Updated batchscript command for mac-users

Ok.
I modified a command script from a member here,  jerrykil, and put in your script-instruction dubzeebass and g3gg0. So if doubleclicking the commandscript from within the folder with the mlv,s it starts the conversion without having to go through terminal.

Instruction would be:

1. Download mlv_dump.osx http://upload.g3gg0.de/pub_files/c02de9a0b17fc909b5494ddbd0fd249e/mlv_rec.zip
2. Open a Terminal
3. Go to the folder where you downloaded mlv_dump.osx (extract if needed) and type: sudo mv ./mlv_dump.osx /usr/bin/mlv_dump
4. Type sudo chmod +x /usr/bin/mlv_dump
5. Run the recursive.command file below from the same folder as the .mlv files. Need admin rights. Go to command script through terminal and write chmod +rxw recursive.command press enter
6. run the recursive.command by doubleclicking

You can doubleclick the recursive.command script a couple of times to have them work in parallell.

commandscript https://drive.google.com/file/d/0B4tCJMlOYfird0U5dTNnR0twNE0/edit?usp=sharing

Thanks
/D

*updated recursive.command 29 dec (g3gg0)

Thanks Danne for your script.

I think it needs one modification in order to handle split mlv-files - the move command should be:

mv ./"$BASE".M* ./$BASE

This way not only the first .MLV gets moved but also .M00 and .M01 etc.

Arturo Sánchez

  • New to the forum
  • *
  • Posts: 3
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1047 on: December 29, 2013, 02:58:05 PM »
Dual ISO and 3X crop mode supported? And both together?
And what about 48-60fps ?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6861
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1048 on: December 29, 2013, 03:48:12 PM »
Thanks Danne for your script.

I think it needs one modification in order to handle split mlv-files - the move command should be:

mv ./"$BASE".M* ./$BASE

This way not only the first .MLV gets moved but also .M00 and .M01 etc.


Thanks. Updated the scriptinstruction, reply #1044, and put in your code. Please test it, havn,t got any spanned .mlv files at the moment.
D

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Magic Lantern (RAW) Video format v2.0 (mlv_rec.mo)
« Reply #1049 on: December 29, 2013, 03:53:30 PM »
Reporting 5D3 testing with 50fps and 60fps, card spanning on.
Sound file needed to be moved 4 frames forward and bingo it is synchronized both for 50 and 60 fps

Only outstanding issue is Color Temperature and Tint for dngs.  They have green cast corrected on ACR: when ACR opens the dng it reads colortemperature 2000 and tint -150.  This is WB error. To correct set WB to 5000 and tint 0
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