Hello. ffmpeg records video stream from IP-cam. IP-cam has authentiation.
ffmpeg \ -t $DT_SECONDS_TO_RECORD \ -i rtsp://$SRC_USER:$SRC_PASS@$SRC_ADDR/stream1.sdp \ -vcodec copy \ -acodec copy \ $DST_FILE ffmpeg starts from cron script by unpriviledged user. At the same host can be logged interactive users. The problem is: interactive users can see ffmpeg command line "by ps", thus users can see IP-cam password. $ ps -f -C ffmpeg UID PID PPID C STIME TTY TIME CMD backup 1506 1423 88 07:47 pts/11 00:00:08 ffmpeg -t 3600 -i rtsp://admin:password@192.168.0.100/stream1.sdp -vcodec copy -acodec copy out.mkv The question is: can ffmpeg parse environment variables themselves? For example: ffmpeg \ -t $DT_SECONDS_TO_RECORD \ -i rtsp://$SRC_USER:'$SRC_PASS'@$SRC_ADDR/stream1.sdp \ -vcodec copy \ -acodec copy \ $DST_FILE $ ps -f -C ffmpeg UID PID PPID C STIME TTY TIME CMD backup 1506 1423 88 07:47 pts/11 00:00:08 ffmpeg -t 3600 -i rtsp://admin:$SRC_PASS@192.168.0.100/stream1.sdp -vcodec copy -acodec copy out.mkv -- Ilya Melnikov Sunday 19 April 2015 07:35:46
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user