今天我们学常用命令分类中的基本查询命令:
下面我们看看几个命令
File formats:
D. = Demuxing supported
.E = Muxing supported
--
D 3dostr 3DO STR
D 4xm 4X Technologies
D aa Audible AA format files
D aac raw ADTS AAC (Advanced Audio Coding)
D ac3 raw AC-3
D acm Interplay ACM
D act ACT Voice file format
D adf Artworx Data Format
D adp ADP
D ads Sony PS2 ADS
D adx CRI ADX
D aea MD STUDIO audio
D afc AFC
D aiff Audio IFF
D aix CRI AIX
D alaw PCM A-law
D alias_pix Alias/Wavefront PIX image
D alp LEGO Racers ALP
ffmpeg -muxers
ffmpeg -muxers | more
File formats:
D. = Demuxing supported
.E = Muxing supported
--
E 3g2 3GP2 (3GPP2 file format)
E 3gp 3GP (3GPP file format)
E a64 a64 - video for Commodore 64
E ac3 raw AC-3
E adts ADTS AAC (Advanced Audio Coding)
E adx CRI ADX
E aiff Audio IFF
E alaw PCM A-law
E amr 3GPP AMR
E apng Animated Portable Network Graphics
E aptx raw aptX (Audio Processing Technology for Bluetooth)
E aptx_hd raw aptX HD (Audio Processing Technology for Bluetooth)
E asf ASF (Advanced / Active Streaming Format)
E asf_stream ASF (Advanced / Active Streaming Format)
E ass SSA (SubStation Alpha) subtitle
E ast AST (Audio Stream)
E au Sun AU
C++音视频开发学习资料:点击领取→音视频开发(资料文档+视频教程+面试题)(FFmpeg+WebRTC+RTMP+RTSP+HLS+RTP)
ffmpeg -devices
Devices:
D. = Demuxing supported
.E = Muxing supported
--
D avfoundation AVFoundation input device
D lavfi Libavfilter virtual input device
E sdl,sdl2 SDL2 output deviceffmpeg -codecs
Codecs:
D..... = Decoding supported D表示解码器
.E.... = Encoding supported E表示编码器
..V... = Video codec V:视频编解码
..A... = Audio codec A:音频编解码
..S... = Subtitle codec S:字幕
...I.. = Intra frame-only codec I:帧内预测压缩编码
....L. = Lossy compression L :有损压缩
.....S = Lossless compression S:无损压缩
-------
D.VI.S 012v Uncompressed 4:2:2 10-bit
D.V.L. 4xm 4X Movie
D.VI.S 8bps QuickTime 8BPS video
.EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi )
.EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 )
D.V..S aasc Autodesk RLE
D.V.L. agm Amuse Graphics Movie
D.VIL. aic Apple Intermediate Codec
DEVI.S alias_pix Alias/Wavefront PIX image
DEVIL. amv AMV Video
D.V.L. anm Deluxe Paint Animation
我们查找一下264编码
ffmpeg -codecs | grep 264
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb h264_videotoolbox )ffmpeg -formats
File formats:
D. = Demuxing supported
.E = Muxing supported
--
D 3dostr 3DO STR
E 3g2 3GP2 (3GPP2 file format)
E 3gp 3GP (3GPP file format)
D 4xm 4X Technologies
E a64 a64 - video for Commodore 64
D aa Audible AA format files
D aac raw ADTS AAC (Advanced Audio Coding)
DE ac3 raw AC-3
D acm Interplay ACM
D act ACT Voice file format
D adf Artworx Data Format
D adp ADP
D ads Sony PS2 ADS
E adts ADTS AAC (Advanced Audio Coding)
DE adx CRI ADX
D aea MD STUDIO audio
D afc AFC
DE aiff Audio IFF
查看是否支持MP3格式
ffmpeg -formats | grep mp3
DE mp3 MP3 (MPEG audio layer 3)ffmpeg -bsfs
Bitstream filters:
aac_adtstoasc
av1_frame_merge
av1_frame_split
av1_metadata
chomp
dump_extra
dca_core
eac3_core
extract_extradata
filter_units
h264_metadata
h264_mp4toannexb
h264_redundant_pps
hapqa_extract
hevc_metadata
hevc_mp4toannexb
imxdump
mjpeg2jpeg
mjpegadump
mp3decomp
mpeg2_metadata
mpeg4_unpack_bframes
mov2textsub
noise
null
opus_metadata
pcm_rechunk
prores_metadata
remove_extra
text2movsub
trace_headers
truehd_core
vp9_metadata
vp9_raw_reorder
vp9_superframe
vp9_superframe_split
avfoundation库下支持的设备
[AVFoundation indev @ 0x7fb857609780] AVFoundation video devices:
[AVFoundation indev @ 0x7fb857609780] [0] FaceTime高清摄像头(内建)
[AVFoundation indev @ 0x7fb857609780] [1] Capture screen 0
[AVFoundation indev @ 0x7fb857609780] AVFoundation audio devices:
[AVFoundation indev @ 0x7fb857609780] [0] 外置麦克风
[AVFoundation indev @ 0x7fb857609780] [1] MacBook Pro麦克风4.播放视频
ffmpeg -video_size 2880x1800 -pixel_format uyvy422 out.yuv
5.播放音频
ffmpeg out.wav

分解与复用
抽取视频
C++音视频开发学习资料:点击领取→音视频开发(资料文档+视频教程+面试题)(FFmpeg+WebRTC+RTMP+RTSP+HLS+RTP)
抽取音频
提取RGB
ffmpeg -i input.mp4 -pixel_format rgb24 out.rgb
RGB和YUV之间的转换
ffmpeg -pixel_format yuv420p -video_size 960x544 -i input.yuv -pixel_format rgb24 out.rgb
抽取PCM
ffmpeg -i input.mp4 -vn -ar 44100 -ac 2 -f s16le out.pcm
播放pcm ffplay -ar 44100 -ac 2 -f s16le out.pcm
抽取YUV
ffmpeg -i input.mp4 -an -vcodec rawvideo -pixel_format yuv420p out.yuv抽取PCM
ffmpeg -i input.mp4 -vn -ar 44100 -ac 2 -f s16le out.pcm
在学滤镜命令之前 我们先了解一下分解与复用过程

分解与复用
滤镜实际上是对解码后的数据帧进行滤镜处理 过程如下:

裁剪命令
裁剪命令
合并命令
视频转图片
图片转视频
拉流命令
| 留言与评论(共有 0 条评论) “” |