Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
938 B

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
10 months ago
3 years ago
2 years ago
​
3 years ago
  1. <?php
  2. function output_dummy( $DST ){
  3. $FD = fopen( $DST, "r" );
  4. if( $FD ){
  5. header( 'Content-Type: video/mp4;' );
  6. while(!feof( $FD ) ){
  7. echo fread( $FD, 2048 );
  8. };
  9. fclose( $FD );
  10. };
  11. };
  12. if( isset( $_POST['FTS'] ) ){
  13. ob_implicit_flush(true);
  14. ignore_user_abort(true);
  15. while( ob_get_level() ) ob_end_clean();
  16. $DTS = intval( $_POST['FTS'] );
  17. $MD5 = $_POST['FMD'];
  18. $SRC = 'data/reports/' . date("Y/m/d", $DTS ) . '/'. $MD5. '.mjpeg';
  19. $FPS = intval( $_POST['FPS'] );
  20. if( file_exists( $SRC ) ){
  21. $DST = '../tmp/' . $MD5 . '.avi';
  22. $COM = "ffmpeg -hide_banner -loglevel error -y -r {$FPS} -i {$SRC} -vcodec copy {$DST} 2>&1";
  23. $JUJA = `rm -f ../tmp/*`;
  24. $JUJA = `$COM`;
  25. if( file_exists( $DST ) ){
  26. echo '/lib/tmp/' . $MD5 . '.avi';
  27. } else echo "/lib/controller/".$SRC;
  28. } else echo '/style/assets/nosignal.mp4';
  29. } else echo '/style/assets/nosignal.mp4';
  30. ?>