Some useful ffmpeg commands ( commandline video converting tool)

1. Converting MOV/MPEG/AVI/MP4 –> flv  #ffmpeg -i input file output.flv 2. Convert and adjust the video file resolution to output file # ffmpeg -i input.avi -s 500×500 output.flv 3. Converting 3GP –> FLV #ffmpeg -i input.3gp -sameq -an output.flv 4. Converting MPEG –>3GP #ffmpeg -i input.mpeg -ab 8.85k -acodec libamr_wb -ac 1 -ar 16000 -vcodec h263 -s qcif […]

Apache Kafka 0.8.0发布,高吞吐量分布式消息系统

Apache Kafka 0.8.0版本近日发布。Apache Kafka是源自LinkedIn的一种分布式日志服务,主要用Scala语言开发(少量Java),其实质是高吞吐量而功能简单的消息队列。由于架构设计独特,Kafka与传统消息队列相比,内置分区、复制和容错功能,适合大规模系统。曾有数据表明,Kafka能够每秒发布超过40万条消息。 目前Kafka已经被众多互联网公司如Twitter、Pinterest、Netflix、Tumblr、Foursquare、Square、StumbleUpon、Coursera等广泛应用,主要使用场景包括:消息处理、活动流跟踪、运营数据监测、日志聚合、流处理(与Storm配合)等。 Apache Kafka 0.8.0版本主要改进包括: 支持集群内复制,将每个日志段都在多个broker节点复制 支持多个数据目录 请求处理改为异步 增加许多新的内部指标,从JMX切换到Coda Hale开发的Metrics库 基于时间的日志段删除 更多技术细节请参考版本说明。 技术资料 官网资料 LinkedIn:Kafka Quora:Apache Kafka讨论 StackOverflow:Apache Kafka CSDN博客:介绍和学习笔记 董西成博客:学习笔记 Kafka架构设计(原文,中文翻译)

利用Proxy Cache使Nginx对静态资源进行缓存

前言 Nginx是高性能的HTTP服务器,通过Proxy Cache可以使其对静态资源进行缓存。其原理就是把静态资源按照一定的规则存在本地硬盘,并且会在内存中缓存常用的资源,从而加快静态资源的响应。 配置Proxy Cache 以下为nginx配置片段: proxy_temp_path /usr/local/nginx/proxy_temp_dir 1 2; #keys_zone=cache1:100m 表示这个zone名称为cache1,分配的内存大小为100MB #/usr/local/nginx/proxy_cache_dir/cache1 表示cache1这个zone的文件要存放的目录 #levels=1:2 表示缓存目录的第一级目录是1个字符,第二级目录是2个字符,即/usr/local/nginx/proxy_cache_dir/cache1/a/1b这种形式 #inactive=1d 表示这个zone中的缓存文件如果在1天内都没有被访问,那么文件会被cache manager进程删除掉 #max_size=10g 表示这个zone的硬盘容量为10GB proxy_cache_path /usr/local/nginx/proxy_cache_dir/cache1 levels=1:2 keys_zone=cache1:100m inactive=1d max_size=10g; server { listen 80; server_name *.example.com; #在日志格式中加入$upstream_cache_status log_format format1 ‘$remote_addr – $remote_user [$time_local] ‘ ‘”$request” $status $body_bytes_sent ‘ ‘”$http_referer” “$http_user_agent” $upstream_cache_status’; access_log log/access.log fomat1; #$upstream_cache_status表示资源缓存的状态,有HIT MISS EXPIRED三种状态 add_header […]

resin-pro-4.0.36 crack 破解文件下载

resin-pro-4.0.36 crack 破解文件下载 resin-pro-4.0.36 破解文件下载pro.jar resin pro 4.0.36 Full Cracked download. 下载pro.jar文件,覆盖原来lib目录的pro.jar文件即可。 仅供学习使用,请在下载后24时间内删除。

6 Must Have Node.js Modules

So you’re thinking about using node.js: awesome. If you’re new to the community you’re probably thinking “what’s the best node.js module / library for X?” I think it’s really true when experienced language gurus say “80% of your favorite language is your favorite library.” This is the first in a series of articles will give […]

关于编译resin的错误处理。

不知道什么时候开始,resin4就无法编译 错误1:aclocal: couldn’t open directory `m4′: No such file or directory [root@datanode2 resin-pro-4.0.36]# make CDPATH=”${ZSH_VERSION+.}:” && cd . && aclocal -I m4 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = “en.UTF-8” are supported and installed on your system. perl: warning: Falling back […]

SIEGE

Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of […]

静态文件用nginx直接serve

#css|js|ico|gif|jpg|jpeg|png|txt|html|htm|xml|swf|wav这些都是静态文件,但应分辨,js、css可能经常会变,过期时间应小一些,图片、html基本不变,过期时间可以设长一些 location ~* ^.+\.(ico|gif|jpg|jpeg|png|html|htm)$ { root /var/www/poseidon/root/static; access_log off; expires 30d; } location ~* ^.+\.(css|js|txt|xml|swf|wav)$ { root /var/www/poseidon/root/static; access_log off; expires 24h; } #注:location不包括?后面带的参数,所以以上正则可以匹配http://192.168.1.16/image/sxxx.jpg?a=xxx

Node.js 究竟是什么?

Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念。它的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个(只有一个)物理机的连接代码。   清单 2. Node 随机数字生成器 // these modules need to be imported in order to use them. // Node has several modules. They are like any #include // or import statement in other languages var http = require(“http”); var url = require(“url”); // The most important line in any Node file. […]