FFMPEG Install for CentOS 5

 FFMPEG Install for CentOS 5 A little while back, I posted a basic install of ffmpeg for CentOS 5. After working with that build over the last month, I found I needed to expand it to include many different video codecs. Because of licensing restrictions, binaries of the build cannot be distributed. However, instructions for […]

500 OOPS: cannot change directory

500 OOPS: cannot change directory:/home/xxxx Login failed. 421 Service not available, remote server has closed connection     解决办法:   # setsebool ftpd_disable_trans 1   # service vsftpd restart

flv在线录制、视频转换网站开发文档

flv在线录制、视频转换网站开发文档 Mencoder简介:      Mencoder是Mplayer自带的编码工具(Mplayer是Linux下的播放器,开源,支持几乎所有视频格式的播放,现在有windows和Mac版本)。 Mplayer的获得与配置:      Mplayer windows版本下载列表:http://www5.mplayerhq.hu/MPlayer/releases/win32/列表中会有版本发布日期,可以挑选最新的版本,也可以选择old/去下载老的版本,笔者用的是6月份的版本。下载后解压到某个文件夹中即可。      Codecs下载列表:http://www5.mplayerhq.hu/MPlayer/releases/codecs/选择windows-all-********.zip(*表示年月日)下载,将zip包中的文件夹下所有文件,包括*.dll、*.acm、*.ax等等全部copy到Mplayer根目录下的codecs文件夹中。      此时最好把Mplayer.exe所在路径,同时也是Mencoder.exe所在路径添加到环境变量path中。     现在可以试试用Mplayer播放视频,比如有个视频位于D:\music\APerfectMatch.wmv,那么可以打开一个cmd窗口,输入 mplayer “D:\music\APerfectMatch.wmv”,感受一下来自Linux的播放器吧,可以通过键盘来操纵。 Mencoder转换视频格式:      以将各种格式转换为flv格式为例(flv格式是flash支持的视频格式): mencoder ””E:\test.m2p”” -o ””E:\output.flv”” -of lavf  -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:dia=4:cmp=6:vb_strategy=1 -vf scale=512:-3 -ofps 12 -srate 22050      在命令行中输入这行代码(注意:windows的命令行是不支持换行的),按回车运行,一段时间之后就可以得到一个.flv文件,播放一下看看品质如何(可以直接用Mplayer播放)。      下图是我这边转换的效果对比,左边是原视频,右边是转换后的视频:      所有人都会觉得,转换后品质下降了很多,确实是这样,同时可以发现转换后的文件由原来的13M变成了1M,如果要提高品质,可以将vbitrate=500改为vbitrate=5000。      转换后的效果对比,左边是原视频,右边是转换后的视频:      品质几乎一样了,但同时,转换文件变成了6M。      关于命令中的一些参数,解释一下: -o ””E:\output.flv””:是输出文件路径; […]

ffmpeg和Mencoder使用实例小全(转贴)

ffmpeg和Mencoder使用实例小全(转贴)下载电影的时候,我们总希望在全部下载完成之前能够预览一下影片内容,于是发布者时常会放一些影片截图在种子文件中,或者直接贴到网上,也有一些截图是一张图片,但包含很多幅影片在一起,就像下面这张:imagemagick-montage-sample有很多软件能够截取影片图像、合并图像,但如果影片太多,比如视频网站为用户上传的图像生成预览图之类的,人工在gui方式下操作就不可取了,我们需要在命令行方式下来截取、合并。首先,截取影片图像使用最多的就是mplayer或者ffmpeg,我用mplayer比较熟,本文就以此为例了,ffmpeg功能也是非常强大的,但据说支持的文件格式却不丰富。mplayer截取影片图像的基本命令为:mplayer -ss START_TIME -noframedrop -nosound -vo jpeg -frames N NAME_OF_VIDEO_FILE   上例中,-ss指定开始的时间,结合-frames参数,限定从某个时间开始、截取几帧图像。为了体现整个影片的内容,我需要在影片中间隔时间相同的几个 点、每个点截取1帧图像,所以按道理应该用-frames 1,但是mplayer这样截图的情况下,第一帧似乎永远都会截取到一个黑屏,所以我常用-frames 2。截取下来的图像保存在了当前目录,名称从00000001.jpg开始依次递增,按照-frames 2,就是取00000002.jpg为结果,删除00000001.jpg即可。经过简单实验,在截取wmv、rmvb影片时,前面的好几帧都会是黑屏, 也只能参考上面的做法多取几帧了。为了取影片中间隔大致相同的几个点,可以用-ss指定时间,也可以用-sb指定开始字节,在我的实际使用中,使用-sb只会得到黑屏,所以通过文件大小来 设置间隔点的办法不行,只能用-ss时间间隔了,这就需要首先得到影片的总时间。好在mplayer为我们提供了类似的功能:mplayer -identify movie-filename -nosound -vc dummy -vo null   这样会输出一大堆影片信息,从中截取所需内容即可,在bash shell中,取得影片总时间长度(以秒为单位)的命令如下:FILESIZE=`mplayer -identify -nosound -vc dummy -vo null $1 | grep ID_LENGTH | sed -r ‘s/ID_LENGTH=([[:digit:]]*)(.[[:digit:]]*)?/1/g’`   有了影片的总时长,我们就可以根据所要截取的帧数,计算出每个间隔点的时间位移了。不过要注意一般影片的开始-ss 0和结束-ss TOTAL_TIME_OF_VIDEO截取下来都会是黑屏,在处理的时候要分别加上和减去若干秒。截取工作完成后,我们拥有了一堆000000xx.jpg文件,如果能把这些文件都放到一个文件中,每行2张,成为一张大图片,在发布的时候会很方便。所 以,我们使用imagemagick([url]http://www.imagemagick.org/script/index.php [/url])中的montage命令来实现:montage -geometry +0+0 -tile 2 *.jpg montage.jpg   -geometry +0+0是设定使用原始图片大小,-tile 2参数设定每行放2张图片,最后一个参数是要生成的目标文件名,现在,我们就能够得到像刚才那张一样的图片了。原理已经讲清楚了,可以自己写一个bash脚本来方便调用,我在网上找到了一个很不错的例子([url]http: //www.linuxquestions.org/questions/showthread.php?t=361072[/url]),可以在这个基 […]

日誌分析工具 access.log analysis

Visitors is a very fast web log analyzer for Linux, Windows, and other Unix-like operating systems. It takes as input a web server log file, and outputs statistics in form of different reports. The design principles are very different compared to other software of the same type: No installation required, can process up to 150,000 […]

Resin-pro-3.1.6 full crack download

Caucho Technology is an engineering company devoted to reliable open source and high performance Java-PHP solutions. Caucho is a Sun Microsystems Java EE licensee whose products include Resin application server, Hessian web services and Quercus Java-PHP solutions. Resin Professional is the application server of choice for over 7,500 companies. Technical support is handled by Caucho […]

SecureCRT v6.0.1 crack key keygen

SecureCRT gives you an encrypted Secure Shell (SSH1 and SSH2) session with servers and devices. For SSH, Telnet, Telnet/SSL, and other protocols, SecureCRT`s tabbed sessions reduce desktop clutter and make it easy to switch between sessions and organize groups of connected sessions. Extensive session management and customization features include named sessions, and multiple-session windows. Choose […]

shell 比较两个字符串

比较两个字符串是否相等的办法是: if [ “$test”x = “test”x ]; then   这里的关键有几点: 1 使用单个等号 2 注意到等号两边各有一个空格:这是unix shell的要求 3 注意到”$test”x最后的x,这是特意安排的,因为当$test为空的时候,上面的表达式就变成了x = testx,显然是不相等的。而如果没有这个x,表达式就会报错:[: =: unary operator expected

resin-pro-3.1.5 full cracked.

 虽然resin-pro-3.1.5早在2月26号就发布了,但一直标记为dev,今天发现已经不是dev了,赶紧下载回来破解。 resin-pro-3.1.5.zip 下载 resin-pro-3.1.5.tar.gz 下载 此次破解的跟上次的3.1.3一样,功能上完全没有任何限制了,可以使用session持久化、cache等,只需要做好相关的配置即可。  3.1.5的Change Log请看官方文档:Resin Change Log,同时可以看到3.1.6 snapshot了。 我会及时破解Resin的最新版本! 文章来源:http://www.dingl.com/blog/archives/28

resin 3.1使用总结.

  使用resin已经有四、五年了,但以前都是做一些小系统,resin的压力并不大,近段时间做一个大系统,日平均ip上10万,resin的压力非常的大,除了对程序做优化以外,resin 的优化也小不了。     一、优化配置   修改 conf/resin.conf 文章中的 JVM参数   <jvm-arg>-Xms512m</jvm-arg><jvm-arg>-Xss128k</jvm-arg><jvm-arg>-Xmn184m</jvm-arg><jvm-arg>-XX:ParallelGCThreads=20</jvm-arg><jvm-arg>-XX:+UseConcMarkSweepGC</jvm-arg><jvm-arg>-XX:+UseParNewGC</jvm-arg><jvm-arg>-Xdebug</jvm-arg><jvm-arg>-Xloggc:gc.log</jvm-arg>     修改 最大thread-max为2500       <!– Maximum number of threads. –>      <thread-max>2500</thread-max>       <!– Configures the socket timeout –>      <socket-timeout>65s</socket-timeout>               <!– Configures the keepalive –>      <keepalive-max>10240</keepalive-max>      <keepalive-timeout>30s</keepalive-timeout>   二、利用resin-admin监控resin运行情况。   第一行是Thread pool情况,如果发现Peak大于thread max,就应该修改conf/resin.conf 中的thread-max,相应的增大thread-max。 第二行是Threads,如果长期出现在这里而又不是SUN的方法,或者resin的方法的话,就要对这些方法进行测试、优化。