关键词:
1.
//CAF 转换成MP3 (可以)
afconvert -f mp4f -d aac -b 128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.mp3
http://blog.csdn.net/ysy441088327/article/details/7388351
2.lame
#include <stdio.h> #include <lame/lame.h> int main(void) { int read, write; FILE *pcm = fopen("file.pcm", "rb"); FILE *mp3 = fopen("file.mp3", "wb"); const int PCM_SIZE = 8192; const int MP3_SIZE = 8192; short int pcm_buffer[PCM_SIZE*2]; unsigned char mp3_buffer[MP3_SIZE]; lame_t lame = lame_init(); lame_set_in_samplerate(lame, 44100); lame_set_VBR(lame, vbr_default); lame_init_params(lame); do { read = fread(pcm_buffer, 2*sizeof(short int), PCM_SIZE, pcm); if (read == 0) write = lame_encode_flush(lame, mp3_buffer, MP3_SIZE); else write = lame_encode_buffer_interleaved(lame, pcm_buffer, read, mp3_buffer, MP3_SIZE); fwrite(mp3_buffer, write, 1, mp3); } while (read != 0); lame_close(lame); fclose(mp3); fclose(pcm); return 0; }
http://stackoverflow.com/questions/2495420/is-there-any-lame-c-wraper-simplifier-working-on-linux-mac-and-win-from-pure
第15月第29天ffmpegaverror_eof
1.在直播时返回AVERROR_EOF代表流结束吗?但对方还在直播,没有结束。 intret=av_read_frame(mContext,pkt); if(ret==AVERROR_EOF) 查看详情
第9月第3天uilabelcontentscale
1. http://blog.csdn.net/u012703795/article/details/43706449 查看详情
第16月第3天afurlsessionmanager
1. -(AFURLSessionManagerTaskDelegate*)delegateForTask:(NSURLSessionTask*)task{ NSParameterAssert(task); AFURLSessionManagerTaskDelegate*delegate=nil; [self. 查看详情
第26月第3天javagradle
1.430/Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradle-v434mkdirgradle01435cdgradle01 437 /Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradleinit--typ 查看详情
第25月第2天django项目01
1.exportPATH="$PATH":/Applications/XAMPP/xamppfiles/bin/ sudoln-s/Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib/usr/lib/libmysqlclient.18.dylib 更新20160318的node 3 查看详情
第3月第16天fd_set32ace_tp_reactor
1.#ifdefFD_SETSIZE#define__DARWIN_FD_SETSIZEFD_SETSIZE#else/*!FD_SETSIZE*/#define__DARWIN_FD_SETSIZE1024#endif/*FD_SETSIZE*/#define__DARWIN_NBBY8/*bitsinabyte*/#define__DARWIN_NFDBITS(sizeof(__int32_t 查看详情
第9月第30天mvp
1. importUIKitstructPerson{//ModelletfirstName:StringletlastName:String}protocolGreetingView:class{funcsetGreeting(greeting:String)}protocolGreetingViewPresenter{init(view:GreetingView,person:Per 查看详情
第16月第27天pipinstallvirtualenv
1.pipinstallvirtualenvvirtualenvtestvircdtestvircdScriptsactivatepipinstalldjango==1.9.8 https://zhuanlan.zhihu.com/p/32286726 查看详情
第2月第24天coretext行高
1.NSMutableAttributedString 行高 NSMutableAttributedString*attributedString=[[NSMutableAttributedStringalloc]initWithString:labelText];NSMutableParagraphStyle*paragraphStyle=[[NSMutableParagra 查看详情
第10月第28天touchesbegan
1.-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event{[[selfnextResponder]touchesBegan:toucheswithEvent:event];[supertouchesBegan:toucheswithEvent:event];}-(void)touchesMoved:(NSSet*)touchesw 查看详情
第37月第29天avplayer截屏
1.-(void)displayLinkCallback:(CADisplayLink*)sender{CMTimetime=[snapshotOutputitemTimeForHostTime:CACurrentMediaTime()];if([snapshotOutputhasNewPixelBufferForItemTime:time]){lastSnapshotPixelBuffer=[s 查看详情
第5月第18天视频编辑水印
1.//***********ForASpecialTimeCABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"opacity"];[animationsetDuration:0];[animationsetFromValue:[NSNumbernumberWithFloat:1.0]];[animationsetT 查看详情
当月第一天最后一天下月第一天,时间date
时间记录,不是时间戳1$thismonth=date(‘m‘);2$thisyear=date(‘Y‘);3$startDay=$thisyear.‘-‘.$thismonth.‘-1‘;4$endDay=$thisyear.‘-‘.$thismonth.‘-‘.date(‘t‘,strtotime($startDay));//当月最后一天5$time1=date(‘Y-m-1H:i:s‘,str 查看详情
第25月第11天deeplearning.ai
1.网易云课堂深度学习工程师点击进入课程地址(英文)(收费)点击进入课程地址(中文)(免费)第一门神经网络和深度学习第二门改善神经网络第三门结构化机器学习项目第四门卷积神经网络第五门序列模型 查看详情
第31月第15天-fembed-bitcode(代码片段)
1.确保打包的时候使用的是fembed-bitcode,而不是fembed-bitcode-makerfembed-bitcode-maker:只是简单的标记一下在archive出来的二进制中bitcdoe所在的位置。fembed-bitcode:真的会生成bitcode指令,并且嵌入到二进制中,这个设置不止要在app中设置,... 查看详情
第11月第14天openglyuv
1.Hereissomesnippetsofcodefrommyproject‘movieplayerforiOS‘.1.fragmentshadervaryinghighpvec2v_texcoord;uniformsampler2Ds_texture_y;uniformsampler2Ds_texture_u;uniformsampler2Ds_texture_v;voidmain(){hig 查看详情
第5月第6天nsoperationisconcurrent
1. @implementationAFURLConnectionOperation...-(BOOL)isConcurrent{returnYES;} NSOperation调用start方法即可开始执行操作,NSOperation对象默认按同步方式执行,也就是在调用start方法的那个线程中直接执行。NSOperation对象的isConcurrent方法会告诉我... 查看详情
第9月第5天avvideoaveragebitratekey
1.https://stackoverflow.com/questions/11751883/how-can-i-reduce-the-file-size-of-a-video-created-with-uiimagepickercontroller http://www.jianshu.com/p/61a9030adeef 查看详情