熟悉多种视频标准,如h.264, MPEG-2/MPEG-4, AVS.
全部博文(47)
分类: LINUX
2014-01-27 16:51:00
decoding_encoding
[root@localhost examples]# pwd
/home/ffmpeg_sources/ffmpeg-2.1.1/doc/examples
[root@localhost examples]# make
[root@localhost examples]# decoding_encoding h264
Encode video file test.h264
[libx264 @ 0x88ee020] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x88ee020] profile High, level 1.3
Write frame 13 (size= 2037)
Write frame 14 (size= 607)
Write frame 15 (size= 118)
Write frame 16 (size= 802)
Write frame 17 (size= 193)
Write frame 18 (size= 881)
Write frame 19 (size= 1243)
Write frame 20 (size= 852)
Write frame 21 (size= 1231)
Write frame 22 (size= 661)
Write frame 23 (size= 2786)
Write frame 24 (size= 1003)
Write frame 25 (size= 691)
Write frame 26 (size= 825)
Write frame 27 (size= 615)
Write frame 28 (size= 780)
Write frame 29 (size= 798)
Write frame 30 (size= 1127)
Write frame 31 (size= 713)
Write frame 32 (size= 686)
Write frame 33 (size= 2765)
Write frame 34 (size= 1161)
Write frame 35 (size= 1211)
Write frame 36 (size= 666)
Write frame 37 (size= 751)
[libx264 @ 0x88ee020] frame I:3 Avg QP:23.06 size: 2529
[libx264 @ 0x88ee020] frame P:12 Avg QP:20.18 size: 918
[libx264 @ 0x88ee020] frame B:10 Avg QP:23.95 size: 660
[libx264 @ 0x88ee020] consecutive B-frames: 20.0% 80.0%
[libx264 @ 0x88ee020] mb I I16..4: 77.9% 12.0% 10.2%
[libx264 @ 0x88ee020] mb P I16..4: 76.1% 1.1% 0.2% P16..4: 21.8% 0.6% 0.2% 0.0% 0.0% skip: 0.0%
[libx264 @ 0x88ee020] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 22.9% 0.6% 0.0% direct:11.6% skip:64.8% L0:15.7% L1:54.2% BI:30.1%
[libx264 @ 0x88ee020] final ratefactor: 13.84
[libx264 @ 0x88ee020] 8x8 transform intra:4.0% inter:62.4%
[libx264 @ 0x88ee020] direct mvs spatial:0.0% temporal:100.0%
[libx264 @ 0x88ee020] coded y,uvDC,uvAC intra: 5.4% 28.9% 6.3% inter: 2.1% 44.1% 8.5%
[libx264 @ 0x88ee020] i16 v,h,dc,p: 0% 0% 0% 100%
[libx264 @ 0x88ee020] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 33% 10% 48% 0% 0% 0% 0% 0%
[libx264 @ 0x88ee020] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 6% 12% 59% 0% 5% 2% 7% 1%
[libx264 @ 0x88ee020] i8c dc,h,v,p: 1% 7% 5% 87%
[libx264 @ 0x88ee020] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x88ee020] ref P L0: 97.6% 0.7% 1.4% 0.1% 0.1%
[libx264 @ 0x88ee020] ref B L0: 36.7% 37.9% 23.3% 2.1%
[libx264 @ 0x88ee020] kb/s:201.62
[root@localhost examples]# ls
decoding_encoding demuxing.o filtering_video.c metadata.o README scaling_video.c
decoding_encoding.c filtering_audio filtering_video.o muxing resampling_audio scaling_video.o
decoding_encoding.o filtering_audio.c Makefile muxing.c resampling_audio.c tags
demuxing filtering_audio.o metadata muxing.o resampling_audio.o test.h264
demuxing.c filtering_video metadata.c pc-uninstalled scaling_video
生成视频test.h264文件
[root@localhost examples]# decoding_encoding mp2
Encode audio file test.mp2
Decode audio file test.mp2 to test.sw
[root@localhost examples]# ls
decoding_encoding demuxing.o filtering_video.c metadata.o README scaling_video.c test.sw
decoding_encoding.c filtering_audio filtering_video.o muxing resampling_audio scaling_video.o
decoding_encoding.o filtering_audio.c Makefile muxing.c resampling_audio.c tags
demuxing filtering_audio.o metadata muxing.o resampling_audio.o test.h264
demuxing.c filtering_video metadata.c pc-uninstalled scaling_video test.mp2
生成音频test.mp2文件和test.sw,即MPEG-1 layer2
[root@localhost examples]# decoding_encoding mpg
[root@localhost examples]# ls
decoding_encoding filtering_audio.c metadata.c resampling_audio test00.pgm test07.pgm test14.pgm test21.pgm test.sw
decoding_encoding.c filtering_audio.o metadata.o resampling_audio.c test01.pgm test08.pgm test15.pgm test22.pgm
decoding_encoding.o filtering_video muxing resampling_audio.o test02.pgm test09.pgm test16.pgm test23.pgm
demuxing filtering_video.c muxing.c scaling_video test03.pgm test10.pgm test17.pgm test24.pgm
demuxing.c filtering_video.o muxing.o scaling_video.c test04.pgm test11.pgm test18.pgm test.h264
demuxing.o Makefile pc-uninstalled scaling_video.o test05.pgm test12.pgm test19.pgm test.mp2
filtering_audio metadata README tags test06.pgm test13.pgm test20.pgm test.mpg
生成视频MPEG-1 文件test.mpg 和多个pgm文件