According to the documentation for using Two-Pass method we have to run ffmpeg twice like this:
ffmpeg -y -i input -c:v libx264 -b:v 2600k -pass 1 -an -f mp4 /dev/null && \ ffmpeg -i input -c:v libx264 -b:v 2600k -pass 2 -c:a aac -b:a 128k output.mp4
But When I use these codes I get this error:
Unable to find a suitable output format for '&&'
And Android doesn't recognize
"&& \" as an argument for ffmpeg or ffmpeg doesn't recognize such a thing on Android!
Could somebody tell me how I should do 2-Pass encoding on Android with FFmpeg?