• Save
Audio Conversions PHP
Upcoming SlideShare
Loading in...5
×
 

Audio Conversions PHP

on

  • 1,132 views

Learn how to compress audio files with PVAudio and compress audio files.

Learn how to compress audio files with PVAudio and compress audio files.

Statistics

Views

Total Views
1,132
Views on SlideShare
1,113
Embed Views
19

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 19

http://www.prodigyview.com 18
http://prodigyview.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Audio Conversions PHP Audio Conversions PHP Presentation Transcript

    • Audio Conversion www.prodigyview.com
    • OverviewObjectiveLearn how to convert audio files using PVAudio classRequirements Installed version of ffmpeg Understanding of ffmpeg from the ffmpeg tutorial Understanding of the definesEstimated Time10 minutes www.prodigyview.com
    • Follow Along With A Code Example1. Download a copy of the example code at www.prodigyview.com/source.2. Install the system in an environment you feel comfortable testing in.3. Proceed to examples/avi/Audio_Conversion.php http://www.prodigyview.com
    • Basic Conversion Basic conversion of audio files can be accomplished with the PVAudio class. We simply pass in the file the be converted and the location to save the outputted file.1. Location of the file to be converted 2. Location and name of the outputted file www.prodigyview.com
    • Converting FormatsConverting formats is very simple. The only thing that needs tobe done changing the extension of the output file, and theformat will be automatically changed. Remember that ouroriginal file was an .mp3 Change the extension to change the format of the file www.prodigyview.com
    • Add OptionsOur next step is adding options. Options can be added toboth the input and output files. In our example, we aregoing to add options to the output file by prefixing an theffmpeg option acodec with ‘output.’. 1. Add acodec to options of the output file 2. Pass options to conversion www.prodigyview.com
    • Compression Audio FilesFor the remainder of this tutorial, we are going to be compressingaudio files by changing the bit rate. There are various qualities whenconvertings files.1. CD Audio: The highest quality of audio.2. 320kbs: A very high quality of audio, barely distinguishable from the cd quality.3. 256kbs: A still very high quality of audio, hard to distinguish from the cd quality.4. 192kbs: Slight differences from the original cd audio.5. 160kbs: More notable difference in the quality and depth of the sound.6. 112kbs:Sound in the stage of very noticeably, quality is no where near as sharp.7. 96kbs: Poor quality of sound, considered radio quality.
    • Compression Example 1For a simple compression of sound we, are are going tostart by changing the bit rate to 160kbs. The ffmpegoption used is –ab.1. Set the audio bit rate to 160kbs 2. Pass options to conversion www.prodigyview.com
    • Compression Example 2For the next example, we no longer want the full song andwant a lesser quality. We can delay the start location with–ss option.1. Set the audio bit rate to 128kbs 2. Set the time to start converting 3. Pass options to conversion www.prodigyview.com
    • Compression Example 3For our last examples, we are going to add the ffmpegoption –t, that will set a limit on how much is converted.1. Set the audio bit rate to 96kbs 2. Set the time to start converting 3. Set the amount of time to convert for
    • API ReferenceFor a better understanding of the audiomanipulation, check out the api at the two links below.PVAudioFFMPEG API More TutorialsFor more tutorials, please visit:http://www.prodigyview.com/tutorials www.prodigyview.com