Some my preferred parameters of ffmpeg operation
Push stream to a video server by ffmpeg
ffmpeg -re -i /path/sample1.mp4 -s 640×360 -vcodec libx264 -b:v 300k -r 24 -preset ultrafast -crf 28 -acodec aac -strict -2 -f flv rtmp://ip:1935/myapp/mystream
ffmpeg -re -i /path/sample2.mp4 -s 640×360 -vcodec libx264 -b:v 300k -r 24 -preset ultrafast -crf 28 -acodec aac -strict -2 -f flv rtmp://ip:1935/hls/test
ffmpeg -re -i /opt/sample1.mp4 -s 640×360 -vcodec libx264 -b:v 300k -preset slow -acodec libfaac -ac -1 -b:a 64 -f flv rtmp://ip:1935/hls/test
ffmpeg -re -i /opt/sample2.mp4 -s 640×360 -vcodec libx264 -preset slow -crf 28 -acodec libfaac -ac -1 -b:a 64 -f flv rtmp://ip:1935/hls/test
Convert a video in local
D:\ffmpeg -i g:\sample1.mp4 -s 960×540 -vcodec libx265 -b:v 1024k -r 25 -acodec aac -ac 2 -b:a 128k D:\output.mp4
D:\ffmpeg -i g:\sample.mp4 -s N.1xN.2 -vcodec [libx264 | libx265] -preset [ultrafast | superfast | veryfast | faster | fast | medium | slow | slower |veryslow | placebo ] -bufsize NUMk -threads NUM -crf [1-51] -acodec copy d:\output.mp4