首页 > 代码库 > ubuntu14.04 yuv文件的播放及视频信息的查看

ubuntu14.04 yuv文件的播放及视频信息的查看

1.安装ffmpeg

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg

How to install FFmpeg on Ubuntu 14.04 - FAQforge

2.运行ffplay

ffplay -f rawvideo -video_size 352x288 FOREMAN_352x288_30_orig_01_yuv

ffplay播放yuv文件命令

 

3.查看h.264文件信息

ffmpeg -show_streams -count_frames -pretty *.264 | grep nb_read_frames

ffmpeg - Count frames in H.264 bitstream - Stack Overflow

 

4.获取文件传输时长

ffmpeg -show_streams -count_frames -pretty *.264 | grep nb_read_frames

NUMBER_OF_FRAMES / FPS = DURATION_IN_SECONDS

c - How can i know the duration of any h264 file? - Stack Overflow

 

ubuntu14.04 yuv文件的播放及视频信息的查看