Audio and video ffmpeg command parameter description

Main parameters:
-i set input stream
-f set output format (format)
-ss start time
-t time length

Audio parameters:
-aframes Set the number of audio frames to be output
-b:a Audio code rate
-ar Set the sampling rate
-ac Set the number of channels of the sound
-acodec Set the sound codec, if copy is used to represent the original codec data Must be copied.
-an do not process audio
-af audio filter

Video parameters:
-vframes set the number of video frames to be output
-b set the video bit rate
-b:v video bit rate
-r set the frame rate
-s set the width and height of the picture
-vn does not process the video
-aspect aspect setting Aspect ratio 4:3 16:9 or 1.3333 1.7777
-vcodec sets the video codec. If copy is used, it means that the original codec data must be copied.
-vf video filter

ffmpeg -i test.mp4 -b:a 192k -ar 48000 -ac 2 -acodec libmp3lame -aframes 200 out2.mp3

ffmpeg -i test.mp4 -vframes 300 -b:v 300k -r 30 -s 640x480 -aspect 16:9 -vcodec libx265

I recommend a Lingsheng Academy project class. I personally think the teacher taught it well. I would like to share it with you:
Lingsheng Platinum Learning Card (including infrastructure/high-performance storage/golang cloud native/audio and video/Linux kernel)
https://xxetb.xet .tech/s/VsFMs

Guess you like

Origin blog.csdn.net/qq_40135848/article/details/132589706