This assumes you have a Xiaomi Ants Smart Camera that still has the open RTSP enabled. I think newer firmware might remove this capability. If you Google enough you can find instructions on how to downgrade.
FFMPEG is where most of the magic happens. I use OSX and as such am a fan of using Homebrew to install free software. Here is my ffmpeg install command:
brew install ffmpeg --with-faac --with-fdk-aac --with-ffplay --with-fontconfig --with-freetype --with-frei0r --with-libass --with-libbluray --with-libcaca --with-libquvi --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-webp --with-x265