1 2 Previous Next 19 Replies Latest reply on Jan 7, 2011 3:24 PM by philmodjunk

    Need to play an embedded quicktime in a field

    shelleywenk

      Title

      Need to play an embedded quicktime in a field

      Post

      I'm creating a video story bank, and need to store and play quicktime files in my database. (Simply referencing files won't work for this particular situation.)

      I've imported the quicktime file as a file (not a quicktime) into a container field.

      Now I'm trying to use a script to export that file into a temporary folder and then insert that exported quicktime into another global container field so I can play the movie in that field.

      Here's the script I wrote:

      Insert File [HOPE Storybank::Photo or Video Clip]

      Set Variable [$myOutputFile; Value:"file:" & Get (TemporaryPath) & "movieTemp.mov"]

      Export Field Contents [HOPE Storybank::Photo or Video Clip; "$myOutputFile"]

      Set Variable [$myInputField; Value:"movie:" & Get (TemporaryPath) & "movieTemp.mov"]

      Go to Field [HOPE Storybank::MoviePlayer]

      Insert QuickTime ["$myInputField"]

      I'm getting this message:

      “movieTemp.mov” could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

      And then this error:

      The previous script step, “Insert QuickTime”, could not be completed because of an error. 

      (Which is Error 100 - File not found)

      I assume the error is because movieTemp.mov is not being created.

      What am I doing wrong?!

        • 1. Re: Need to play an embedded quicktime in a field
          Sorbsbuster

          The prefix 'file:' is used for relative paths.  Does it make any difference if you use 'filemac:' (or 'filewin:')?

          • 3. Re: Need to play an embedded quicktime in a field
            philmodjunk

            file: should work for this, its advantage here is that it's cross platfrom.

            Filemaker's error message doesn't really tell you much. Any error that keeps the file from being created will trigger this same error message.

            The expression you use is extremely similar to one I use in one of my systems for saving a PDF to the desktop. I don't see any obvious mistakes. Thus, you may need to check other possible issues that may keep the file from being created.

            Is there room in the volume that Get (TemporaryPath ) points to for the file you are exporting.

            Does the current user account permit creating a new file in this directory?

            Is there already a file there named MovieTemp.mov that can't be deleted by the current user? (Seems highly unlikely, but it would trigger this error message, I think.)

            • 4. Re: Need to play an embedded quicktime in a field
              shelleywenk

              I have plenty of room on my hard drive, so there should be enough room in the volume.

              However when I include the line:

              Show Custom Dialog ["in out"; GetAsText ( $myInputField & $myOutputField)]

              The dialogue box outputs:

              movie:/Macintosh HD/private/var/folders/LH/LHbupioUGkSHG--AKnHcZ++++TI/-Tmp-/S11/movieTemp.mov

              Which I think is $myInputField ($myOutputField should start with "file:" I think.)

              So maybe Filemaker is not letting me export because the $myInputField file that filemaker is finding is a file that already exists?

              When I began testing this script I did not get the message that "movieTemp.mov could not be created on this disk." So maybe there is a file that's not being erased as you suggest.

              But when I use the Finder to search for movieTemp.mov, no such file is found.

              • 5. Re: Need to play an embedded quicktime in a field
                philmodjunk

                From you script, it looks like $myOutputFile is empty. You might check for a typo in the variable name here.

                If you mis-type a variable name, Filemaker treats it as a brand new variable so this is one way you might not get a file path in this variable.

                • 6. Re: Need to play an embedded quicktime in a field
                  shelleywenk

                  I checked my variable names and I think they are correct.

                  The script I have now looks like this:

                  Insert File [HOPE Storybank::Photo or Video Clip]

                  Set Variable [$myOutputFile; Value:"file:" & Get (TemporaryPath) & "movieTemp.mov"]

                  Export Field Contents [HOPE Storybank::Photo or Video Clip; "$myOutputFile"]

                  Set Variable [$myInputField; Value:"movie:" & Get (TemporaryPath) & "movieTemp.mov"]

                  Go to Field [HOPE Storybank::MoviePlayer]

                  Insert QuickTime ["$myInputField"]

                  Show Custom Dialog ["out"; GetAsText ( $myOutputField)]

                  Show Custom Dialog ["in"; GetAsText ( $myInputField)]

                  Dialogue box for "out" is empty. (This is my export to temp folder function. So is nothing being exported?)

                  Dialogue box for "in" is always the same: movie:/Macintosh HD/private/var/folders/LH/LHbupioUGkSHG--AKnHcZ++++TI/-Tmp-/S11/movieTemp.mov 

                  If nothing is being created during the export, why is there a result returned for "in" ?

                  • 7. Re: Need to play an embedded quicktime in a field
                    shelleywenk

                    I see some errors that I'm going to correct (field / file.)

                    • 8. Re: Need to play an embedded quicktime in a field
                      Sorbsbuster

                      You have a typo here, surely?  One says $myOutputFile and the other (in the dialogue) says $myOutputField.  No?

                      • 9. Re: Need to play an embedded quicktime in a field
                        shelleywenk

                        I corrected the script so now it reads:

                        Insert File [HOPE Storybank::Photo or Video Clip]

                        Set Variable [$myOutputFile; Value:"file:" & Get (TemporaryPath) & "movieTemp.mov"]

                        Export Field Contents [HOPE Storybank::Photo or Video Clip; "$myOutputFile"]

                        Set Variable [$myInputFile; Value:"movie:" & Get (TemporaryPath) & "movieTemp.mov"]

                        Go to Field [HOPE Storybank::MoviePlayer]

                        Insert QuickTime ["$myInputFile"]

                        Show Custom Dialog ["Error"; Get (LastError)]

                        Show Custom Dialog ["out"; GetAsText ( $myOutputFile)]

                        Show Custom Dialog ["in"; GetAsText ( $myInputFile)]

                        The Photo or Video Clip field populates with the .mov file.

                        I'm still getting this message:

                        “movieTemp.mov” could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

                        And then this error:

                        The previous script step, “Insert QuickTime”, could not be completed because of an error. 

                        (Which is Error 100 - File not found)

                        For "out" the message returned is:

                        file:/Macintosh HD/private/var/folders/LH/LHbupioUGkSHG--AKnHcZ++++TI/-Tmp-/S11/movieTemp.mov

                        For "in" the message returned is:

                        movie:/Macintosh HD/private/var/folders/LH/LHbupioUGkSHG--AKnHcZ++++TI/-Tmp-/S11/movieTemp.mov

                        • 10. Re: Need to play an embedded quicktime in a field
                          philmodjunk

                          When you open the S11 folder, do you find a file named MovieTemp.mov?

                          Is it the file that should have been exported?

                          Is it the right file type?

                          • 11. Re: Need to play an embedded quicktime in a field
                            shelleywenk

                            Using the Finder to search, I don't get any results when searching for S11 or movieTemp.mov

                            • 12. Re: Need to play an embedded quicktime in a field
                              philmodjunk

                              From the results you've posted, the folder S11 does exist, maybe more than one if you have multiple user accounts.

                              Try following the path manually. Open Macintosh HD, then open private, then var and so forth until you find and open S11. I'm not a mac user so I don't know if these are folders that are hidden from easy access through this method or not.

                              • 13. Re: Need to play an embedded quicktime in a field
                                Sorbsbuster

                                To help debug, what about just temporarily hard-coding to save to and retrieve from a folder you create at root level on your HD, to remove some of the other possible sources of error?

                                • 14. Re: Need to play an embedded quicktime in a field
                                  philmodjunk

                                  Good idea or use Get (Desktop) to save to your desktop where you can check the actual results of this operation more easily.

                                  1 2 Previous Next