1

I appear to have successfully installed media9. My first attempt to use it (listed below) has led to an error, of course: in this case a complaint that 'car' is not a known option. Is it impossible to use spaces in the file name of the media? This would be a serious problem for me, since all my hundreds of file names have spaces in them - usually lots of spaces! (I added quotes to the file name, but that didn't help.)

\documentclass{article}
\usepackage{media9} 
\begin{document}
\includemedia[
   width=0.4\linewidth,
   height=0.3\linewidth,
   addresource="D:Audio/67/67A1_Snippets/67_321 fast, car, go here fast.mov",
   activate=onclick,
   deactivate=onclick,
   flashvars={source="D:Audio/67/67A1_Snippets/67_321 fast, car, go here fast.mov"},
  ]{}{VPlayer.swf}
/end{document}

P.S. All my media files are MOVs, but I believe they are MPEG-4 inside.

  • 5
    The simple fact is that filenames with spaces, commas and many other non-alphanumeric characters will often cause you problems. See What are the allowed characters in filenames? and \includegraphics: Dots in filename. You would likely be better normalizing your filenames to exclude these characters. – Alan Munn Jun 16 '15 at 15:07
  • Try with addresource={"D:Audio/67/67A1_Snippets/67_321 fast, car, go here fast.mov"}, – egreg Jun 16 '15 at 15:08
  • Did you try @egreg's suggestion? If it works it would constitute an answer, but I'm unsure. – Joseph Wright Jul 28 '15 at 6:06
  • I just tried the simplified version shown below. There were no errors, but the video didn't play. What I got instead was a blue screen with a message at the bottom saying "LOADING 0%" – Peyton Todd Jul 29 '15 at 15:06
  • The rules on this site don't enable me to press Enter without closing the comment, so I've not been able to insert code (and it will no longer enable me to edit the abortive version just above). Suffice it to say that a simplified version of the above code with @egreg's suggestion included built the PDF, but trying to play the video led either to the blue screen just described or to the message Unable to play '{"40 631.MP4"}', where 40 631.MP4 is the name of the video, depending on whether I went with VPlayer.swf or VPlayer9.swf. Just the bare video WITH THE SPACES (!) did play. Go figure... – Peyton Todd Jul 29 '15 at 15:19
1

The original question concerned a problem with spaces in filenames. This was apparently solved using egreg's suggestion:

addresource={"D:Audio/67/67A1_Snippets/67_321 fast, car, go here fast.mov"}

Later, it turned out that this was not the (only?) problem and that the commas in the filenames proved more troublesome. Willie Wong suggested that it might be possible to work around this by escaping the backslash, as well as the comma.

Finally, there was some suggestion, also, that omitting the full path and extension might be needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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