SlideShare a Scribd company logo
1 of 11
Audio Conversion




    www.prodigyview.com
Overview
Objective
Learn how to convert audio files using PVAudio class
Requirements
 Installed version of ffmpeg
 Understanding of ffmpeg from the ffmpeg tutorial
 Understanding of the defines
Estimated Time
10 minutes


                     www.prodigyview.com
Follow Along With A Code
          Example
1. 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 Formats
Converting formats is very simple. The only thing that needs to
be done changing the extension of the output file, and the
format will be automatically changed. Remember that our
original file was an .mp3




           Change the extension to change the format of the file


                          www.prodigyview.com
Add Options
Our next step is adding options. Options can be added to
both the input and output files. In our example, we are
going to add options to the output file by prefixing an the
ffmpeg option acodec with ‘output.’.


  1. Add acodec to options of the output file




                                           2. Pass options to conversion
                            www.prodigyview.com
Compression Audio Files
For the remainder of this tutorial, we are going to be compressing
audio files by changing the bit rate. There are various qualities when
converting's 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 1
For a simple compression of sound we, are are going to
start by changing the bit rate to 160kbs. The ffmpeg
option used is –ab.


1. Set the audio bit rate to 160kbs




                                          2. Pass options to conversion
                             www.prodigyview.com
Compression Example 2
For the next example, we no longer want the full song and
want 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 3
For our last examples, we are going to add the ffmpeg
option –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 Reference
For a better understanding of the audio
manipulation, check out the api at the two links below.

PVAudio

FFMPEG API


                 More Tutorials
For more tutorials, please visit:

http://www.prodigyview.com/tutorials


                       www.prodigyview.com

More Related Content

More from ProdigyView

More from ProdigyView (20)

Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design Pattern
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHP
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search Query
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration File
 
Learning PHP Basics Part 2
Learning PHP Basics Part 2Learning PHP Basics Part 2
Learning PHP Basics Part 2
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 

Audio Conversions PHP

  • 1. Audio Conversion www.prodigyview.com
  • 2. Overview Objective Learn how to convert audio files using PVAudio class Requirements  Installed version of ffmpeg  Understanding of ffmpeg from the ffmpeg tutorial  Understanding of the defines Estimated Time 10 minutes www.prodigyview.com
  • 3. Follow Along With A Code Example 1. 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
  • 4. 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
  • 5. Converting Formats Converting formats is very simple. The only thing that needs to be done changing the extension of the output file, and the format will be automatically changed. Remember that our original file was an .mp3 Change the extension to change the format of the file www.prodigyview.com
  • 6. Add Options Our next step is adding options. Options can be added to both the input and output files. In our example, we are going to add options to the output file by prefixing an the ffmpeg option acodec with ‘output.’. 1. Add acodec to options of the output file 2. Pass options to conversion www.prodigyview.com
  • 7. Compression Audio Files For the remainder of this tutorial, we are going to be compressing audio files by changing the bit rate. There are various qualities when converting's 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.
  • 8. Compression Example 1 For a simple compression of sound we, are are going to start by changing the bit rate to 160kbs. The ffmpeg option used is –ab. 1. Set the audio bit rate to 160kbs 2. Pass options to conversion www.prodigyview.com
  • 9. Compression Example 2 For the next example, we no longer want the full song and want 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
  • 10. Compression Example 3 For our last examples, we are going to add the ffmpeg option –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
  • 11. API Reference For a better understanding of the audio manipulation, check out the api at the two links below. PVAudio FFMPEG API More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com