PHP Ninjas Inside!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Killswitch - BANNED FOR LIFE
    • Jul 2026

    #1

    PHP Ninjas Inside!

    I've been racking my brain over this for the last 3 days, I'm working on some stuff and my local server has ffmpeg so I have a wrapper class already made to use that... but the actual server doesn't allow ffmpeg, the host wont do it, and yes, I know, the host needs changed, but for now, it can't not to mention I want to get this working with ffmpeg anyway!

    How the fuck do you get the flv length without ffmpeg? I've gotten it down to opening the file, reading so much of it to grab the duration line, but I get a bunch of bullshit and cannot figure out for the life of me to convert it to something readable.

    Here's what I got so far:
    duration�@f´õ\)�width�@??������height�@~�� �����
    Any help is appreciated and credit will be given.
  • quantum-x
    Confirmed User
    • Feb 2002
    • 6863

    #2
    Hah: This is going to be fun.
    First, you're going to have to be reading in binary mode.
    Second, you're going to have to scratch of up on little and big endian notation.

    Third, you'll find out the strpos etc completely aren't binary safe.

    My recommendation?

    Do a GFY search on my name, find where I posted my movie anti-piracy script.
    It's got a bunch of classes written exactly for this: loading a movie, and doing binary searches inside the movie, and pulling out data.

    That will probably sold your problem entirely.
    PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

    Comment

    • Killswitch - BANNED FOR LIFE

      #3
      Awesome, Thanks man.

      Comment

      • quantum-x
        Confirmed User
        • Feb 2002
        • 6863

        #4
        Originally posted by Killswitch
        Awesome, Thanks man.
        OK, just because I'm feeling like a ninja:
        This requires my VPX package as mentioned before.

        PHP Code:
        <?
         require_once('./VPX/VPX.php');
         $VPX = new VPXBase('C:\TEMP\finalCut.flv');
         $VPX->Seek($VPX->SeekString(pack('H*','40443D4FDF3B645A')));
         $duration    =    BigEndian2Float($VPX->Read(8));
         var_dump($duration);
        ?>
        Will output something like:
        float(40.479)

        Game over ;)
        PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

        Comment

        • ExLust
          Confirmed User
          • Aug 2008
          • 3223

          #5
          Thanks for sharing.

          BE A PARTNER

          Comment

          • Killswitch - BANNED FOR LIFE

            #6
            Originally posted by quantum-x
            OK, just because I'm feeling like a ninja:
            This requires my VPX package as mentioned before.

            PHP Code:
            <?
             require_once('./VPX/VPX.php');
             $VPX = new VPXBase('C:\TEMP\finalCut.flv');
             $VPX->Seek($VPX->SeekString(pack('H*','40443D4FDF3B645A')));
             $duration    =    BigEndian2Float($VPX->Read(8));
             var_dump($duration);
            ?>
            Will output something like:
            float(40.479)

            Game over ;)
            Haha, thanks, I just gotta go through your code and remove what I don't need, I hate extra code :D

            Will give you credit, any special url you want me to put in the source code?

            Comment

            • quantum-x
              Confirmed User
              • Feb 2002
              • 6863

              #7
              Originally posted by Killswitch
              Haha, thanks, I just gotta go through your code and remove what I don't need, I hate extra code :D

              Will give you credit, any special url you want me to put in the source code?
              Depends how you're releasing it I guess. Commercial product, let's talk.
              Small script to get something done: credits to lemonparty.org
              PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

              Comment

              • Killswitch - BANNED FOR LIFE

                #8
                Originally posted by quantum-x
                Depends how you're releasing it I guess. Commercial product, let's talk.
                Small script to get something done: credits to lemonparty.org
                Personal script... It's for my own site, most likely won't be sold due to the amount of work I'm putting into it, and your code may possibly be removed before it gets sold if it does and replaced with my ffmpeg wrapper. So it's mostly just to remind me that snippet of code was from you.

                Comment

                • nation-x
                  Confirmed User
                  • Mar 2004
                  • 5370

                  #9
                  Originally posted by quantum-x
                  OK, just because I'm feeling like a ninja:
                  This requires my VPX package as mentioned before.

                  PHP Code:
                  <?
                   require_once('./VPX/VPX.php');
                   $VPX = new VPXBase('C:\TEMP\finalCut.flv');
                   $VPX->Seek($VPX->SeekString(pack('H*','40443D4FDF3B645A')));
                   $duration    =    BigEndian2Float($VPX->Read(8));
                   var_dump($duration);
                  ?>
                  Will output something like:
                  float(40.479)

                  Game over ;)
                  edit... nevermind... I actually read the thread AFTER I posted because I am tarded today
                  Last edited by nation-x; 04-28-2009, 09:25 AM.

                  Comment

                  • munki
                    Do Fun Shit.
                    • Dec 2004
                    • 13393

                    #10
                    And that is ninja style done right...

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

                    Comment

                    • quantum-x
                      Confirmed User
                      • Feb 2002
                      • 6863

                      #11
                      Originally posted by Killswitch
                      Personal script... It's for my own site, most likely won't be sold due to the amount of work I'm putting into it, and your code may possibly be removed before it gets sold if it does and replaced with my ffmpeg wrapper. So it's mostly just to remind me that snippet of code was from you.
                      No credit necessary then
                      PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                      Comment

                      • Killswitch - BANNED FOR LIFE

                        #12
                        Originally posted by quantum-x
                        No credit necessary then
                        GOD DAMNIT MAN!

                        PHP Code:
                        <?php
                        /*
                        Quantum-X from GFY supplied the code to do this shizzat mofacka,
                        but he's to big of a poopoo head to take the credit 
                        so heres where you got the code stupid mcfuckface!
                        http://www.gfy.com/showthread.php?t=902306
                        */
                        $Ninja->GetDuration($flv);
                        ?>

                        Comment

                        • quantum-x
                          Confirmed User
                          • Feb 2002
                          • 6863

                          #13
                          Originally posted by Killswitch
                          GOD DAMNIT MAN!

                          PHP Code:
                          <?php
                          /*
                          Quantum-X from GFY supplied the code to do this shizzat mofacka,
                          but he's to big of a poopoo head to take the credit 
                          so heres where you got the code stupid mcfuckface!
                          http://www.gfy.com/showthread.php?t=902306
                          */
                          $Ninja->GetDuration($flv);
                          ?>
                          Actually what I was really trying to avoid was having my nickname in a script that I didn't control.. I've been trying to clean up my google record ;)
                          PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                          Comment

                          • Killswitch - BANNED FOR LIFE

                            #14
                            Originally posted by quantum-x
                            Actually what I was really trying to avoid was having my nickname in a script that I didn't control.. I've been trying to clean up my google record ;)
                            I fixed it for you

                            PHP Code:
                            <?php
                            /*
                            BLEEEP from BLEEEEP supplied the code to do this BLEEEEP BLEEEEP,
                            but he's to big of a BLEEEEP head to take the credit 
                            so heres where you got the code stupid BLEEEEP!
                            http://www.gfy.com/showthread.php?t=902306
                            */
                            $Ninja->GetDuration($flv);
                            ?>

                            Comment

                            • quantum-x
                              Confirmed User
                              • Feb 2002
                              • 6863

                              #15
                              Originally posted by Killswitch
                              I fixed it for you

                              PHP Code:
                              <?php
                              /*
                              BLEEEP from BLEEEEP supplied the code to do this BLEEEEP BLEEEEP,
                              but he's to big of a BLEEEEP head to take the credit 
                              so heres where you got the code stupid BLEEEEP!
                              http://www.gfy.com/showthread.php?t=902306
                              */
                              $Ninja->GetDuration($flv);
                              ?>
                              That's cool
                              PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                              Comment

                              Working...