Data Audio Compression Lossless FLAC Format to Lossy Audio MP3 format with Huffman Shift Coding Algorithm

Similar documents
CHAPTER 10: SOUND AND VIDEO EDITING

FILE CONVERSION AFTERMATH: ANALYSIS OF AUDIO FILE STRUCTURE FORMAT

Fundamental of Digital Media Design. Introduction to Audio

Lecture #3: Digital Music and Sound

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

CS 074 The Digital World. Digital Audio

Comparison of Text Data Compression Using Run Length Encoding, Arithmetic Encoding, Punctured Elias Code and Goldbach Code

Lecture 16 Perceptual Audio Coding

So, what is data compression, and why do we need it?

Inserting multimedia objects in Dreamweaver

Compression; Error detection & correction

Compressed Audio Demystified by Hendrik Gideonse and Connor Smith. All Rights Reserved.

Application of Huffman Coding in Lossless Video Compression

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

Export Audio Mixdown

A Digital Audio Primer

Digital Audio Basics

AET 1380 Digital Audio Formats

COS 116 The Computational Universe Laboratory 4: Digital Sound and Music

COLOR IMAGE COMPRESSION USING DISCRETE COSINUS TRANSFORM (DCT)

Compression; Error detection & correction

Multimedia Data and Its Encoding

Data Representation. Reminders. Sound What is sound? Interpreting bits to give them meaning. Part 4: Media - Sound, Video, Compression

5: Music Compression. Music Coding. Mark Handley

UNDERSTANDING MUSIC & VIDEO FORMATS

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

Lecture Information Multimedia Video Coding & Architectures

Image and Video Coding I: Fundamentals

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

Skill Area 214: Use a Multimedia Software. Software Application (SWA)

08 Sound. Multimedia Systems. Nature of Sound, Store Audio, Sound Editing, MIDI

ITNP80: Multimedia! Sound-II!

COS 116 The Computational Universe Laboratory 4: Digital Sound and Music

Digital Audio. Amplitude Analogue signal

The following bit rates are recommended for broadcast contribution employing the most commonly used audio coding schemes:

OneClick Video Converter Free Version

Computing in the Modern World

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

Audio for Everybody. OCPUG/PATACS 21 January Tom Gutnick. Copyright by Tom Gutnick. All rights reserved.

2.4 Audio Compression

Elementary Computing CSC 100. M. Cheng, Computer Science

Chapter 1. Data Storage Pearson Addison-Wesley. All rights reserved

Lossy compression. CSCI 470: Web Science Keith Vertanen

Audio Fundamentals, Compression Techniques & Standards. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

Digital Media. Daniel Fuller ITEC 2110

Bits and Bit Patterns

Lossless Compression Algorithms

CS 335 Graphics and Multimedia. Image Compression

Introduction to LAN/WAN. Application Layer 4

3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.

Transporting audio-video. over the Internet

Lecture Information. Mod 01 Part 1: The Need for Compression. Why Digital Signal Coding? (1)

NUMBERS AND DATA REPRESENTATION. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

A New Compression Method Strictly for English Textual Data

Mobile Application of Video Watermarking using Discrete Cosine Transform on Android Platform

WIFI VS BLUETOOTH Bluetooth. Wi-Fi.

Keywords Data compression, Lossless data compression technique, Huffman Coding, Arithmetic coding etc.

Linked Structures Songs, Games, Movies Part IV. Fall 2013 Carola Wenk

OCR J276 GCSE Computer Science

University of Mustansiriyah, Baghdad, Iraq

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

Multimedia Networking ECE 599

Engineering Mathematics II Lecture 16 Compression

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

DIY Audio Rosanne Hutton, MindCross Training

2.1 Transcoding audio files

Computer Audio Setup Guide

General Computing Concepts. Coding and Representation. General Computing Concepts. Computing Concepts: Review

A Comparative Study of Entropy Encoding Techniques for Lossless Text Data Compression

Lossless Compression of Speech and Audio Signals, and Its Application ( 音声 音響信号の可逆符号化とその応用に関する研究 )

CS/COE 1501

Aud-X 5.1 Help.

计算原理导论. Introduction to Computing Principles 智能与计算学部刘志磊

VISUAL QUICKSTART GUIDE QUICKTIME PRO 4. Judith Stern Robert Lettieri. Peachpit Press

Binary representation and data

Principles of Audio Coding

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

Analysis of Parallelization Effects on Textual Data Compression

Audio-coding standards

For Mac and iphone. James McCartney Core Audio Engineer. Eric Allamanche Core Audio Engineer

Digital Music. You can download this file from Dig Music May

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

Data Representation. Types of data: Numbers Text Audio Images & Graphics Video

Networking Applications

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

Video Compression An Introduction

Volume 2, Issue 9, September 2014 ISSN

Sound 5 11/21/2016. Use MIDI and understand its attributes, especially relative to digitized audio.

Part 1 of 4. MARCH

Workshop W14 - Audio Gets Smart: Semantic Audio Analysis & Metadata Standards

Introduction to Computer Science (I1100) Data Storage

GCSE Computing. Revision Pack TWO. Data Representation Questions. Name: /113. Attempt One % Attempt Two % Attempt Three %

Optical Storage Technology. MPEG Data Compression

Image coding and compression

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

How Analog and Digital Recording and CDs Work Adapted from by Marshall Brain

Basic Compression Library

EE482: Digital Signal Processing Applications

Transcription:

206 Fourth International Conference on Information and Communication Technologies (ICoICT) Data Audio Compression Lossless FLAC Format to Lossy Audio MP3 format with Huffman Shift Coding Algorithm Luthfi Firmansah and Erwin Budi Setiawan 2 Computational Science Department Telkom University Bandung, Indonesia ituphie@gmail.com, 2 setiawanerwinbudi@gmail.com Abstract Nowadays, music has become a necessity. Technology in the field of music itself has been growing rapidly. It can be attested by the improvement of the quality of audio from generation to generation. As well as images and video data, audio data also require compression for storage and for the purposes of accessing the issues in real time. In the audio compression itself is almost similar to image compression, there are two kinds of audio data compression technique, which are lossy and lossless. For daily usage, lossy compression techniques are more widely used because the compression ratio is much larger compared to its original data, and any decline in the quality of audio data cannot be captured by the limitations of the human ear. One algorithm that can be used is Huffman, with the development of its algorithm is called Huffman Shift Coding. Huffman Shift Coding able to change any symbol held on audio data either lossy or lossless. Huffman Shift Coding method that has been tested, average compression ratio - 50% above. But the results of the compression of audio data cannot be played back, but the support of compression application itself. In this research, the author tries to make a compression application that can change the nature of lossless audio data into a lossy, where later the output of the compression process will be smaller in order to save storage issues, and also still can be played in various music players that is currently available. Keyword compression, Huffman Coding, audio, lossless audio, lossly audio I. INTRODUCTION Technology has been developing very rapidly, the human need for entertainment has been greatly improved in terms of quality. Including in the field of audio. The audio quality is good, to be one of satisfaction for the audience. There are so many audio formats available today. One fairly popular audio format is FLAC and MP3. In terms of quality, FLAC obviously better than MP3 [2]. However, in reality digital audio connoisseurs still use audio standard MP3 (MPEG- Audio Layer 3). Where this format is quite popular from the 90s until today. Since it is considered good enough quality, so there are many digital audio connoisseurs still use this MP3 format. If we compare with the MP3 format, FLAC format does take a fairly large room. If an Audio CD-quality audio data using a sampling rate of 44. khz, 6 bits per sample, 2 channel (stereo), then the total storage media audio data per second is about 76 400 bytes so for the duration of 60 seconds ( minute) required 0.584 Megabyte, If the average duration of the songs in about 4 minutes, then takes place about 40 Megabytes to store the audio data. This is surely a waste of hard disk storage media [6]. It is necessary compression techniques and specific algorithms. To change from the lossless be lossy, used Huffman algorithm that is widely used for other compression. Huffman algorithm works by coding in the form of data bits to represent the characters. This algorithm is less than the maximum if there are many variations of the symbol. To optimize Huffman algorithm for compression can be used Huffman Shift Coding that will divide into several blocks early symbol. So at this final project will be implemented by Huffman Shift Coding algorithm to perform lossless compression of audio files into audio files lossly while still taking into account the quality of the sound so that it remains a good compression results for the hearing. A. Digital Audio II. BASIC THEORY The voice that we hear everyday is an analog waveform. These waves came from an air pressure around us, which we can hear with the help of the eardrum. Like the image, a digital audio can be broken down into numbers that can then be processed [2]. Digitizing an audio data is performed by measuring a voltage at a lot of points in a vulnerable time, menejermahkan each measurement in the form of numbers and then write down the numbers in a file. This process is called sampling. B. Advantages of digital audio ISBN: 978--4673-9879-4 (c) 206 IEEE

The advantages of digital audio is perfect quality sound production. A perfect reproduction quality in question is its ability to reproduce the audio signal repeatedly without decreasing sound quality. Another advantage of digital audio is resistance to noise (unwanted signals). At the time of data transmission and processing of the electrical components, the analog signal is very easily occur in the form of noise disturbances., Hiss on the tape is one of the examples of the noise in the form of interference at high frequencies [7]. C. FLAC format FLAC or Free Lossless Audio Compression is designed specifically for audio compression and also supports audio streaming and data archival. FLAC is the brainchild of Josh Coalson developed in 999, which he started his FLAC project at Sourceforge site of the famous that with the release of the implementation of the FLAC format. Since then, many developers contribute to improve its implementation of this FLAC []. FLAC format utilizing the high correlation between samples in the audio data. FLAC uses linear prediction to convert the sample into a series of numbers and then called residuals. FLAC produce a compression ratio of 50% to 60%. D. Huffman Shift Coding Algorithm On Shift Huffman Coding, the symbol is divided into several blocks of the same size. Usually the block size is symbols, where k is a positive integer. If k =, then the Shift Huffman Coding Huffman same as Shift Coding Standard. The symbol of the first block to be encoded using Huffman Coding exactly standard. When encodes a symbol of the first block, were also coded symbol hypothesis frequency of occurrence equal to the number of frequency of occurrence of the symbols of the other blocks. The only difference between one block to the next block is then the result of the addition of the prefix encoding the hypothesis symbols used to mark each block. With Huffman Shift Coding algorithm, it could increase the use of less time and average - average length of the code more efficient. Broadly speaking, the following compression algorithms Huffman Coding Shift work:. Source Symbol arranged so that the possibilities that arise from the largest to the smallest. 2. The symbol of the first block will be encoded using Huffman Coding Standard. When encodes a symbol of the first block, were also coded symbol hypothesis frequency of occurrence equal to the number of frequency of occurrence of the symbols of the other blocks. The only difference between one block to the next block is the addition of one or more code prefix result of the encoding symbols to mark each block hypothesis. 3. Symbols hypothesis of Huffman coding, we think of as C.The total number of source symbols are divided into several blocks of symbols of the same size. 4. The second symbol of the code block is coupled with the symbol of all I first block of Huffman Coding. There are differences in the formation of the tree Huffman Coding Shift this. As shown in the following figure. Value : A = 0,4 B = 0,3 C = 0,2 D = 0, Fig.. Huffman Shift Coding process E. FFMPEG So that the output of the compression process can be played, it takes a plugin. One is the use FFMPEG. FFMPEG is a computer program that can record, convert and stream digital audio and video in various formats. FFMPEG is a command line application that consists of a collection of free software libraries. The project was started by Fabrice Bellard, and is currently maintained by Michael Niedermayer [0]. In making this application, FFMPEG itself assists in the compression process in which his later output of the compression process is still playable. Each byte and metadata are also changed by the help of this FFMPEG. FFMPEG also supports streams from layer 3 which is like a standard layer which is owned by MP3. III. SYSTEM DESIGN In this part, the performance of system consist of data preprocessing, training, and testing step. In this research, we used KDD Cup 999 data which is extracted by DARPA (Defense Advanced Research Protects Agency). DARPA make corporation with MIT in collecting data which is consist 4 attribute, attribute class, and 2593 number of record data. In dataset KDD Cup 999, there are 3 nominal attribute, 6 binary nominal attribute, and 32 numerical attribute. It also have 5 class, those are Dos, R2L, U2R, Probe, Normal. A. Preprocessing In this step, we will design an application that can perform data compression is also known as an audiodata compression which has the goal of reducing the size of the data so that in addition to saving storage and easy transfer in

the network such as the Internet, for example. For the compression process itself, exclusively to audio files of type FLAC (Free Lossless Audio Codec) and specified output is MP3 only supports a maximum number of channels 2 pieces channel (mono and stereo). In general, an audio file is digital data in the form of representation on the bit '0' and ''. Often in a looping file data or redundancy occurs. All methods of compression compacting against the repetitive data. As is known, the type of compression algorithm is divided into lossless compression and lossy compression. In lossly compression no data is lost but not much after the data is compressed. Data compression lossy compression if returned then the results will not exactly match the original data. In contrast to lossy compression, the lossless compression no data is lost after the compression process and data such as the data can be restored to normal. To start the compression process, the user can press a button Mulai Convert to begin the process of compression of each FLAC files one by one. There will be featuring a special form of application for compression. In order that we process the results of compression can be played back without having to decompress, then in this application is supported by FFMPEG plugin stored in the folder "bin" in the project that we create. The plugin is already a form of execute that easily do the execution of the program. The plugin can easily get it from the official website FFMPEG. Here's the view of the form to do the compression. In the application there is also a feature to analyze a FLAC file. Where the file will display some information and can be played for later analysis. This feature is made in a form different from the main menu, and can be run when we click Analisa File. When the form appears, the main menu can not be used and will look like the picture below. a. System Implementation To make this system, we use Visual Studio 203 applications that run on the Windows operating system. Visual Studio itself until now developed by Microsoft. To run the program, they need to run their media. Both the hardware and software. b. How to Use To run the program, we using Visual Studio 203 that is installed on your computer or on a program AudioConverter.exe located at our destination to save the final result of the source code are made. Here's the view of the application interface Fig. 3. Compression Process form IV. TESTING AND ANALYSIS To find out the results of testing this audio file compression program with Shift Huffman coding algorithms that have been implemented, with the testing for multiple audio file formats FLAC. FLAC is tested having varying sizes and had to be checked against the FLAC file with a high degree of originality. It is expected that output's product still to play well. Checks are carried out by Spectro application that has the look spectrogram and is able to read how much an original audio data with the results of his original recordings. Fig. 2. Main Display

Fig. 4. FLAC analysis form The results of testing and training with the depth of the tree to the model can be seen in the Table, Table 2 and Table 3. TABLE I. No IDENTITY DATA AUDIO FLAC FORMAT File Audio Name Originali ty(%) Size (megabyte) Acclaim.flac 72 38,22 2 Almost Easy.flac 73 28,99 3 Scream.flac 74 36,00 4 Dear God.flac 7 46,99 5 6 7 8 9 0 2 3 4 5 Shake It Off - Taylor Swift.flac Jealous - Nick Jonas.flac Centuries - Fall Out Boy.flac Animals - Maroon 5.flac Time Of Our Lives Pitbull.flac Ghost - Ella Henderson.flac Elastic Heart Sia.flac Heroes (We Could Be) Alesso.flac I Lived OneRepublic.flac Prayer in C - Lilly Wood.flac She Knows - Ne- Yo.flac TABLE II. 73 27,02 73 27,4 76 29,53 72 28,03 72 27,89 73 26,68 7 3,08 79 28,5 7 28,24 7 22,77 76 28,34 THE COMPRESSION RESULT No File Audio Name Size (megabyte) Compress ion Time (second) Acclaim.mp3 2,39 2 2 Almost Easy.mp3,77 9 3 Scream.mp3 2,9 4 Dear God.mp3 2,99 5 5 Shake It Off - Taylor Swift.mp3,66 8 6 Jealous - Nick Jonas.mp3,68 9 I. 7 8 9 0 2 3 4 5 Centuries - Fall Out Boy.mp3 Animals - Maroon 5.mp3 Time Of Our Lives - Pitbull.mp3 Ghost - Ella Henderson.mp3 Elastic Heart - Sia.mp3 Heroes (We Could Be) - Alesso.mp3 I Lived - OneRepublic.mp3 Prayer in C - Lilly Wood.mp3 She Knows - Ne- Yo.mp3 TABLE III. Audio Name,73 9,74 9,74 0,94 8,96,59 8,78 9,43 7,67 9 COMPARISON COMPRESSION PROCESS After Compression Size (byte) 2 3 Acclaim.flac 2,5,339 2,5,339 2,5,33 Animals - Maroon 5.flac Elastic Heart - Sia.flac,827,558,827,558,827,55 2,060,52 2,060,52 2,060,5 V. CONCLUSION Based on research, it can be concluded as follows:. The processing speed depends not only on the number of audio files in the process, but it also depends on the size of the file and also of how many processes are running at the same time the application is run 2. The process of compression of the application is static. Because although used and tested with the same audio file repeatedly, still have the results out of the same size. 3. The output of this application, can be played in the back with the features contained in this application even though third-party applications because it has a standard audio formats like MP3 stream in general. 4. Range change of audio files tested, have a percentage change of 93.79% and its output becomes 6.2% of the initial size FLAC audio file being tested. REFRENCES [] Solomon, D. (202). Data Compression The Complete Reference : Fourth Edition. Northridge, California: David Solomon. [2] Daryanto, T. (2005). Sistem Multimedia dan Aplikasinya. Yogyakarta: Graha Ilmu. [3] Bagus, Galang Prasetyo (203). Kompresi File Audio Wave Menggunakan Algortima Huffman Shift Coding. Universitas Brawijaya, Malang.

[4] Yenny. (2004). Kompresi File Wave Dengan Algoritma Huffman. STMIK Mikroskil, Medan. [5] Xiph.Org Foundation. "FLAC Format". [Online]. Available : https://xiph.org/flac/ [Accessed October, 2nd 204] [6] Benjamin, A. (200). Music Compression Algorithms and Why You Should Care. Alexander Benjamin. [7] Angga, Teknik Kompresi Lossless dan Lossy pada Audio, January 23th 203 [Online]. Available : http://bangkitagp.wordpress.com/203/0/23/teknik-kompresi-losslessdan-lossy-pada-audio/ [Accessed 8 Oktober 204] [8] Adhitama, Gagarin. (2009). Perbandingan Algoritma Huffman dengan Algoritma Shannon-Fano. Institut Teknologi Bandung, Bandung. [9] Wilson, R. (2007). Rancang Bangun Perangkat Lunak Komposer Musik Menggunakan MATLAB. Fakultas Teknik Universitas Indonesia, Depok. [0] Rongshan Yu, X. L. (2004). A Scalable Lossy to Lossless Audio Coder For MPEG-4 Lossless Audio Coding. National University of Singapore, Singapore. [] Hacker, S. Inside the MP3 Codec [Online]. Available : http://www.mp3-converter.com/mp3codec/huffman_coding.htm [Accessed October, 22th 204]