Advertisement
Guest User

a

a guest
Nov 7th, 2010
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.34 KB | None | 0 0
  1. <?php
  2.  
  3. $dir = "C:\\files\\";
  4. $files = array();
  5. // game is http://nlds25.cdnl3.neulion.com/nlds_vod/nfl/vod/2010/09/12/2_2010091200_CLE_TB_2010_20100912_home_whole_3000.mp4/02/0824.mp4
  6. // equals 2 hours 8 mins 24 seconds long.
  7. // grab each 2 seconds of footage.
  8.  
  9. // $i is seconds.
  10. $accum = 0; // accum counter for totals files - dont want this too high or we bottleneck
  11. $curfile = 0;
  12. echo "echo \"\" > total".$curfile.".h264\r\n";
  13. for( $i = 0; $i < (2*60 + 8)*60 + 25; $i+=2 )
  14. {
  15.     $dir = sprintf("%02d", ($i / 3600) );
  16.     $str = sprintf( "%02d%02d", ($i % 3600) / 60, ($i % 60) );
  17.     $url = "http://nlds25.cdnl3.neulion.com/nlds_vod/nfl/vod/2010/09/12/2_2010091200_CLE_TB_2010_20100912_home_whole_3000.mp4/$dir/$str.mp4";
  18.    
  19. /*  echo "wget \"".$url."\"\r\n";
  20.     echo "move $str.mp4 $dir$str.mp4\r\n";
  21.     echo "C:\Users\dan\AppData\Roaming\Yamb\MP4Box.exe -raw 1 $dir$str.mp4\r\n";
  22.     echo "C:\Users\dan\AppData\Roaming\Yamb\MP4Box.exe -raw 2 $dir$str.mp4\r\n";
  23.     echo "copy /B total".$curfile.".h264 +".$dir.$str."_track1.h264 total".$curfile.".h264\r\n";
  24.     $accum++;
  25.     if( $accum > 200 ) { $accum = 0; $curfile++; echo "echo \"\" > total".$curfile.".h264\r\n"; }
  26. */
  27.     echo $dir.$str."  ".substr( $files[$i/2], 0, -4 )."<br>";
  28. }
  29.  
  30. echo "copy /B total0.h264 ";
  31. for( $i = 1; $i <= $curfile; $i++ )
  32. {
  33.     echo "+total".$i.".h264 ";
  34. }
  35. echo "all.h264\r\n";
  36.  
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement