Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sree Harsha Kalli ksharsha

🎯
Focusing
View GitHub Profile
@ksharsha
ksharsha / BashHelp
Created Apr 7, 2017
Some common commands which males our life simpler
View BashHelp
echo */ | wc --> Count the number of directories in a folder
for f in *\ *; do mv "$f" "${f// /_}"; done --> replace spaces in folder names, not recursive
for f in model/* ; do mv "$f" `echo "$f" | sed 's/_//g'` ; done --> Remove underscores from the file names
./sout.py 2>&1 | tee test.txt --> To print the logs to the terminal as well as save them to a text file
View ExtractSubClip.py
import json
from pprint import pprint
import glob
import os
import shutil
import sys
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
import subprocess
import cv2
from moviepy.editor import *
View ffmpeg-compress
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
You can’t perform that action at this time.