Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am seeing a weird behavior on exporting at least one type of file (here, a QuickTime movie) to files with long names. If I do this:

In[19]:= Export["Lorem-ipsum-dolor-sit-amet-consectetur-adipisicing-elit.dat", {42}]
Export["", {42}]

it hurts:

Out[19]= "Lorem-ipsum-dolor-sit-amet-consectetur-adipisicing-elit.dat"
Out[20]= ""
Out[21]= {"", \

The .dat file has the correct name and the .mov file hasn't, even though Export tries to make me think it has.

My questions are:

  • This is not on a MS-DOS box, but with Mathematica on Mac OS 10.7.3 (64-bit kernel). Can you comment if other versions/operating systems reproduce this issue?
  • Although I find nothing with Google, is this a known bug and is there a fix?
share|improve this question
A similar problem occurs exporting a QuickTime movie with a very long name using Apple Final Cut Pro, so it might be related to the creation of a temporary file that is then wrongly renamed. – VLC Apr 5 '12 at 13:14
I tried reproducing the issue on 8.0.4/Windows 7/x64, and couldn't, receiving this message: "Export::installreq: "QuickTime" format is supported only if "QuickTime Player" is installed." That suggests to me that @vucko is correct, and the problem is on Apple's side. – Pillsy Apr 5 '12 at 13:34
Same with me (Win7, 64bit, Mathematica 8.0.4): Export::erropts: The value Cinepak specified for the option VideoEncoding is invalid. >>, and there is no second file appearing at all. – István Zachar Apr 5 '12 at 13:41
With Mathematica on Linux, it complains Export::infer: Cannot infer format of file and also creates only the .dat. – celtschk Apr 5 '12 at 13:56
up vote 5 down vote accepted

The problem is not with Mathematica, but with the quicktime plugin/codec. The reason you see this error is that earlier versions of OSX (version 9 and below) had an upper limit of 31 characters for the filename (27, if you include the extension). Today's systems allow up to 255 characters, but the plugin still forces the filename to be backwards compatible. It is not related to a temporary file not being renamed.

Out[1]= 31

Final Cut Pro's manual tells you about this (but leaves the choice of truncating to the user):

Although current file systems such as HFS+ (used by Mac OS X) allow you to create filenames with a 255-character limit, you may want to limit your filename length if you intend to transfer your files to other operating systems. Earlier versions of the Mac OS allow only 31-character filenames, and if you want to include a file extension (such as .fcp, .mov, or .aif), you need to shorten your Mac OS 9-compatible filenames to 27 characters.

Couple of other examples where people have been bitten by this behavior. AFAIK, the workaround is to rename the file after exporting.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.