two pass encoding Cannot write log file 'ffmpeg2pass-0.log' for pass-1 encoding
You have to set the -passlogfile option e.g. -passlogfile my/folder/path/fileprefix. ffmpeg will then write logs to files starting with fileprefix- in my/folder/path/. Set the option and same value in latter passes. The folder path must already exist.