Scripting: Check size of a video file? (WMV/FLV) - PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voodoo
    ♥ ♦ ♣ ♠
    • Sep 2002
    • 10600

    #1

    Scripting: Check size of a video file? (WMV/FLV) - PHP

    Does someone have a method for checking the dimensions of a video, not using meta data? Here's the thing... I have some videos that don't have metadata, FLV&WMV for the same video... In Windows, the size of the WMV shows up as 320x240, but not the FLV. It's safe to assume that each FLV is the same size as the corresponding WMV.

    How do I read this size info that Windows sees in PHP?

    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
  • Tempest
    Too lazy to set a custom title
    • May 2004
    • 10217

    #2
    You could install ffpmeg or mencoder on your server, exec it and then parse the output.

    Comment

    • RyuLion
      • Mar 2003
      • 32374

      #3

      Adult Biz Consultant A tech head since 1995
      Affiliate Support: Chaturbate | CCBill Live

      Comment

      • GrouchyAdmin
        Now choke yourself!
        • Apr 2006
        • 12085

        #4
        So, you want to get these numbers.. by osmosis?

        Comment

        • k0nr4d
          Confirmed User
          • Aug 2006
          • 9231

          #5
          you can use ffmpeg-php extension or you can look for a class called getid3
          Mechanical Bunny Media
          Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

          Comment

          • munki
            Do Fun Shit.
            • Dec 2004
            • 13393

            #6
            ffmpeg-php = win

            I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

            Comment

            • fris
              I have to go potty
              • Aug 2002
              • 55818

              #7
              http://getid3.sourceforge.net/
              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


              My Newest Theme

              Comment

              • fris
                I have to go potty
                • Aug 2002
                • 55818

                #8
                if you are using ffmpeg-php check out

                getduration
                getframewidth
                getframeheight
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


                My Newest Theme

                Comment

                • fris
                  I have to go potty
                  • Aug 2002
                  • 55818

                  #9
                  Originally posted by Voodoo
                  Does someone have a method for checking the dimensions of a video, not using meta data? Here's the thing... I have some videos that don't have metadata, FLV&WMV for the same video... In Windows, the size of the WMV shows up as 320x240, but not the FLV. It's safe to assume that each FLV is the same size as the corresponding WMV.

                  How do I read this size info that Windows sees in PHP?
                  As soon as you compile ffmpeg-php:

                  <?
                  $movie = new ffmpeg_movie('trailer.flv');
                  $height = $movie->getframeheight();
                  $width = $movie->getframewidth();
                  echo "$width x $height";
                  ?>
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


                  My Newest Theme

                  Comment

                  • Voodoo
                    ♥ ♦ ♣ ♠
                    • Sep 2002
                    • 10600

                    #10
                    Originally posted by Fris
                    As soon as you compile ffmpeg-php:

                    <?
                    $movie = new ffmpeg_movie('trailer.flv');
                    $height = $movie->getframeheight();
                    $width = $movie->getframewidth();
                    echo "$width x $height";
                    ?>
                    Mmmmm.... That's sexy.

                    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

                    Comment

                    Working...