You can reuse your old smartphone as an IP Camera. Just install Free Security Camera app on your mobile phone. Software has built-in RTSP-server and stream video and audio over Wi-Fi from main or front camera using the RTSP protocol.
Enter connection string like:
rtsp://admin:admin@192.168.0.102:1935
Where:
admin - default login and password
192.168.0.102 - IP address of mobile phone in your Wi-Fi network
1935 - connection port