10 Replies Latest reply on Dec 5, 2014 3:45 PM by elifra2005

    can I choose the software to open a .mov file?

    elifra2005

      Hello,

       

      I am looking for an answer to this question.

      I have a project with a mov inside. I want the .mov to be opened in windows with vlc or windowsmediaplayer and in macintosh with QuickTime Player.

      Which lingo code should I write to ask my operative system  to open the .mov either with windows media player or quick time player?

       

      for istance

       

      if my operative system is windows

       

      open "test.mov" with windows media player

       

      if my operative system is mac

       

      open"test,mov" with quick time player

       

      end

       

       

       

      Is there a function in buddy api that can do it?

       

      thank you very much.

       

      Elisabetta

        • 1. Re: can I choose the software to open a .mov file?
          Sean_Wilson Adobe Community Professional

          Why are you opening a QuickTime movie in an external application and not displaying it on Director's stage? Why are you using QuickTime when there are far better options for video playback, like H.264 compressed MP4?

          • 2. Re: can I choose the software to open a .mov file?
            elifra2005 Level 1

            Hello,

             

            I don't open file externally, but I need a software that read the file in the Director stage. Why do you think mp4 is better?

             

            If quick time isn't installed on a computer my project doesn't work. But I need to be independent from quick time. that's way I am looking for a solution.

             

            In my project I have a mov video controlled by several buttons (play stop rewind...). I would like to make it watched by all the users (PC or Mac).

             

            thank you very much

             

            Elisabetta

            • 3. Re: can I choose the software to open a .mov file?
              Sean_Wilson Adobe Community Professional

              I was suggesting you use MP4 specifically so that you don't have to depend on QuickTime being installed. Here is a link to a video player. However, if you encode/transcode your video to MP4, using the H.264 codec, then you should be able to import it into Director as MP4Media. Search the Help file/s for "MP4Media"

              • 4. Re: can I choose the software to open a .mov file?
                elifra2005 Level 1

                Yes it is a good solution. I ve tried the project on several devices and it has worked better.

                I have lost to function changing the codec:

                 

                quicktime slider ( itwas important to navigate into the video)

                the backward playrate.

                 

                 

                Do you think I can work out with these two problems?

                 

                Thank you

                • 5. Re: can I choose the software to open a .mov file?
                  Sean_Wilson Adobe Community Professional

                  The slider is relatively easy. Once you have a slider, its position (locH) relative to its min and max points is determined by the fraction of the video's duration that has played. I haven't experimented with negative playrate so perhaps you could trial this.

                  • 6. Re: can I choose the software to open a .mov file?
                    elifra2005 Level 1

                    May you explain me better. I haven't understand what i have to do.

                     

                    thanks  again.

                     

                    Elisabetta

                    • 7. Re: Re: can I choose the software to open a .mov file?
                      Sean_Wilson Adobe Community Professional

                      You mean you need help regarding creating a slider, or with trialling reverse playback? Assuming it's the slider, try the following attached to the sprite you want to use as the slider knob:

                      property spriteNum
                      property my
                      property myVideoObject
                      property myMinH, myMaxH, mySliderWidth
                      
                      on beginSprite me
                        my = sprite(spriteNum)
                        _dragging = 0
                        myVideoObject = _movie.sendAllSprites(#mGetVideoObject, me)
                        if ilk(myVideoObject, #object) then me.mInitBounds()
                      end
                      
                      on endSprite me
                        myVideoObject = VOID
                      end
                      
                      on mGetSliderObject me, aVideoObject
                        myVideoObject = aVideoObject
                        if ilk(myVideoObject, #object) then me.mInitBounds()
                        return me
                      end
                      
                      on mInitBounds me
                        tRect = call(#mGetRect, myVideoObject)
                        myMinH = tRect[1] + my.member.regPoint[1]
                        myMaxH = tRect[3] - (my.width - my.member.regPoint[1])
                        mySliderWidth = myMaxH - myMinH
                      end
                      
                      on mouseDown me
                        --  call(#mSetStatus, myVideoObject, #pause)
                        _movie.actorList.append(me)
                      end
                      
                      on mouseUp me
                        --  call(#mSetStatus, myVideoObject, #play)
                        _movie.actorList.deleteOne(me)
                      end
                      
                      on mouseUpOutside me
                        me.mouseUp()
                      end
                      
                      on stepFrame me
                        my.locH = max(min(myMaxH, _mouse.mouseH), myMinH)
                        call(#mSetCurrentTime, myVideoObject, (1.0 * (my.locH - myMinH))/mySliderWidth)
                      end
                      
                      on mSetSliderPosition me, aFraction
                        --  put "mSetSliderPosition", my.locH, myMinH + integer(aFraction * mySliderWidth)
                        my.locH = myMinH + integer(aFraction * mySliderWidth)
                      end
                      

                       

                       

                      and this attached to the video sprite:

                      property spriteNum
                      property my
                      property myCurrentTime
                      property mySliderObject
                      
                      on beginSprite me
                        my = sprite(spriteNum)
                        myCurrentTime = 0
                        mySliderObject = _movie.sendAllSprites(#mGetSliderObject, me)
                      end
                      
                      on endSprite me
                        mySliderObject = VOID
                      end
                      
                      on mGetVideoObject me, aSliderObject
                        mySliderObject = aSliderObject
                        return me
                      end
                      
                      on mGetRect me
                        return my.rect
                      end
                      
                      on mSetCurrentTime me, aFraction
                        tTime = integer(my.duration * aFraction)
                        --  put "mSetCurrentTime", my.currentTime, tTime
                        my.seek(tTime)
                      end
                      
                      on mSetStatus me, aState
                        case aState of
                          #play:  my.play()
                          #pause: my.pause()
                        end case
                      end
                      
                      on exitFrame me
                        if my.mediaStatus = #playing then
                          if myCurrentTime <> my.currentTime  then
                            myCurrentTime = my.currentTime
                            call(#mSetSliderPosition, mySliderObject, myCurrentTime * 1.0/my.duration)
                          end if
                        end if
                      end
                      

                       

                       

                      I tested the above with the video "mace.mp4" imported as #MP4Media

                      • 8. Re: can I choose the software to open a .mov file?
                        elifra2005 Level 1

                        Thank you.

                        I figured out with it.

                         

                        I couldn't do it by myself.

                         

                        Elisabetta

                        • 9. Re: can I choose the software to open a .mov file?
                          elifra2005 Level 1

                          Since you know well mp4, can you help me with this?

                           

                          In my project I have almost 60 mp4.

                          The size is around 10- 20 MB.

                          Director doesn't import all of them. After ten-fifteen imported, Director becomes slower, the thumbnail doesn't come out, I can't open .mp4 in the mp4editor and  Director often crashes.

                          Do you know why?

                           

                          Thank you

                           

                          Elisabetta