1.播放音視頻命令格式
ffplay [options] [input_url]
2.播放pcm原始音頻數(shù)據(jù)
ffplay -f s16le -ac 2 -ar 44100 song.pcm
- -f:指定pcm數(shù)據(jù)的格式爸吮,s16se(signed 16 bits little endian, 有符號(hào) 16 位小端)
- ac:指定音頻聲道數(shù)量
- ar:指定音頻采樣頻率
3.播放MP3
ffplay song.mp3
4.播放yuv原始視頻數(shù)據(jù)
ffplay -f rawvideo -pixel_format yuv420p -s 480*480 texture.yuv
- -f:指定原始視頻數(shù)據(jù)
- -pixel_format:指定像素格式
- -s:指定圖像分辨率