ffplay -f s16le tcp://192.168.1.24:50047 -ar 44100 -ac 2 -channels 2
-f 指定格式PCM格式,可以用ffplay -sample_fmts查询
如下:
name depth
u8 8
s16 16
s32 32
flt 32
dbl 64
u8p 8
s16p 16
s32p 32
fltp 32
dblp 64
s64 64
s64p 64
le为小端,be为大端
可直接写入到TCP或者UDP中,如下为接收端
tcp://192.168.1.24:50047
-ar 设置采样率
-ac 设置通道数1为单通道,2为双通道