This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# CreateTimestampSrtForVideo.py by MegaSaturnv | |
#Todo: | |
# * Decide between subprocess.Popen or subprocess.run or something else entirely | |
# * More error checking - try except | |
# * Test compatibility with Windows | |
# * Check for ffprobe before running | |
# * Implement a batch mode for processing all video files in a Folder? Or, just use find and -exec... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 64 000 000 bits / video length = target bitrate | |
#MAX_VIDEO_SIZE="60000000" | |
#MAX_VIDEO_SIZE="66108900" | |
MAX_VIDEO_SIZE="55000000" | |
#MAX_AUDIO_SIZE="4000000" | |
MAX_AUDIO_SIZE="1000000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./ffmpeg_clip.sh <filename> <start mm:ss> <end mm:ss> | |
# Example: ./ffmpeg_clip.sh file.mp4 01:15 01:45 | |
# Output file is <filename>_clip.mp4 | |
FILE=$1 | |
START_TIME=$2 | |
END_TIME=$3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
alias sshNoCheck='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Megasaturnv 2018-01-16 Use curl -u username:password for http auth if required ?> | |
<img src="data:image/jpeg;base64, <?php echo base64_encode(shell_exec("curl http://192.168.1.50/cgi-bin/snapshot.cgi?channel=0 2> /dev/null")) ?>"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Megasaturnv 2018-01-16 | |
header("Content-type: image/jpeg"); | |
echo shell_exec("curl http://192.168.1.50/cgi-bin/snapshot.cgi?channel=0 2> /dev/null"); | |
//Use curl -u username:password for http auth if required | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Megasaturnv 2018-01-16 Change this resolution to match your camera \/ ?> | |
<img src="data:image/jpeg;base64, <?php echo base64_encode(shell_exec("avconv -f video4linux2 -i /dev/video0 -vframes 1 -s 1920x1080 pipe:.jpg 2>/dev/null")); ?> "> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Megasaturnv 2018-01-16 | |
header("content-type: image/jpeg"); | |
// Change this resolution to match your camera \/ | |
echo passthru("avconv -f video4linux2 -i /dev/video0 -vframes 1 -s 1920x1080 pipe:.jpg 2>/dev/null"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Megasaturnv 2018-01-16 | |
$camurl="http://192.168.1.100:8081/"; // Mjpeg URL | |
//$camurl="http://username:[email protected]:8081/" // HTTP Auth mjpeg URL (optional) | |
$boundary="--BoundaryString"; // $boundary = The boundary string between jpegs in an mjpeg stream | |
//NOTE: $boundary changes between mjpeg stream providers. For example, https://github.com/Motion-Project/motion uses '--BoundaryString'. https://github.com/ZoneMinder/ZoneMinder uses '--ZoneMinderFrame'. To find out $boundary for your stream you will need to save 1 or more frames of the mjpeg and open it with a text editor. --<boundary string> should be visible on the first line | |
$f = fopen($camurl, "r"); // Open mjpeg url as $f in readonly mode | |
$r = ""; // Set $r to blank variable | |
if($f) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Megasaturnv 2018-01-12 | |
$camurl="http://192.168.1.100:8081/"; // Mjpeg URL | |
//$camurl="http://username:[email protected]:8081/" // HTTP Auth mjpeg URL (optional) | |
$boundary="--BoundaryString"; // $boundary = The boundary string between jpegs in an mjpeg stream | |
//NOTE: $boundary changes between mjpeg stream providers. For example, https://github.com/Motion-Project/motion uses '--BoundaryString'. https://github.com/ZoneMinder/ZoneMinder uses '--ZoneMinderFrame'. To find out $boundary for your stream you will need to save 1 or more frames of the mjpeg and open it with a text editor. --<boundary string> should be visible on the first line | |
$f = fopen($camurl, "r"); // Open mjpeg url as $f in readonly mode | |
$r = ""; // Set $r to blank variable | |
if($f) { |
NewerOlder