Author Topic: FREE FOR DOWNLOAD: AFX Script for mass converting MLraw DNG files to Video files  (Read 55786 times)

SteveScout

  • Freshman
  • **
  • Posts: 99
Hi, community!

After reading along for a long time I can finally contribute with some software as well - a After Effects script which should make the lifes easier for everyone who converts ML raw via AFX that was written for my needs of converting MLV files to 10bit Quicktime files from the talented programmers in my company.

It starts with the "Smart Import" functionality from the original AFX script which goes through folders and imports file sequences, but adds some new interesting features.

It automatically syncs audio WAV files which are in the folders from a MLV file! It even considers the offset which is in the MLV files at the moment (might change in the future, that´s why it´s not hardcoded).

You can set the footage framerate for all the shots you want to import, you can set width and height of the comps (as you might´ve shot vertically cropped but need full-HD to transcode to ProRes or DNxHD), you can add several output modules for transcoding and set a folder for all the files. All you have to do is click OKAY for every ACR window that pops up and in the end you have to hit RENDER in the render queue - that´s it!
I use it together with CineLOG (http://www.magiclantern.fm/forum/index.php?topic=10151.0) to create flat LOG DNxHD 10bit quicktime files for further editing and grading.

Download it here:
www.alexandsteffen.com/smartimport2.zip

Just place the JSX file in your AFX/Scripts directory, go on FILE / SCRIPTS and execute it!

Happy encoding!

Steffen

5DanielMIII

  • New to the forum
  • *
  • Posts: 47
  • -I love JESUS and MagicLantern-
Hi @SteveScout

This "script-world" is all new to me, but thanks for sharing!
I´ll kindly ask you, how to use this? Please!  :)
I got the text-file and placed into the AE script folder, I can start the script and it imports whatever I have in that folder I select.

But..
Can I also set it to make comps?
Size of comps?
Framerate?
Include/add the cinelog?

So after all this, I can do whatever changes I want and render?

If possible, that is amazing!
If no, I still save time when importing so thanks again!  :)


Regards,
Daniel
I am thankful that Jesus and MagicLantern exist, because they both change lives!

pobox

  • New to the forum
  • *
  • Posts: 22
Hi Steffen,

thanks for the script! this makes the workflow really easy!
it works perpect.

What about the audio offset? Is there a different offset regarding which camera one uses?

SteveScout

  • Freshman
  • **
  • Posts: 99
Hi, 5DDaniel!

Yes, absolutely, it does everything you´re asking for.

"Generate Compositions" is ticked automatically, so it will create a comp for every item you import. AND add it to the render queue with the output module(s) you selected on the bottom.
And you can set (comp AND footage) framerate, sizes and even any transform options (scaling etc.) for all image sequences within the comps. All pretty self-explanatory once you go through all selectable fields.
The Cinelog dialogue has nothing to do with that script, it is embedded in the ACR dialogue, if you set Cinelog as standard (explained in their well written doc file) then every DNG sequence automatically opens in CINELOG and you can basically hit okay for every shot and then check the comps later all after each other and make changes if necessary.

@pobox:
The audio offset is a value I came up with after testing MLV with sound on my 5DMK3. It might definitely be different for camera models or even for future builds, but I don´t have another camera to try. This is why I´d suggest you do a quick test with your camera (a clap with the hands), figure out the frame offset in AFX or an editing program and then edit the offset value in the script file.
To do this just open the script in Wordpad, search for "-0.08" and replace it with your new value, done in less than a minute! ;)

Happy batch encoding!

timbytheriver

  • Member
  • ***
  • Posts: 243
@SteveScout

Thank-you for your time and effort – this is going to be very useful!

However, I get an error pop-up when I try to 'Run' the render:

'TypeError: null is not an object'

…and I get no further. Any help gladly received.

PS I'm on Mac 10.7.5 Adobe CC 2014 AE




5D3 1.1.3
5D2 2.1.2

5DanielMIII

  • New to the forum
  • *
  • Posts: 47
  • -I love JESUS and MagicLantern-
Hi, 5DDaniel!

Yes, absolutely, it does everything you´re asking for.

"Generate Compositions" is ticked automatically, so it will create a comp for every item you import. AND add it to the render queue with the output module(s) you selected on the bottom.
And you can set (comp AND footage) framerate, sizes and even any transform options (scaling etc.) for all image sequences within the comps. All pretty self-explanatory once you go through all selectable fields.
The Cinelog dialogue has nothing to do with that script, it is embedded in the ACR dialogue, if you set Cinelog as standard (explained in their well written doc file) then every DNG sequence automatically opens in CINELOG and you can basically hit okay for every shot and then check the comps later all after each other and make changes if necessary.


Happy batch encoding!

Hi @SteveScout ,

I got it working  :)
Can I save a preset of my setup?
So when I run the script, some info is already filled in?
Because I always shoot in 25p 1920x1080


Regards,
Daniel
I am thankful that Jesus and MagicLantern exist, because they both change lives!

jimmyD30

  • Senior
  • ****
  • Posts: 386
@SteveScout

Nice! Will it work with VisionLog?

SteveScout

  • Freshman
  • **
  • Posts: 99
Yes, it´s working flawlessly with VisionLog, as VisionLog works "under the hood" in ACR and delivers you the flat "visionlogged" video sequence right in AFX, so the script just batches these, no matter what curve/settings you use in ACR.

@timbytheriver: Do you have any other files in the directory (besides WAV files) and ALL its subdirectories? Like a folder-preview-jpeg? Those can cause such an error. If there are only DNG file sequences and maybe a WAV it should be fine .. are all file names okay? No special characters?

@5DDaniel: Yes, you can easily create your own template version. For example, search for "framerate: undefined" in the script, it´s towards the end where the audioOffset is also defined. Here you can pre-set all your variables, "undefined" means the field is empty, but if you set it to a hardcoded value right here (just change "undefined" to your desired value) you have created your own template which you can still change on runtime if you need to.

pc_bel

  • Member
  • ***
  • Posts: 132
Hi SteveScout,

Thanks so much for such tool!!!!!... It's a big big help. How I would like to know programming to do things like this...

I need your help.

I'm stuck at this point. When I run the script a message like this appears to me:

"Unable to execute script at line 1299. Undefined is not an object"

AE imports dng and audio to the project, but does not create timelines or render cue. If I uncheck the box "import audio files", do not appear message but then only import dng's and still doesn't create timelines or render cues. In the folder there are only dng's and a wav file. No special characters...

What I'm doing wrong?

Thank you very much.

timbytheriver

  • Member
  • ***
  • Posts: 243

@timbytheriver: Do you have any other files in the directory (besides WAV files) and ALL its subdirectories? Like a folder-preview-jpeg? Those can cause such an error. If there are only DNG file sequences and maybe a WAV it should be fine .. are all file names okay? No special characters?

Thanks @SteveScout; checked all those things! (also: taken WAV out, renamed files without any spaces etc., checked file permissions, imported DNGs normally without the script …) still same warning!

Any other ideas? :-\

Many thanks.
5D3 1.1.3
5D2 2.1.2

SteveScout

  • Freshman
  • **
  • Posts: 99
Hm .. sometimes I have the script not creating the comps automatically and don´t know why yet, but THIS problem occuring so persistent is new to me.

Three more ideas to check:
- Which language version of AFX are you running? Something other than English?
- In EDIT / PREFERENCES / GENERAL, is "Allow Scripts to Write Files And Access Network" ticked on?
- Do you have full user rights on the folder you´re reading from AND outputting to?

Steffen

timbytheriver

  • Member
  • ***
  • Posts: 243
Hi Steffen

Thanks, but still no luck. :(

– English language AE
– Checked!
– Full Read & Write for (me)

Will keep an eye out for a fix, because this could be so useful.

Tim
5D3 1.1.3
5D2 2.1.2

SteveScout

  • Freshman
  • **
  • Posts: 99
Did you also test it with another directory structure with other DNGs? Can you test the SAME files/dir structure on another AFX computer? Can you send a list of the files? in a DOS BOX, enter  DIR *.* /S >filenames.txt    which creates a textfile with the filestructure and the filenames, maybe I can find something.

timbytheriver

  • Member
  • ***
  • Posts: 243
@SteveScout

I have it working now! Thanks for your suggestions. :)

It looks like maybe the script is choosy about what cdngs it gets offered! These sets both worked:

mlv to 16b or 12b cdngs from Raw Magic 1.1.2 by Thomas Worth
mlv to 16b cdngs from MLV Raw Viewer by Andrew Baldwin

These sets generated my original error (and were the first I tested):

mlv to 16b cdngs from Raw Magic 1.1.1

Thanks again for sharing your script and your help.

Tim
5D3 1.1.3
5D2 2.1.2

SteveScout

  • Freshman
  • **
  • Posts: 99
Whew .. crazy .. the script can´t really care about the content of the files BUUT - is the naming of the files much different? This could explain it! But very cool it works for you now!!

pobox

  • New to the forum
  • *
  • Posts: 22
@pobox:
The audio offset is a value I came up with after testing MLV with sound on my 5DMK3. It might definitely be different for camera models or even for future builds, but I don´t have another camera to try. This is why I´d suggest you do a quick test with your camera (a clap with the hands), figure out the frame offset in AFX or an editing program and then edit the offset value in the script file.
To do this just open the script in Wordpad, search for "-0.08" and replace it with your new value, done in less than a minute! ;)

Happy batch encoding!

Did you measure the audio offset for the 5d3 with diffrent builds?
The offset can also be produced by your computer monitor as they al have a difrent delay. I will record a timecode signal to the audio track while filming the slate to compare it in avid next week. In avid you can read timecode from the aux audio track, then I know for sure if there is an offset.

dpjpandone

  • Senior
  • ****
  • Posts: 284
This such an awesome script. Thanks so much!!

SteveScout

  • Freshman
  • **
  • Posts: 99
@pobox: You are right, of course a sound system etc. can have a delay. That´s why you have to measure this on the timeline - clap a slate and compare visual and audio track, that´s it. I compared several builds for 1.1.3, not tested the new firmware update and its builds yet. If you are using this feature you can quickly clap a slate or something similar and figure out the offset for your camera and your build, takes five minutes. And AVID-timecode-whatever-approach definitely works as well, but the oldschool-way I used can be done with any editing software that shows a waveform and a video image together.


Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5493
Hi Stevescout and thanks for this effort. I,m trying to get this script to work on my macbook pro 13 inch mavericks 10.3 I,m on AFX CS6. Don,t know if I do this right but I,m getting the null is not an object message. I,ll provide som pictures, maybe anyone can see whats is going on.














5DanielMIII

  • New to the forum
  • *
  • Posts: 47
  • -I love JESUS and MagicLantern-
Hi Stevescout and thanks for this effort. I,m trying to get this script to work on my macbook pro 13 inch mavericks 10.3 I,m on AFX CS6. Don,t know if I do this right but I,m getting the null is not an object message. I,ll provide som pictures, maybe anyone can see whats is going on.







I had this script working for a few days and all of a sudden it stopped. I get the same message as you.
Maybe it has something to do with the newer builds? Because as I said it did work a few  days back, and I used Mirawviewer then too for converting mlv files.
I have not tried to use an older build to see if this is the actual case.

I did try to download the script again, to "reset it" just in case I messed up some settings..but still the same problem.
Anyone got a clue?

Regards,
Daniel
I am thankful that Jesus and MagicLantern exist, because they both change lives!

SteveScout

  • Freshman
  • **
  • Posts: 99
Hm .. could this be the CC2014 release they were rolling out? Haven´t used mine since I updated, I´ll test it later today to see if it still works on my CC 2014 version.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5493
I,m still on after effects cs6 though :)

pobox

  • New to the forum
  • *
  • Posts: 22
I had this script working for a few days and all of a sudden it stopped. I get the same message as you.
Maybe it has something to do with the newer builds? Because as I said it did work a few  days back, and I used Mirawviewer then too for converting mlv files.
I have not tried to use an older build to see if this is the actual case.

I did try to download the script again, to "reset it" just in case I messed up some settings..but still the same problem.
Anyone got a clue?

Regards,
Daniel

You didn't select either stills or audio files

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5493
It doesn, t matter if I fill video or audio. Tried. Still get the error.
Thanks

SteveScout

  • Freshman
  • **
  • Posts: 99
Looking into this with my programmer over here. Hopfully we have an updated fixed version of the script beginning of next week!