Web Digest

还有众多网络文摘,仅供个人收藏和参考

值得推荐的网络存储服务-Dropbox

with 2 comments

Dropbox是一个值得网络硬盘服务,它的特点是:

1.注册后免费获得2GB的容量空间,通过点击本文底部的链接注册帐号可以获得而外250M空间。

2.界面友好。Dropbox的安装程序在本地运行以后会生成一个Dropbox的文件夹,只需要把你需要同步的文件移动到那个文件夹之后就会开展自动上传的功能,速度还算满意, 一个20M左右的文件大概需要1分钟。

3.分享模式,Dropbox实现了多台电脑之间无障碍共享。可以自动识别局域网内的用户,减少上传量并加快同步速度。

4. 跨平台支持,支持Windows, Mac, Linux甚至Iphone,Ipod,Android。

4. 支持版本控制功能。

6. 使用SSL加密传输

7. 提供API可以进行二次开发

点击这里申请账号,可以免费获得额外250M空间

Written by admin

May 11, 2010 at 12:13 pm

Posted in 电脑|PC

Tagged with

iptables转发

leave a comment »

 

较为简明易懂的解释

http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html

 

 

 

 

http://straylink.wordpress.com/2006/08/16/using-iptables-to-redirect-packets/

REDIRECT to localhost

Lets say you want to take packets on one interface and want them forwarded to a service running on localhost – i.e. a database server that requires limited external exposure (no thats not what I’m working on, like I’d reveal my cards so easily!) Ok – googling ‘iptables forward localhost’ results in some mail list postings essentially saying ‘you cannot forward packets from a real interface to a local loopback interface’. True enough. However, IPTables does support REDIRECTing them, like so

iptables -t nat -A PREROUTING -p tcp -d 198.168.1.254 --dport 80
-j REDIRECT --to-ports 8080

The above rule adds a PREROUTING command to your nat table, stating any TCP packets destined for 192.168.1.254 on port 80 should be redirected to localhost port 8080. So breaking down the above example into template format, you have

iptables -t nat -A PREROUTING -p tcp -d DEST_IP --dport DEST_PORT
-j REDIRECT --to-ports LOCAL_PORTS

Written by admin

January 27, 2012 at 1:55 am

Posted in 网站|Site

Tagged with

修改XPI文件时的奇怪问题

leave a comment »

http://stackoverflow.com/questions/8600222/zip-confused-plugin-appears-to-be-corrupted

也就是压缩时要确保install.rdf在zip文件的最外层,不能在某一个目录中。

因此,需要在keyconfig.xpi解压后的目录中运行

zip -r keyconfig.xpi ./*

才可以。

这个设计真是非常的古怪

Written by admin

December 22, 2011 at 11:07 am

Posted in 火狐|FireFox

ffmpeg+ffserver将IP Camera的RTSP流转换为flv流

leave a comment »

ffmpeg -rtsp_transport tcp -i rtsp://admin:admin@cam.no-ip.org:554/video.mp4 –vcodec

flv -acodec copy   -r 25  http://127.0.0.1:8010/feed1.ffm -f flv -loglevel quiet

 

 

 

# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8010

# Address on which the server is bound. Only useful if you have
# several network interfaces.
BindAddress 0.0.0.0

# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000

# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000

# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000

# Access log file (uses standard Apache log file format)
# ‘-’ is the standard output.
CustomLog –

# Suppress that if you want to launch ffserver as a daemon.
NoDaemon

##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another
# ffserver. This sequence may be encoded simultaneously with several
# codecs at several resolutions.

<Feed feed1.ffm>

# You must use ‘ffmpeg’ to send a live feed to ffserver. In this
# example, you can type:
#
# ffmpeg http://localhost:8090/feed1.ffm

# ffserver can also do time shifting. It means that it can stream any
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
# maximum size of the feed, where zero means unlimited. Default:

 

# File=/tmp/feed_name.ffm FileMaxSize=5M
File /tmp/feed1.ffm
FileMaxSize 20M

# You could specify
# ReadOnlyFile /saved/specialvideo.ffm
# This marks the file as readonly and it will not be deleted or updated.

# Specify launch in order to start ffmpeg automatically.
# First ffmpeg must be defined with an appropriate path if needed,
# after that options can follow, but avoid adding the http:// field
# Launch ffmpeg

# Only allow connections from localhost to the feed.
ACL allow 127.0.0.1

</Feed>

 

##################################################################
# Special streams

# Flash

<Stream test.flv>
  # the source feed
  Feed feed1.ffm
  # the output stream format – FLV = FLash Video
  Format flv
  VideoCodec flv
  # VideoCodec mpeg4
  # this must match the ffmpeg -r argument
  VideoFrameRate 25
  # another quality tweak
  # VideoBitRate 900
  # quality ranges – 1-31 (1 = best, 31 = worst)
  VideoQMin 1
  VideoQMax 3

  # VideoBufferSize 80000

  VideoSize 640×480

  # PreRoll 0

  # wecams don’t have audio
  NoAudio

  StartSendOnKey
</Stream>

<Stream stat.html>
Format status

# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255

#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
</Stream>

# Redirect index.html to the appropriate site

# <Redirect index.html>
#URL http://www.ffmpeg.org/
# </Redirect>

 

参考文章

http://www.dexmac.com/index.php/how-to/74-streaming-with-ffserver

Written by admin

December 21, 2011 at 5:52 am

Posted in 网站|Site

Tagged with

ffmpeg强制使用TCP方式读取rtsp视频

leave a comment »

ffmpeg -rtsp_transport tcp -i rtsp://admin:admin@cam.no-ip.org:554/video.mp4 -vcodec copy -acodec copy  -r 25  -f flv http://127.0.0.1:8010/feed1.ffm

Written by admin

December 20, 2011 at 6:12 am

Posted in 网站|Site

Tagged with

利用VLC将rtsp视频转化为flowplayer可以播放的flv

leave a comment »

cvlc –sout "#transcode{vcodec=FLV1}:duplicate{dst=std{access=http,mux=ffmpeg{mux=flv},dst=200.111.222.333:8010/stream.flv}}" -vvv rtsp://admin:admin@cam.no-ip.org:554/video.mp4  –loop –no-audio –color -I dummy

Written by admin

December 20, 2011 at 4:25 am

Posted in 网站|Site

Tagged with

vim的color number name not supported错误

leave a comment »

主要是默认的不是256color的终端造成的

可以在.bashrc中加入

export TERM=’xterm-256color’

解决

也可以更仔细一点,用个case

case "$TERM" in
    xterm-color)
      color_prompt=yes
      ;;
  xterm-256color)
    color_prompt=yes
    export TERM=’xterm-256color’
    ;;
esac

当然Terminal要把自己宣布为xterm-256color才行

Written by admin

November 25, 2011 at 5:19 am

Posted in 网站|Site

Tagged with

在Debian6.0上编译vim的command-T插件

leave a comment »

虽然安装了ruby, 结果还是遇到

no such file to load — mkmf

错误。

看了这里才知道

原来还要安装

sudo apt-get install ruby1.8-dev

Written by admin

November 25, 2011 at 5:15 am

Posted in 网站|Site

Tagged with ,

解决E319: Sorry, the command is not available in this version

leave a comment »

这个问题比较简单,可以参考这里

主要是默认安装的vim不完整所致。

安装一个完整版的就可以。

如果内存不是问题,对于Debian, 推荐安装vim-nox,带有python, ruby, perl等脚本的完整支持,再也没有无法使用的插件了

Written by admin

November 25, 2011 at 5:13 am

Posted in 网站|Site

Tagged with ,

在64bit Debian6.0上安装ZoneMinder

leave a comment »

 

本来按照官方的wiki是很简单的。

最多再按照

http://www.zoneminder.com/wiki/index.php/FAQ#What_does_a_.27Can.27t_shmget:_Invalid_argument.27_error_in_my_logs_mean.3F_and_my_cameras_won.27t_display_video_at_higher_resolutions.

调整一下shared memroy 的设置就可以了。

 

但是一直不行,即使是40M内存的分配都不行。

直到发现要把默认的shared memory key 从 0x7a6d0002 改成一个小一点的数字,比如0x006d0002才行。(后四位被掩码了,无所谓,只是凑个位数)

看源代码也看出什么名堂:

    shm_id = shmget( (config.shm_key&0xffff0000)|id, mem_size, IPC_CREAT|0700 );
    if ( shm_id < 0 )
    {
        Error( "Can’t shmget, probably not enough shared memory space free: %s", strerror(errno));
        exit( -1 );
    }

但问题还是解决了

Written by admin

November 25, 2011 at 5:10 am

The blend of history and imagination

leave a comment »

Alejandro Morales is the author of The Rag Doll Plagues.

He practiced writing since high school, making short notes, stories, which later become his first book.

He pioneered in writing bilingual novels which obviously targeted at those Mexican immigrants, be it on purpose or a new trial for the writing style.

A TV drama “Firefly” may be the most prominent successor to this approach. It uses Chinese words in the main plots.

Written by admin

November 20, 2011 at 10:51 am

Posted in 其他|Others

Tagged with

Follow

Get every new post delivered to your Inbox.