Detect type of compression codec

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Lancill
    Forum Member
    • Jan 2003
    • 13

    Detect type of compression codec

    Hi all, how can I detect the type of compression codec in Autoplay Media Studio 4? I want to know that I can see when I click right mouse button on a video file (ex: .avi) -> Properties -> second tab (I don't know the English name of that tab [img]/ubbthreads/images/icons/smile.gif[/img] ) -> video compression (ex: DIVX, XVID...)!

    Help me please!
    Cya
    Lancill
  • Lorne
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    Re: Detect type of compression codec

    Try to find out how you can get that information from the Registry (if you can). Then you can just use AutoPlay's Registry actions to sleuth it out.

    A search on google might turn something up.
    --[[ Indigo Rose Software Developer ]]

    Comment

    • TJ_Tigger
      Indigo Rose Customer
      • Sep 2002
      • 3159

      #3
      Re: Detect type of compression codec

      I don' t know if this helps, but here is a post that checked the registry for the version of Divx codec.

      click here

      HTH
      Tigg
      TJ-Tigger
      "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
      "Draco dormiens nunquam titillandus."
      Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

      Comment

      • Lancill
        Forum Member
        • Jan 2003
        • 13

        #4
        Re: Detect type of compression codec

        Uhmmm... But the compression type information is not stored in the Registry, I think it's stored in the file!... In the Registry I can check if a codec is or not installed on that pc!
        Is that right?

        Comment

        • Lorne
          Indigo Rose Staff Member
          • Feb 2001
          • 2729

          #5
          Re: Detect type of compression codec

          Ah, sorry I misunderstood the question.

          To do that, you'll need to find some command-line utility that will report that information back to standard output or to a file or something.

          Or, it seems to me that a four-letter "tag" identifying the codec is included at the beginning of the file...if so, you could just read the file into a string (or the first "line" of the file) and then examine the characters at the appropriate location.
          --[[ Indigo Rose Software Developer ]]

          Comment

          • Lancill
            Forum Member
            • Jan 2003
            • 13

            #6
            Re: Detect type of compression codec

            Np [img]/ubbthreads/images/icons/smile.gif[/img]

            Thx very much! I'll try it! [img]/ubbthreads/images/icons/smile.gif[/img]

            Cya

            Comment

            • Lancill
              Forum Member
              • Jan 2003
              • 13

              #7
              Re: Detect type of compression codec

              There's a problem! Your method works correctly with very small files, but if I try to get a line from a larger file (for example a file of 2 MB), Autoplay Media Studio returns an error: "The file is too large to be read" !!!

              I use this code:

              %TextLine% = TextFile.GetLine("%SrcDir%\\movie.avi",1)
              %FoundPos% = String.Find("%TextLine%","divx",0)
              and then various if...

              How can I do?

              Cya!

              Comment

              • Lorne
                Indigo Rose Staff Member
                • Feb 2001
                • 2729

                #8
                Re: Detect type of compression codec

                You'll need to use some other method of grabbing the first few bytes of the file. This would certainly be possible with a program (or even better, a custom .DLL).
                --[[ Indigo Rose Software Developer ]]

                Comment

                • Lancill
                  Forum Member
                  • Jan 2003
                  • 13

                  #9
                  Re: Detect type of compression codec

                  yes,
                  thanks for support!

                  Bye!

                  Comment

                  Working...
                  X