Monday, December 30, 2013

Find ssh port number for ftp

Yeah, that!
I could ssh from terminal but wanted to transfer files into a windows. Tried ftp into the server using the filezilla. However, could not confirm the port number. So, this guy did the trick of finding the connected port number.
Once I had access to the port number, I could put that into filezilla, then log in. Neat!

echo ${SSH_CLIENT##* }

Thursday, December 26, 2013

Convert png into movie for youtube

Just small piece of code does the magic!

avconv -i rlds_bced_1960_1999_ipsl-cm5a-lr_rcp8p5_20%02d.png -r 5 -c:v libx264 -crf 1  -pix_fmt yuv420p
  • -i "rlds_bced_1960_1999_ipsl-cm5a-lr_rcp8p5_20%02d.png" uses these files as the input, %d is a placeholder for the number
  • -r 5 the desired frame rate, 5 FPS in this case
  • -c:v libx264 use the h264 codec x264
  • -crf 20 the video quality, 20 is pretty high, the default is 23
  • -pix_fmt yuv420p a compatible pixel format

The nice info here: