ffmpeg的简单使用

编程

ffmpeg -i test.mp4 -codec copy -bsf: h264_mp4toannexb -f h264 test.264

从MP4文件内提取视频流,忽略音频流,指定帧频、码率

ffmpeg -i test.mp4 -vcodec h264 -an -r 25 -b:v 256k test.264

显示文件的基本信息

ffprobe.exe -show_data test.264

以json格式显示文件基本信息

ffprobe -v quiet -print_format json -show_streams -i media6.mp4

ffmpeg -i video.mp4 -codec copy -vcodec h264 -an  video.h264

可用的编/解码器

ffmpeg -codecs

文件转换

ffmpeg -i input.mp3 -ar 16000 -f wav output.wav

 

ffmpeg支持的编码类型

在命令行里
$ ./configure --list-decoders
aasc
ac3
adpcm_4xm
adpcm_adx
adpcm_ct
adpcm_ea
adpcm_ea_maxis_xa
adpcm_ea_r1
adpcm_ea_r2
adpcm_ea_r3
adpcm_ea_xas
adpcm_g726
adpcm_ima_amv
adpcm_ima_dk3
adpcm_ima_dk4
adpcm_ima_ea_eacs
adpcm_ima_ea_sead
adpcm_ima_qt
adpcm_ima_smjpeg
adpcm_ima_wav
adpcm_ima_ws
adpcm_ms
adpcm_sbpro_2
adpcm_sbpro_3
adpcm_sbpro_4
adpcm_swf
adpcm_thp
adpcm_xa
adpcm_yamaha
alac
amv
ape
asv1
asv2
atrac3
avs
bethsoftvid
bfi
bmp
c93
cavs
cinepak
cljr
cook
cscd
cyuv
dca
dnxhd
dsicinaudio
dsicinvideo
dvbsub
dvdsub
dvvideo
dxa
eightbps
eightsvx_exp
eightsvx_fib
escape124
ffv1
ffvhuff
flac
flashsv
flic
flv
fourxm
fraps
gif
h261
h263
h263i
h264
huffyuv
idcin
imc
indeo2
indeo3
interplay_dpcm
interplay_video
jpegls
kmvc
liba52
libamr_nb
libamr_wb
libdirac
libfaad
libgsm
libgsm_ms
libschroedinger
loco
mace3
mace6
mdec
mimic
mjpeg
mjpegb
mmvideo
mp2
mp3
mp3adu
mp3on4
mpc7
mpc8
mpeg1video
mpeg2video
mpeg4
mpeg4aac
mpeg_xvmc
mpegvideo
msmpeg4v1
msmpeg4v2
msmpeg4v3
msrle
msvideo1
mszh
nellymoser
nuv
pcm_alaw
pcm_dvd
pcm_mulaw
pcm_s16be
pcm_s16le
pcm_s16le_planar
pcm_s24be
pcm_s24daud
pcm_s24le
pcm_s32be
pcm_s32le
pcm_s8
pcm_u16be
pcm_u16le
pcm_u24be
pcm_u24le
pcm_u32be
pcm_u32le
pcm_u8
pcm_zork
pcx
png
ptx
qdm2
qdraw
qpeg
qtrle
ra_144
ra_288
rawvideo
rl2
roq
roq_dpcm
rpza
rv10
rv20
sgi
shorten
smackaud
smacker
smc
snow
sol_dpcm
sonic
sp5x
sunrast
svq1
svq3
targa
theora
thp
tiertexseqvideo
tiff
truemotion1
truemotion2
truespeech
tscc
tta
txd
ulti
vb
vc1
vcr1
vmdaudio
vmdvideo
vmnc
vorbis
vp3
vp5
vp6
vp6a
vp6f
vqa
wavpack
wmav1
wmav2
wmv1
wmv2
wmv3
wnv1
ws_snd1
xan_dpcm
xan_wc3

原文链接:https://www.cnblogs.com/frisk/archive/2020/06/20/13167416.html

以上是 ffmpeg的简单使用 的全部内容, 来源链接: utcz.com/z/517641.html

回到顶部