How to get cue markers in script/logging

Inner markers were set exactly to 0:00:00.000? Can you check in the XML clipboard data that you get when you copy the item and paste it into a text editor?

First declare a new TMixdownOptions variable:

var
  options: TMixdownOptions;

Then initialize it:

options := DefaultMixdownOptions;

Here’s the definition of TMixdownOptions:

TMixdownOptions = record
  SampleRate: integer;
  EncoderSettings: IFileEncoderSettings;
  IncludedRegions: TSetOfByte;
  CreateCueSheet: boolean;
  CueSheetItemTypes: TPlaylistItemTypes;
end;

So in order to enable cue sheet output, e.g. only for “Music” items, type:

options.CreateCueSheet := true;
options.CueSheetItemTypes := [pitMusic];

Output format, bitrate etc. can be changed through the EncoderSettings member:

options.EncoderSettings.SetAudioFormat(effMP3);
options.EncoderSettings.SetBitrate(192);

And then finally start the mixdown:

MixdownPlaylistWithOptions(playlist, 'C:\output.mp3', options);

(Assuming that playlist is the variable holding the IPlaylist with the items in them.)

1 Like

For the first it is 00:00:00.026, this marker was not included in the cue file nor is it in the logs. For the second it is 00:00:00.000 and it’s the same (missing in cue and logs). For the third it is also 00:00:00.000 but then suddenly no parent artist/title in the cue but the first marker instead, in the logs I get both the parent and the marker as it should be. Doesn’t really make sense right?

Thank you very much for explaining how the mixdown from script works!! :slight_smile: :+1: :+1:

Finally getting back to this :slight_smile:
When I try to execute this script, I get the error:
Error running script: [Error] (3:17): Unknown type ‘TMixdownOptions’
Could there be a typo? I searched for documentation of MixdownPlaylistWithOptions but can’t find anything anywhere… Thanks!

Exact mAirList version?

6.2.1 Build 4123
Thanks!

Your version might just be outdated :wink:

vs.

I see now our playout is still running from when we did the upgrade to 6.3, it just needs a restart :see_no_evil: However I don’t need the cue sheet for this one, it’s just to make an export of our regional news.

Database is already 6.3.23 build 4496 but it doesn’t work either… Throws this error:

Error running script: Runtime fout: (7,3) Null Pointer Exception

This is my script:

var
  regioPlaylist: IPlaylist;
  regioOptions: TMixdownOptions;

begin

  regioPlaylist.Insert(0, Database(0).CreatePlaylistItem('37466'));
  regioOptions := DefaultMixdownOptions;
  regioOptions.EncoderSettings.SetAudioFormat(effMP3);
  regioOptions.EncoderSettings.SetBitrate(192);
  MixdownPlaylistWithOptions(regioPlaylist, 'C:\Zoe FM\regio.mp3', regioOptions);

end.

You must initialize the regionPlaylist variable first:

regioPlaylist := Factory.CreatePlaylist;
1 Like

Thank you, it’s been almost 3 years since I last coded mls :see_no_evil:
Now it’s working fine but another problem pops up. What I’m mixing down is a news container, it seems that in the mix down (unlike in playout) it takes the original mixing points, while the length of all items in the container vary of course, so we have a few seconds of blank on some and the last piece is gone on others. Is there any command to recalculate this? When you look at the file in the cue point editor it’s the same result, but luckily on air it’s always perfectly fine…

Figured it out, I just had to put a checkmark on the containers to auto recue :wink:
Thanks for the help!