Tag Archives: 杂项

免费在线转换视频格式

视频格式包含几层意思在里面,视频容器格式,视频编码格式,还有就是视频的帧率,码率等。先说视频容器格式:

视频文件 简介 扩展名
Flash Video Adobe Flash延伸出来的的一种流行网络视频封装格式。随着视频网站的丰富,这个格式已经非常普及。 flv
AVI
(Audio Video Interleave)
比较早的AVI是微软开 发的。其含义是Audio VideoInteractive,就是把视频和音频编码混合在一起存储。AVI也是最长寿的格式,已经存在10余年了,虽然发布过改版(V2.0于1996年发布),但已显老态。AVI格式上限制比较多,只能有一个视频轨道和一个音频轨道(现在有非标准插件可加入最多两个音频轨道),还可以有一些附加轨道,如文字等。AVI格式不提供任何控制功能。 avi
WMV
(Windows Media Video)
同样是微软开发的一组数字视频编解码格式的通称,ASF(AdvancedSystems Format)是其封装格式。ASF封装的WMV文件具有“数字版权保护”功能。 wmv/asf
wmvhd
MPEG
(Moving Picture Experts Group)
是一个国际标准化组织(ISO)认可的媒体封装形式,受到大部份机器的支持。其存储方式多样,可以适应不同的应用环境。MPEG-4文件的文件容器格式在Part1(mux)、14(asp)、15(avc)等中规定。MPEG的控制功能丰富,可以有多个视频(即角度)、音轨、字幕(位图字幕)等等。MPEG的一个简化版本3GP还广泛的用于准3G手机上。 dat(VCD)
vob
mpg/mpeg
3gp/3g2(手机)
Matroska 是一种新的多媒体封装格式,这个封装格式可把多种不同编码的视频及16条或以上不同格式的音频和语言不同的字幕封装到一个MatroskaMedia文件内。它也是其中一种开放源代码的多媒体封装格式。Matroska同时还可以提供非常好的交互功能,而且比MPEG的方便、强大。 mkv
Real Video
Real Media(RM)
是由RealNetworks开发的一种文件容器。它通常只能容纳Real Video和RealAudio编码的媒体。该文件带有一定的交互功能,允许编写脚本以控制播放。RM,尤其是可变比特率的RMVB格式,没有复杂的Profile/Level,制作起来较H.264视频格式简单,非常受到网络上传者的欢迎。此外很多人仍有RMVB体积小高质量的错误认知,这个不太正确的观念也导致很多人倾向使用rmvb,事实上在相同码率下,rmvb编码和H.264这个高度压缩的视频编码相比,体积会较大。 rm/rmvb
QuickTime FileFormat 是由苹果公司开发的容器。1998年2月11日,国际标准组织(ISO)认可QuickTime文件格式作为MPEG-4标准的基础。QT可存储的内容相当丰富,除了视频、音频以外还可支持图片、文字(文本字幕)等。 mov
qt
Ogg Media是一个完全开放性的多媒体系统计划,OGM(Ogg MediaFile)是其容器格式。OGM可以支持多视频、音频、字幕(文本字幕)等多种轨道。 ogg

视频编码格式包括:

H.261

H.261主要在老的视频会议视频电话产品中使用。H.261是由ITU-T开发的,第一个使用的数字视频压缩标准。实质上说,之后的所有的标准视频编解码器都是基于它设计的。它使用了常见的YCbCr颜色空间,4:2:0色度抽样格式,8位的抽样精度,16×16的宏块,分块的运动补偿,按8×8分块进行的离散余弦变换,量化,对量化系数的Zig-zag扫描,run-level符号影射以及霍夫曼编码。H.261只支持逐行扫描的视频输入。

继续阅读

Posted in 杂项 | Tagged | Leave a comment

免费文字转语音的网站

在通常的工作生活中,有时,我们需要将一段话,一段文字转换语音,语音文件以音频格式存储传播,如mp3, wma,wav等格式。

为了完成上述功能,你可以下载应用程序来完成,但是这种方式有一定的问题和风险,问题在于你要寻找这样的软件,有些软件看起来,有这样的功能,但实际上根本无法工作;你需要在你的机器安装软件,它会占去你的磁盘空间;风险则是很多免费的软件在你安装它的过程中,会给你安装很多的病毒,让你机器成为别人的肉鸡,被别人所利用。还有一种选择就是使用收费的软件,这种方法可以让你避免中电脑病毒的风险,但是依然需要安装软件在你的电脑,还有就是需要自己掏腰包。

继续阅读

Posted in 杂项 | Tagged | Leave a comment

centos 安装svn server( http https )

安装必要的包

sudo yum install httpd subversion mod_dav_svn

创建仓库

sudo mkdir -p /var/lib/subversion/repositories
sudo chown -R apache:apache /var/lib/subversion

创建工程

sudo svnadmin create --fs-type fsfs /var/lib/subversion/repositories/xxx
sudo chown -R apache:apache /var/lib/subversion/repositories/xxx
sudo chmod -R g+w /var/lib/subversion/repositories/xxx
sudo chmod g+s /var/lib/subversion/repositories/xxx/db

继续阅读

Posted in Linux系统学习 | Tagged , | Leave a comment

功能超全的在线文件转换网站

最近在做一个图标,找了很多的网站,有些根本就不能转换,有些可以转换,不过转换的出来的icon文件超级大,一个64×64的icon转换出来达到了几百k,甚至上1M。不过功夫不负有心人啊,还是终于找到2个。

这2个网站的名字都挺有意思的,都有个converter,就是转换器的意思。第一意思360天,天天转换,第二个则是爱转换。我比较喜欢第一个,因为它的速度快(可能服务器离我比较近吧)。

继续阅读

Posted in 杂项 | Tagged | Leave a comment

CentOS安装SVN server

SVN简介和工作原理

subversion(简称svn)是近几年崛起的版本管理软件,是cvs的接班人,目前绝大多数开源软件都使用svn作为代码版本管理软件。Subversion支持linux和windows,但较多安装在linux下。

svn服务器有两种运行方式:独立服务器和借助于apache。 svn://或http://
svn客户端tortoisesvn
svn的基本工作原理: 在一台服务器上建立一个源代码库,库里可以存放许多不同项目的源程序。有源代码库管理员统一管理这些源程序。每个用户在使用源代码库之前,首先要把源代码库里德项目文件下载到本地,然后开发人员可以在本地修改,左后用svn命令进行提交,游源代码库统一管理修改。
版本控制解决了:
*代码管理混乱
*解决代码冲突困难
*在代码整合期间引发bug
*无法对代码的拥有者进行权限控制
*项目不同版本的发布困难

继续阅读

Posted in 杂项 | Tagged | Leave a comment

linux搭建邮件服务器

Incoming mail diagram

linux搭建邮件服务器

下面内容摘自:

https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql

Email with Postfix, Dovecot, and MySQL

Published: Monday, May 13th, 2013 by Sharon Campbell

This guide shows you how to set up a secure mail server on your Linode with Postfix, Dovecot, and MySQL. By the time you reach the end, you'll know how to create mailboxes for your users and send and receive email for your domains. You'll learn how to add
new domains and users with MySQL, and how to prevent your server from being used as an "open relay" spam hub. Your users will be able to securely connect to their mailboxes with standard email clients like Microsoft Outlook and Apple Mail.

Contents

  • Getting Started

    Installing Packages MySQL Postfix Dovecot Adding New Domains, Email Addresses, and Aliases

    Getting Started

    Setting up a mail server is a big project. Before installing and configuring the necessary packages on your mail server, you should learn what everything does and understand how the components work together to send and receive email. For the purposes of
    this guide, we'll assume that you'll be using the following packages and operating system:

    • Postfix: This Mail Transfer Agent (MTA) handles relaying mail between different servers. It decides what to do with email from the outside world, and whether a particular user is allowed to send email using your server. It handles both
      incoming and outgoing SMTP. Postfix hands off local delivery (that is, the actual saving of the mail files on the server) to Dovecot's Local Mail Transfer Protocol service (LMTP). Postfix also lets Dovecot take care of authentication before users are allowed
      to send email from the server. We'll use version 2.9.6.
    • Dovecot: This IMAP/POP3 server handles requests from users who want to log in and check their email. Dovecot's LMTP service functions as the Mail Delivery Agent (MDA) by saving mail files on the server. Dovecot also handles all authorization.
      It checks users' email addresses and passwords in the MySQL database before allowing them to view or send email. We'll use version 2.0.19.
    • MySQL: This database server stores lookup tables for domains, usernames and passwords, and aliases on the mail server. We'll use version 14.14 Distrib 5.5.29.
    • Ubuntu 12.04 LTS: These instructions are designed to work with Ubuntu 12.04 LTS. Other distributions can also be made to work with Postfix, Dovecot, and MySQL, but those instructions are outside the scope of this guide.

    If you encounter problems while using this guide, please double-check that you are using Ubuntu 12.04, and that the package versions match the ones listed above. You can also consult the

    Troubleshooting Problems with Postfix, Dovecot, and MySQL guide.

    What's Not Covered

    For the sake of brevity, we've decided not to cover the following topics in this guide:

    • Spam and virus scanning for incoming messages to your users. You could use
      SpamAssassin to add that functionality later.
    • Webmail to allow users to access their email from a web browser.
    • GUIs for administration. You could use
      phpMyAdmin for MySQL or
      Postfix Admin for Postfix to add that functionality later.

    Prerequisites

    Before setting up your mail server, you'll need to set up your Linode as specified in the

    Getting Started and
    Securing Your Server guides. You'll also need to verify that you've completed the following steps:

    Once you've verified these prerequisites, you're ready to continue.

    How It Works

    Before we dive into the nitty-gritty of getting everything set up, let's take a look at how we want everything to work together once it's installed. The following process details what happens when an incoming message from the
    someone@somewhereelse.com email account makes its way to your Linode.

    1. someone@somewhereelse.com sends an email to me@mydomain.net.
    2. DNS is checked. The MX record for mydomain.net points to my Linode.
    3. The message reaches Postfix, the MTA.
    4. Postfix checks whether it is allowed to relay for mydomain.net by checking the virtual domains table in MySQL.
    5. MySQL returns a positive response for mydomain.net.
    6. Postfix relays the message using Dovecot's LMTP socket.
    7. Dovecot saves the message to the me@mydomain.net mailbox on the server, which is located at
      /var/mail/mydomain.net/me/.

    The email is now saved in the appropriate mailbox on the server. Next let's see what happens when you check mail. The process starts when you decide you want to check your
    me@mydomain.net email from your local email client.

    1. Local Mail Client to Dovecot: Can I make a secure IMAP Connection?
    2. Dovecot to Local Mail Client: Sure. Here's my SSL certificate. Now I need your username and password.
    3. Local Mail Client to Dovecot: Here's my username and password.
    4. Dovecot to MySQL: MySQL, are this username and password in the users table?
    5. MySQL to Dovecot: Yes. This username and password are in the users table.
    6. Dovecot accesses the mailbox at /var/mail/mydomain.net/me/.
    7. Dovecot gets the mail files.
    8. Dovecot shows the messages to your local mail client using the IMAP protocol.

    Now you can read your email using Outlook, Apple Mail, Thunderbird, etc. Finally, let's see what happens when you send an email message from your account. Let's say you want to send a reply from
    me@mydomain.net back to someone@somewhereelse.com. You compose a message in your local mail client and send it. What happens?

    1. Local Mail Client to Postfix: Can I make an SMTP connection?
    2. Postfix to Local Mail Client: Sure. You have to use encryption. Here's my SSL certificate. Now I need your username and password.
    3. Local Mail Client to Postfix: Here's my username and password.
    4. Postfix to Dovecot: Dovecot, check this username and password for me.
    5. Dovecot to MySQL: MySQL, are this username and password in the users table?
    6. MySQL to Dovecot: Yes. This username and password are in the users table.
    7. Dovecot to Postfix: Postfix, this user is authenticated.
    8. Postfix to Local Mail Client: You are allowed to send your message.
    9. Local Mail Client to Postfix: Here's the message.

    Postfix sends the email. This is known as relaying. The reason there are so many processes involved is for security – you don't want just anyone to be able to send email through your server, otherwise they would quickly start sending lots of spam. The authentication
    process makes it safe for you and your authorized users to send email using this server while blocking everyone else.

    Configuring DNS

    Start thinking about the best time to switch your
    DNS records. Once you switch the MX records, you'll start sending and receiving mail from your Linode. If you currently have live email accounts on another server, you shouldn't change the DNS until you have everything set up and working. In the meantime,
    you can test your mail server setup with the default domain name Linode assigns to your server. And if you're setting up a new domain, you might as well point the DNS records at your Linode now so you don't have to change anything later.

    Either way, you can lower the time to live (TTL) on your domain's zone file now, in anticipation of the upcoming DNS change. This will help the DNS records propagate faster when you're ready to switch them. You should do this whether you are planning to
    change your DNS right away or later.

    When you're ready to switch the DNS and start sending mail to the server, edit your domain's MX record so it points to your Linode's domain or IP address, similar to the example below:

    example.com            MX       10      example.com
    example.com         MX      10      12.34.56.78
    mail.example.com    MX      10      12.34.56.78
    

    Make sure you do this for all domains and subdomains that might receive email for your domain. If you use Linode's

    DNS Manager, you will need to create an MX record that points to the desired domain or subdomain, and then create an A record for that domain or subdomain as well, that points to the correct IP address.

    Installing an SSL Certificate

    You should think about whether you need to purchase a valid SSL certificate or not. In this guide, you'll use the default self-signed certificate that comes with Dovecot for free. This certificate encrypts your mail connections just like a purchased certificate,
    but your email users will receive warnings about the certificate when they attempt to set up their email accounts.

    This can be confusing for users, and it may encourage bad security habits by forcing them to accept a self-signed certificate. If you're going to set up all of your users' mail clients yourself, or if you have a small number of tech-savvy users, this might
    not be a problem. You'll need to use your best judgement to decide whether you need to purchase a signed SSL certificate or not. For information about SSL certificates, see

    these guides in the Linode Library.

    Finding the Hostname

    You'll need your Linode's hostname to configure Dovecot and Postfix. Before following these instructions, make sure you've

    set a hostname. Here's how to find your Linode's hostname:

    1. Open a terminal window and
      log in to your Linode via SSH.

    2. Find your server's hostname by entering the following command, and then make a note of it:

      hostname
      
    3. Find your server's fully-qualified domain name (FQDN) by entering the following command, and then make a note of it:

      hostname -f
      

    Save these hostnames – you'll need them later!

    Installing Packages

    Now that you understand how everything works and have finished preparing your Linode to act as a mail server, let's configure your server for mail. We'll start by installing all of the necessary packages. Here's how:

    Log in as the root user by entering the following command:

    su
    

    Enter the password for the root user when prompted.

    Install the required packages by entering the following command. Here's what you'll install:

    apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysql mysql-server
    

    继续阅读

Posted in Linux系统学习 | Tagged | Leave a comment

基础邮件原理(MUA,MTA,MDA)

架构图:

 

 


 

 

 

 

电子邮件基本概念:

MUA(Mail User Agent)接收邮件所使用的邮件客户端,使用IMAP或POP3协议与服务器通信;

MTA(Mail Transfer Agent) 通过SMTP协议发送、转发邮件;

MDA(Mail Deliver Agent)将MTA接收到的邮件保存到磁盘或指定地方,通常会进行垃圾邮件及病毒扫描;

继续阅读

Posted in 杂项 | Tagged | 2 Comments

哈希(Hash)与加密(Encrypt)的基本原理、区别及工程应用

      今天看到吉日嘎拉 的一篇关于管理软件中信息加密和安全的文章 ,
感觉非常有实际意义。文中作者从实践经验出发,讨论了信息管理软件中如何通过哈希和加密进行数据保护。但是从文章评论中也可以看出很多朋友对这个方面一些 基本概念比较模糊,这样就容易“照葫芦画瓢”,不能根据自身具体情况灵活选择和使用各种哈希和加密方式。本文不对哈希和加密做过于深入的讨论,而是对哈希 和加密的基本概念和原理进行阐述、比较,并结合具体实践说明如何选择哈希和加密算法、如何提高安全性等问题,使朋友们做到“知其然,知其所以然”,这样就 能通过分析具体情况,灵活运用哈希和加密保护数据。

继续阅读

Posted in 杂项 | Tagged | Leave a comment

VPS简单性能测试命令

很多同学,都跟赵容一样,盲目的买进一些VPS,买到了也基本没有测试下VPS的性能,所以,今天我就把几个简单的VPS性能测试(也可以说是查看)命令发出来,大家参考下(新手参考,老鸟请勿见笑)

Top命令显示了实际CPU使用情况,默认情况下,它显示了服务器上占用CPU的任务信息并且每5秒钟刷新一次。你可以通过多种方式分类它们,包括PID、时间和内存使用情况。

继续阅读

Posted in 杂项 | Tagged | Leave a comment

BitNami Redmine搬家

BitNami Redmine的搬家一年前,尝试过一次,结果以失败告终,不得已,采用新旧机器之间逐条记录拷贝的方法,累得我够呛。

网上有些人建议安装同样的版本,然后使用原有的redmine覆盖新的,这个方法我已经试过了,结论是不可以。那么覆盖部分可不可以呢?答案还是不可以,这个我已经试验过了。

继续阅读

Posted in 杂项, 管理 | Tagged , | Leave a comment