Friday, September 11, 2020

rsync with a non-standard port

 rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/

Tuesday, September 1, 2020

Common cmd of ffmpeg

 Images -> video

    ffmpeg -r 30 -f image2 -s 1280x720 -start_number 1 -i %06d.png -vframes 1000 -vcodec libx264 -crf 25  -pix_fmt yuv420p out.mp4


Video -> frames with specifc frame index

 cmd = "ffmpeg -i {} -vf select='between(n\,{}\,{})' -vsync 0 -start_number {} {}/%06d.jpg".format(video_path, s, t, s, out_path)