4 Replies Latest reply on Jan 23, 2009 5:24 PM by videojanitor

    Playing video or audio files from container fields



      Playing video or audio files from container fields




      I am attempting to do something which on the surface seems simple, but has me stumped. I have a database that I created in FM9 which contains information about video and audio files that I have in my archives. I would like to put a link to the file in each record, and I have been been able to sort-of do that with a container field, but I'll be darned if I can figure out how to PLAY the media from there.


      In the container field, I select "Insert File," then select the file and check the "store reference only," as I don't need the file inside the database. I then get an icon for the file, and the filename -- but I can't DO anything with it. Silly me, I thought if I just double-clicked it, it would open the associated application and play it.


      Am I making sense? Is there a way to do this? Any tips appreciated! 

        • 1. Re: Playing video or audio files from container fields

          Hi videojanitor and welcome to the forum


          Try Insert Quicktime instead of Insert File, this will then allow you to play movies or music as long as it is supported by Quicktime, not sure but if your using Windows you would need Quicktime installed.


          This will only store the file as a reference as far as I know and there is not option for this unlike the Insert File.


          I hope this helps.

          • 2. Re: Playing video or audio files from container fields

            Thanks Orlando! I had already tried inserting as Quicktime, and that works, as long as it is a file that Quicktime recognizes. It doesn't seem to play most of the MPEG-2 or H.264 HD files that I have though. I also wasn't sure if this was inserting a copy of the file, or just a reference, since as you said, there's no option there to make a choice.


            I guess I really don't understand the point of "insert file" into a container field. For instance, I tried that with a PDF file too, and while the file appears in the field, I can't OPEN it. Obviously, I must be expecting this to work in a way that it doesn't. 

            • 3. Re: Playing video or audio files from container fields

              If its not supported by Quicktime then you may be out of luck, unless there is some way of using the webviewer with Flash to do this but I have no idea.


              With the Insert File into the database I think on a PC it will open the PDF by double clicking it, but don't have a copy of FileMaker on a PC to double check this, however if you want to have the file opened you could use a script to export the file and then open it using the Send Event script step, something like this


              Set Variable [ $FilePath; Value:"file:" & Get ( DesktopPath) & TABLE::FileName ]  
              Export Field Content [ TABLE::ContainerField ; $FilePath ] 
              Send Event [ open document ; File Name: $FilePath ; [ Bring application to foreground ]  


              This will export the content of the container to the users desktop and then open the file in its appropriate application and bring that application to the front. 


              Do keep in mind that if your using the container for a large number of files it can make your database very large, so storing a reference would be the better solution.

              • 4. Re: Playing video or audio files from container fields
                   OK, thanks for the info. I think I was just misleading myself as to how the container fields work. I definitely don't want to enlarge the size of the database by including the actual files into it -- I'd end up with a database that was well over 1TB!