Перейти до основного вмісту

ffmpeg IP Camera DVR recording

If you have home server and want to record streams from your IP camera you can use siple script like this:

while true; do
    ffmpeg -i "rtsp://<192 .cam.ip="">:554/user=admin&password=&channel=0&stream=0.sdp?Real_stream" -acodec copy -vcodec copy -fs 20000000 "/srv/ftp/cam1/vid `date`.mov" | true ;
done



Option -fs 20000000  limits file sizes to ~20MB

CPU usage is very low. Even raspberry pi should be able to save your data from multiple cameras.

NOTE: deleting old files is not implemented.

Коментарі

Популярні дописи з цього блогу

Home assistant - modbus - HHC-N8I8OP

Thanks to https://www.cncwiki.org/index.php?title=HHC-N8I8OP  I managed to connect this buggy module to home assistant using modbus integration: It is important to have verify delay big to not break logic.  modbus:   - type: tcp     host: 192.168.222.222     port: 5000     name: "modbus1"     switches:       - name: "hhc_r8"         address: 16         write_type: coil         verify:           delay: 36       - name: "hhc_r7"         address: 17         write_type: coil         verify:           delay: 37       - name: "hhc_r6"   ...

ebusd and vailant ecotech plus plus controller

 ebusctl   localhost: find -c bai bai AccessoriesOne = no data stored bai AccessoriesTwo = no data stored bai ACRoomthermostat = no data stored bai AntiCondensValue = no data stored bai averageIgnitiontime = no data stored bai BlockTimeHcMax = no data stored bai BoilerType = no data stored bai ChangesDSN = no data stored bai CirPump = no data stored bai CodingResistor = no data stored bai CounterStartattempts1 = no data stored bai CounterStartattempts2 = no data stored bai CounterStartAttempts3 = no data stored bai CounterStartAttempts4 = no data stored bai currenterror = no data stored bai DateTime = no data stored bai dcfState = no data stored bai DCFTimeDate = no data stored bai DCRoomthermostat = on bai DeactivationsIFC = no data stored bai DeactivationsTemplimiter = no data stored bai DeltaFlowReturnMax = no data stored bai DisplayMode = no data stored bai DSN = no data stored bai DSNOffset = no data stored bai DSNStart = no data stored bai EBusHeatcontrol = no data store...

HomeAssistant gadinan camera rest commands pan and tilt

 Add following to restcommand.yaml and include in config.yaml:   # rest_command: ptz_control_right : url : "http://192.168.16.253/PSIA/YG/PTZCtrl/channels/0/continuous?pan=1&tilt=0" method : PUT headers : Cookie : "cur_UserInfo=admin%3A123456; cur_userName=admin;" Content-Length : "0" ptz_control_left : url : "http://192.168.16.253/PSIA/YG/PTZCtrl/channels/0/continuous?pan=-1&tilt=0" method : PUT headers : Cookie : "cur_UserInfo=admin%3A123456; cur_userName=admin;" Content-Length : "0" ptz_control_stop : url : "http://192.168.16.253/PSIA/YG/PTZCtrl/channels/0/continuous?pan=0&tilt=0" method : PUT headers : Cookie : "cur_UserInfo=admin%3A123456; cur_userName=admin;" Content-Length : "0" ptz_control_up : url : "http://192.168.16.253/PSIA/YG/PTZCtrl/channels/0/continuous?pan=0&tilt=1" method : PUT headers : Cookie : "c...