Vous êtes sur la page 1sur 36

Performance Analysis and Comparison of H.

264 based on JM and FFMPEG Softwares

Guided by Dr K.R.Rao

By Kiran Jonnavittula

What Exactly Is 'Codec'?


"Codec" is a technical name for "coder/decoder". It also stands for "compressor/decompressor. It is a computer program(realized on a hardware and software) that both shrinks large movie files, and makes them playable on computer/ devices. Codec programs are required for the media player to play audio/video files.

Why codecs?
Because video and music files are large, they become difficult to transfer across the Internet quickly. To help speed up downloads, mathematical "codecs" were built to encode ("shrink") a signal for transmission and then decode it for viewing or editing, and also for storage purposes. A video codec is a device or software that enables video compression and/or decompression for digital video.

Complexity of a codec is decided by factors such as


the quantity of the data needed to represent it (also known as the bit rate). the complexity of the encoding and decoding algorithms. robustness to data losses and errors, ease of editing. the state of the art of compression algorithm design and end-to-end delay

Introduction of H.264 [8]


H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video compression[4]. Purpose of H.264:
Higher coding efficiency than previous standards, MPEG-1,2,4 part 2, H.261, H.263[4]. Simple syntax specifications. Various applications like video broadcasting, video streaming, video conferencing, D-Cinema, HDTV Balance between coding efficiency, implementation complexity and cost - based on state-of the-art in VLSI design technology.

H.264 block coding structure Encoder

Fig1: H.264 macro block coding [4]

Decoder
Bitstream Input Entropy Decoding Inverse Quantization & Inverse Transform + Deblocking Filter Video Output +

Intra/Inter Mode Selection

Picture Buffering

Intra Prediction

Motion Compensation

Fig2: H.264 decoder block [4]

Profiles of H.264

Fig3: H.264 profiles [4]

Specific coding schemes of profiles

Fig4: H.264 coding profile schemes [4]

Cif and Qcif sequences


CIF (Common International Format), also known as FCIF (Full Common Intermediate Format), is a format used to standardize the horizontal and vertical resolutions in pixels of YCbCr sequences in video signals, commonly used in video teleconferencing systems. QCIF means "Quarter CIF". To have one fourth of the area as "quarter" implies the height and width of the frame are halved. The differences in Y, Cb and Cr of cif and qcif are as shown below in figure 4a.[16]

Figure 4a: 4:2:0 format of cif and qcif.

H.264/MPEG-4 AVC codecs


x264: A GPL-licensed implementation of the H.264 video standard. x264 is only an encoder[6] Nero Digital: Commercial MPEG-4 ASP and AVC codecs developed by Nero AG.[3] QuickTime H.264: H.264 implementation released by Apple.[3] DivX Pro Codec: An H.264 decoder and encoder was added in version 7.[3] JM software FFMpeg

FFMPEG
Fast Forwarding Mpeg. Ffmpeg 0.6.1. FFmpeg is a free software / open source project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files Download the source code, link the files, build and get the required excecutable. [1]

FFMPEG syntax
ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile} Default Profile: Main Profile

Figure 5 : Command prompt of FFMPEG.

JM Software
Current software version 17.2 Modify .config file based on each Profile:
encoder_baseline.cfg encoder.cfg encoder_main.cfg encoder_extended.cfg [3]

JM commands
Access lencode.exe and appropriate config file. Change the config file parameters such as quantization parameter, number of frames to be encoded etc.
Figure 6 : Command prompt of JM software.

FFMPEG Calculations For Akiyo_Qcif


Quantization Encoding parameter Time(seconds) PSNR(dB)
2 5 10 20 25 31 2.4 2.4 2.4 2.4 2.4 2.4 44.67 38.95 34.7 31.04 29.91 28.23

SSIM 0.9892 0.9686 0.9293 0.8659 0.8419 0.8122

Compression Decoding Bit Rates (kbps) Ratio Time(seconds)


226.9 95 50.2 27.7 24 22.7 167.74 400.64 562.87 671.67 771.8 893.87 2.4 2.4 2.4 2.4 2.4 2.4

Table1: Akiyo_Qcif calculations using ffmpeg.

JM Software Calculations for Akiyo_Qcif


Quantization Encoding parameter Time(seconds) PSNR(dB) 2 6 101.639 93.793 62.518 55.275 Bit Rates Compressio Decoding (Kbps) n Ratio Time(seconds) 4710.57 3728.6 3.071 5.461 4.88 4.975

SSIM 0.995 0.993

10
28 40 51

38.428
35.715 34.04 33.082

51.832
38.431 29.836 12.79

0.9975
0.9722 0.8609 0.3909

1292.51
204.14 66.05 12.76

7.058
44.202 137.518 618.833

4.471
2.727 2.102 1.204

Table2: Akiyo_Qcif calculations using JM software.

FFMPEG Calculations for Bus_Cif


Quantization Encoding parameter Time(seconds) PSNR (Y)
2 2.4 41.7

SSIM 0.9861

Bit Rates Compression Decoding (kbps) Ratio Time(seconds)


5510.4 5.67 2.4

3
4 6 10 20 30 31

2.4
2.4 2.4 2.4 2.4 2.4 2.4

39.1
36.99 34.2 30.97 27.01 24.99 24.84

0.9755

3696

7.562
9.975 15.452 27.575 63.984 103.67 107.763

2.4
2.4 2.4 2.4 2.4 2.4 2.4

0.96422 2802.3 0.9392 0.8889 0.7853 0.7075 0.7033 1807 1010.7 434.8 268.1 258.4

Table3: Bus_cif calculations using ffmpeg.

JM Calculations for Bus_Cif


Quantization Encoding PSNR parameter Time(seconds) (Y) SSIM Bit Rates Compression Decoding (Kbps) Ratio Time(seconds)

1313.604

64.735

0.995

16857.59

1.987

30.77

1211.569

55.792

0.993

12825.1

2.614

25.088

20

1141.293

42.57

0.965

3626.32

9.246

15.59

40

1163.053

26.759

0.867

193.94

170.625

3.754

50

1055.155

20.722

0.386

48.48

682.5

4.141

Table4: Bus_cif calculations using JM software.

File Name : Bus_cif.yuv Number of Frames : 60

QP vs PSNR for bus_cif


70 60 50 PSNR in DB 40 30 20 10 FFMPEG JM

0
0 10 20 30 Quantization Parameter 40 50 60

Figure7 : Plot of quantization parameter versus PSNR for bus_cif sequence.

File Name : Bus_cif.yuv Number of Frames : 60

QPvs SSIM for bus_cif


1.2

0.8 SSIM

0.6

FFMPEG

JM
0.4

0.2

0 0 10 20 30 40 50 60 Quantization Parameter

Figure8 : Plot of quantization parameter versus SSIM for bus_cif sequence.

File Name : Bus_cif.yuv Number of Frames : 60

Bitrate vs QP for bus_cif


18000
16000 14000 12000 Bit Rates in Kbps 10000 8000 6000 4000 2000 0 -2000 0 10 20 30 40 Quantization Parameter 50 60 FFMPEG JM

Figure9 : Plot of quantization parameter versus bit rate for bus_cif sequence.

File Name : Bus_cif.yuv Number of Frames : 60

Encoding Time Bus_cif


10000

Encoding TIme in Seconds Log10 Scale

1000

100

FFMPEG JM

10

10

20

30

40

50

60

Quantization Parameter

Figure10 : Plot of quantization parameter versus encoding time for bus_cif sequence.

File Name : Bus_cif.yuv Number of Frames : 60

Compression Ratio vs QP for Bus_cif


800 700 600 Compression Ratio 500 400 FFMPEG 300 200 100 0 0 -100 10 20 30 Quantization Parameter 40 50 60 JM

Figure11 : Plot of quantization parameter versus compression ratio for bus_cif sequence.

File Name : Bus_cif.yuv Number of Frames : 60

Decoding Time vs QP for bus_cif


100

Decoding Time in Seconds Log10 scale

10

FFMPEG

JM

1 0 10 20 30 Quantization Parameter 40 50 60

Figure12 : Plot of quantization parameter versus decoding time for bus_cif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

PSNR vs QP for Akiyo_qcif


70

60
50 PSNR in Db 40 30 20 10 0 0 10 20 30 Quantization Parameter 40 50 60 FFMPEG JM

Figure13 : Plot of quantization parameter versus PSNR for Akiyo_qcif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

SSIM vs QP for Akiyo_qcif


1.2

0.8 SSIM

0.6

FFMPEG JM

0.4

0.2

0 0 10 20 30 Quantization Parameter 40 50 60

Figure14 : Plot of quantization parameter versus SSIM for Akiyo_qcif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

Bit Rate vs Qp for Akiyo_qcif


10000

1000 Bit Rates in kbps log10 Scale

100

FFMPEG JM

10

1 0 10 20 30 Quantization Parameter 40 50 60

Figure15 : Plot of quantization parameter versus bit rates for Akiyo_qcif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

Comression Ratio vs Q for Akiyo_qcif


1000 900 800 Compression Ratio 700 600 500 400 FFMPEG JM

300
200 100 0 0 10 20 30 Quantization Parameter 40 50 60

Figure16 : Plot of quantization parameter versus compression ratio for Akiyo_qcif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

Encoding Time vs QP for Akiyo_qcif


1000

Encoding Time in Seconds log10 scale

100

FFMPEG 10 JM

1 0 10 20 30 Quaization Parameter 40 50 60

Figure17 : Plot of quantization parameter versus encoding time for Akiyo_qcif sequence.

File Name : Akiyo_qcif.yuv Number of Frames : 60

Decoding Time vs QP for Akiyo_qcif


6
5 Decoding Time in Seconds

FFMPEG JM

0 0 10 20 30 Quantization Parameter 40 50 60

Figure18 : Plot of quantization parameter versus decoding time for Akiyo_qcif sequence.

Focus and progress of Project


Performance Analysis and Comparison of H.264 on JM and FFMPEG Softwares.
Encoding time Bit Rates. Compression ratio. PSNR(peak-peak Signal to Noise Ratio). SSIM(structural similarity Index metric)-for ffmpeg. Decoding time.

Conclusion
Parameter Analyzed Encoding time. Qcif FFMPEG offers faster encoding time than JM software. Cif FFMPEG offers faster encoding time than JM software.

Bit rates.
Compression ratio.

FFMPEG offers lower bit rates than JM software.


FFMPEG offers higher compression ratio.

FFMPEG offers lower bit rates than JM software.


FFMPEG offers higher compression ratio at lower QP.

PSNR.

JM offers better PSNR than JM offers better PSNR than FFMPEG FFMPEG. FFMPEG offers better SSIM FFMPEG offers better SSIM that JM. that JM. FFMPEG offers faster decoding time than JM software. FFMPEG offers faster decoding time than JM software.

SSIM.

Decoding Time.

Table5: Conclusion and analysis.

Conclusion of H.264 benchmarks


JM Reference Codec Is the official reference encoder and decoder of the H.264/AVC standardization bodies. It implements all the features of the standard (all profiles and levels), but it is designed for describing and verifying the standard, and it exhibits very low performance. It is not recommended for computer architecture or compiler evaluations. [14]

Conclusion of H.264 benchmarks


FFmpeg H.264 decoder Includes a H.264/AVC encoder-decoder that implements most of the features of the main and high profiles of the standard. The code is very optimized and include MMX/SSE and Altivec SIMD instructions for the most time consuming kernels. It is widely used in free multimedia players like MPlayer, VideoLAN, Xine and others. [14]

References
1. 2. 3. 4. 5. 6. 7. 8. http://ffmpeg.org/ - FFMPEG source code. http://www.ffmpeg.org/ffmpeg-doc.html - FFMPEG commands documentation. http://iphome.hhi.de/suehring/tml/ - JM software source code https://helixcommunity.org developers guide. D. Marpe, T. Wiegand and G. J. Sullivan, The H.264/MPEG-4 AVC standard and its applications, IEEE Communications Magazine, vol. 44, pp. 134-143, Aug. 2006 Joint Video Team (JVT) of ISO/IEC MPEG & ITU-T VCEG (ISO/IEC JTC1/SC29/WG11 and ITU-T SG16 Q.6), 16th Meeting: Poznan, Poland, 24-29 July, 2005. Soon-kak Kwon, A. Tamhankar and K.R. Rao Overview of H.264 / MPEG-4 Part 10, J. Visual Communication and Image Representation, vol. 17, pp.186-216, April 2006. The H.264 Advanced Video Compression Standard, Iain E. Richardson, Wiley publications, Second Edition, Copyright 2010 John Wiley & Sons, Ltd. T. Wiegand, et al Overview of the H.264/AVC video coding standard, IEEE Trans. on circuits and systems for video technology, vol. 13, pp. 560-576, July 2003. P. N. Tudor, MPEG-2 video compression, Electronics \& communication engineering journal, vol. 7, pp. 257-264, 2005. K. V. S. Swaroop, and K. R Rao, Performance Analysis and Comparison of JM 15.1 and Intel IPP H.264 Encoder and Decoder, IEEE 2010 42nd Southeastern Symposium on System Theory (SSST), pp. 371-375, 2010. G. Sullivan, et al The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions. Proceedings of SPIE - The International Society for Optical Engineering, vol. 5558, pp. 454-474, Applications of Digital Image Processing XXVII , 2004. Video Sequences : http://trace.eas.asu.edu/yuv/ http://personals.ac.upc.edu/alvarez/hdvideobench/node3.html - H.264 benchmarks summarization and their applications. http://www.ece.uwaterloo.ca/~z70wang/research/ssim/ - SSIM reference. S.Kwon, A. Tamhankar and K.R. Rao, Overview of H.264 / MPEG-4 Part 10, J. Visual Communication and Image Representation, vol. 17, pp.186-216, April 2006.

9.
10. 11. 12.

13. 14. 15. 16.

Vous aimerez peut-être aussi