Hi there This is not really related to FFmpeg, and I'm afraid there is no quick solution.
If you use environment variable (like you proposed) or any shell/UNIX 'hack' (eg. -i `cat url.txt`), at the moment of execution a plain-text password will be inserted anyway. And 'ps' will show what really was launched, not the string before parsing. So the question becomes – can you pass incomplete information to FFmpeg at the execution time, and then make it fetch extra information itself? I don't think it's possible. Воскресенье, 19 апреля 2015, 8:03 +05:00 от Ilya Melnikov <rayana...@mail.ru>: >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 >_______________________________________________ >ffmpeg-user mailing list >ffmpeg-user@ffmpeg.org >http://ffmpeg.org/mailman/listinfo/ffmpeg-user Sincerely, -- Denis Mysenko, CCNA, MCP, MCSA Skype: denismysenko, ICQ: 555955 Forskarbacken 9 / 209 10405 Stockholm, Sweden Mobile: +46 (0) 70 405 49 04 _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user