afconvert 音频格式转换使用相关

 

 

有点凌乱,先收集着 ,有时间再整理好了.

//wav转caf

http://www.yifeiyang.net/iphone-development-skills-of-tool-papers-4-wav-file-conversion-using-afconvert/

 //音频方面的详解介绍

http://www.cnblogs.com/bandok123/archive/2012/03/02/2377023.html

 

//外国佬也遇到这类问题 caf 转mp3

http://*.com/questions/435349/how-to-use-afconvert-to-convert-from-caf-to-mp3-format

 //苹果官网关于音频的参考库

http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AudioandVideoTechnologies/AudioandVideoTechnologies.html

 

//命令位置

/Applications/Utilities/终端.app 

 

//查看某个音频的具体参数

afinfo /Users/amarishuyi/Desktop/sound1.mp3 

 

//查看具体支持的转换格式

afconvert -hf 

 

 

//CAF 转换成MP3 (可以)

afconvert -f mp4f -d aac -b 128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.mp3

 

 

 

//amr 转换成caf (可以)

afconvert -f caff -d LEI16 -b 128000 /Users/amarishuyi/Desktop/1.amr /Users/amarishuyi/Desktop/1.caf

 

 

 

//CAF转换成AMR  (还转不了)

afconvert -f amrf -d samr -b 128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.amr

afconvert -f amrf -d samr  /Users/amarishuyi/Desktop/sound1.caf  /Users/amarishuyi/Desktop/sound1.amr

 

 

 

 

 

File:           /Users/amarishuyi/Desktop/1.amr

File type ID:   amrf

Data format:     1 ch,   8000 Hz, 'samr' (0x00000000) 0 bits/channel, 0 bytes/packet, 2400 frames/packet, 0 bytes/frame

                no channel layout.

estimated duration: 8.380000 sec

audio bytes: 13408

audio packets: 28

bit rate: 12769 bits per second

packet size upper bound: 480

audio data file offset: 6

optimized

 

 

File:           /Users/amarishuyi/Desktop/sound1.caf

File type ID:   caff

Data format:     2 ch,  44100 Hz, 'ima4' (0x00000000) 0 bits/channel, 68 bytes/packet, 64 frames/packet, 0 bytes/frame

                no channel layout.

estimated duration: 2.860408 sec

audio bytes: 134096

audio packets: 1972

audio 126144 valid frames + 0 priming + 64 remainder = 126208

bit rate: 374850 bits per second

packet size upper bound: 68

audio data file offset: 4096

optimized

source bit depth: I16

sound check:

    approximate duration in seconds          2.86

    source bit depth                         I16

----

 

 

File:           /Users/amarishuyi/Desktop/sound1.mp3

File type ID:   MPG3

Data format:     2 ch,  48000 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame

                no channel layout.

estimated duration: 1.030786 sec

audio bytes: 14431

audio packets: 1

bit rate: 112000 bits per second

packet size upper bound: 968

maximum packet size: 336

audio data file offset: 27631

optimized

----

 

 

File:           /Users/amarishuyi/Desktop/1.caf

File type ID:   caff

Data format:     1 ch,   8000 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer

                no channel layout.

estimated duration: 8.380000 sec

audio bytes: 134080

audio packets: 67040

audio 67040 valid frames + 0 priming + 0 remainder = 67040

bit rate: 128000 bits per second

packet size upper bound: 2

audio data file offset: 4096

optimized

source bit depth: I16

sound check:

    approximate duration in seconds          8.38

----

上一篇:NSObject


下一篇:关于iOS Code Help