https://blog.csdn.net/kaikai136412162/article/details/80746961
https://blog.csdn.net/weixin_37897683/article/details/81225228
1, will be pushed to the file as a source RTMP servers
ffmpeg -re -i localFile.mp4 -c copy -f flv rtmp://server/live/streamName
Parameter Explanation
-r read data to local frame rate, mainly for analog capture device. Represents ffmpeg to send data in accordance with the frame rate, will not be sent to the highest efficiency
2. Save the file to a local live
ffmpeg -i rtmp://server/live/streamName -c copy dump.flv
3, in which a live video stream switch H.264 compression, audio change, a further push live server
ffmpeg -i rtmp://server/live/originalStream -c:a copy -c:v libx264 -vpre slow -f flv rtmp://server/live/h264Stream
4, in which a switch live streaming H.264 video compression, audio compression aac switch, a further push live server
ffmpeg -i rtmp://server/live/originalStream -c:a libfaac -ar 44100 -ab 48k -c:v libx264 -vpre slow -vpre baseline -f flv rtmp://server/live/h264Stream
5, in which a live video stream of the same audio compression aac switch, a further push live server
ffmpeg -i rtmp://server/live/originalStream -acodec libfaac -ar 44100 -ab 48k -vcodec copy -f flv rtmp://server/live/h264_AAC_Stream
6, a clean copy for several different high-definition streams republish, in which the audio unchanged
ffmpeg -re -i rtmp://server/live/high_FMLE_stream -acodec copy -vcodec x264lib -s 640×360 -b 500k -vpre medium -vpre baseline rtmp://server/live/baseline_500k -acodec copy -vcodec x264lib -s 480×272 -b 300k -vpre medium -vpre baseline rtmp://server/live/baseline_300k -acodec copy -vcodec x264lib -s 320×200 -b 150k -vpre medium -vpre baseline rtmp://server/live/baseline_150k -acodec libfaac -vn -ab 48k rtmp://server/live/audio_only_AAC_48k
7, the current camera and loudspeaker DSHOW collected by using H.264 / AAC compressed push server RTMP
ffmpeg -r 25 -f dshow -s 640×480 -i video=”video source name”:audio=”audio source name” -vcodec libx264 -b 600k -vpre slow -acodec libfaac -ab 128k -f flv rtmp://server/application/stream_name
8, after a JPG image compression H.264 MP4 file output
ffmpeg -i INPUT.jpg -an -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -subq 10 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -flags2 +dct8x8 -trellis 2 -partitions +parti8x8+parti4x4 -crf 24 -threads 0 -r 25 -g 25 -y OUTPUT.mp4
9, will be converted to MP3 AAC
ffmpeg -i 20120814164324_205.wav -acodec libfaac -ab 64k -ar 44100 output.aac
10, the converted files flv AAC files, AAC encoding format
ffmpeg -i output.aac -acodec libfaac -y -ab 32 -ar 44100 -qscale 10 -s 640*480 -r 15 output.flv