ffmpeg

================================================
1. Installation
== =============================================
mac:
----- -------------------------------------------------- -----
brew install ffmpeg
-------------------------------------------- ------------------
linux:
------------------------------ ------------------------------
yum -y install ffmpeg
at the end of /etc/profile:
export FFMPEG_HOME=/usr/ local/ffmpeg
export PATH=$FFMPEG_HOME/bin:$PATH
compile:
source /etc/profile
================================ ===============
2. Command:
================================= =============
1. Extract all pictures
-r specifies the extracted frame rate, that is, the number of pictures per second extracted from the video. 1 means decimating one frame per second.
-f Specifies the format used to save the image, which can be ignored.
image-%3d.jpeg, specifies the output name of the file.
-------------------------------------------------- ----------
ffmpeg -i WeChatSight2.mp4 -r 1 -f image2 image-%3d.jpeg
---------------------- --------------------------------------
2. Take the first frame
-t duration (otherwise One way of writing "-ss","00:00:00","-t","00:00:01")
--------------------- ---------------------------------------
ffmpeg -i WeChatSight2.mp4 -r 1 -t 1 -f image2 image-%3d.jpeg
---------------------------------------- --------------------
3.





/usr/local/bin/ffmpeg -y -i WeChatSight2.mp4 -vframes 1 -ss 0:0:0 -f mjpeg -s 800*600 -an /Users/samson/Desktop/1.png

----- -------------------------------------------------- -----
Push stream to rtmp protocol address
--------------------------------------- ---------------------
ffmpeg -re -i /Users/Rick/Movies/Demo.mov -vcodec copy -f flv rtmp://localhost:1935/ live1/room1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326299874&siteId=291194637