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 | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
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
----- mongo to js ------ | |
timeStamp = parseInt(Mongo.ObjectId().toString().substr(0,8), 16)*1000 | |
date = new Date(timestamp) | |
----------------------------- | |
----- js to mongo ----- | |
timestamp = new Date().getTime()/1000 | |
mongoId = new ObjectID(timestamp.toString(16)+1e16) |