EasyRTMP failed to startup in release version after upgraded to the latest version of ffmpeg

To enhance the OSD functions for EasyRTMP, I tried to upgraded the ffmpeg to the latest version(2.2.4).

After a bounch of code/interface adjustment, it finally passed the test in debug version. But while I tried to bulid it in release version, and tried to run it.

A familiar dialog poped out.
release-version-can-not-work-due-to-ffmpeg
So I tried to use the Dependency Walker to locate the issue.

As you can see, there was nothing, not even a single interface being found.
dependency-walker-for-easyrtmpSo I decided it was a link-time issue, maybe the interfaces definitions were stripped out in the linking time.

Go back to the Visual Studio, open Project Properties –> Linker –> Optimization, find the References property in the right side of the propery page, and try change the setting to “Keep Unreferenced Data(/OPT:NOREF)”.
compiling-project-with-the-latest-ffmpeg-in-VS2008

Now rebuild the project and launch it. God, it worked, XDXD.

New release of EasyRTMP

A new release of EasyRTMP has been launched, the major change in this version is:

Added a test win32 version of streaming server(nginx) with rtmp and HLS supported to the EasyRTMP project.

Try it if you like.

Per my local test it seem good than the previous version.

My goal is to simplify the demo environments, I’m also prepared a windows version of nginx compiled with rtmp & HLS supported. So that you can test the EasyRTMP in your local Windows OS PC, rather than my poor VPS. Continue reading “New release of EasyRTMP”

Re-open EasyRTMP project

Just confirmed that my VPS supports nginx and rtmp yesterday, so I went and digged out my ancient code of EasyRTMP, tried to re-compile it.

Codes of DVR & RTP streams relay mode are lost in my previous disaster of hard disk broken at last year which caused the lost of almost my 10+ years of coding expirence(tragic,isn’t it, so now have two mobile hard disks to backup all my data).
However, the remain code of EasyRTMP worked for captured video from webcam.

The current version supports only video(H.264), not for audio, and now I’ve got my VPS worked for RTMP stream, maybe I will  re-pick it up, and try make it work for both video and audio.

I’ll take it for consideration, but I need time to implement it.

Here is the latest version of EasyRTMP with source code I still have, http://rg4.net/easyrtmp.
You can download it, run it after extracted it, make it start, then open a browser and navigate to http://live.rg4.net/easyrtmp.

It should work for you, but try not test it long, because my VPS has its limitation in traffic, and bandwidth too, if you want test it long, you should build an nginx + nginx-rtmp-module environemnt for yourself, to do that, you can follow this guild: http://rg4.net/archives/1473.html.

[RTMP]JWPLAYER: Could not connect to server

Days ago, I reinstalled nginx + nginx-rtmp-module on my notebook, and had it tested in my local environment with firefox and VLC player, made sure it worked(You can refer to this post for guide: http://rg4.net/archives/1414.html).

However, when I tried to redo the working on my VPS, only to find that it failed to connected to the stream with JWPlayer. Continue reading “[RTMP]JWPLAYER: Could not connect to server”

A simple guide to start rtmp streaming with nginx

I was once using nginx, nginx-rtmp-module and EasyRTMP(http://rg4.net/easyrtmp) to streaming live video with rtmp mode.

It was just for fun, and I didn’t find a chance to utilize it in work. I suggested it to my boss year ago, but it was turned down, comparing to the works on schedule it was always a minor factor to the products. So one day when I found my disk out of usage, I re-installed my OS without backup any data of the previous working environment. Continue reading “A simple guide to start rtmp streaming with nginx”

Getting started with nginx rtmp

Download, build and install

CD to build directory (home)

cd /usr/build

Download & unpack latest nginx-rtmp (you can also use http)

git clone git://github.com/arut/nginx-rtmp-module.git

Download & unpack nginx (you can also use svn)

wget http://nginx.org/download/nginx-1.2.4.tar.gz
tar xzf nginx-1.2.4.tar.gz
cd nginx-1.2.4

Build nginx with nginx-rtmp

./configure --add-module=/usr/build/nginx-rtmp-module
make
make install

For nginx 1.3.4-1.5.0 more options are needed

./configure --add-module=/usr/build/nginx-rtmp-module --with-http_ssl_module
make
make install

Set up live streaming

To set up RTMP support you need to add rtmp{} section to nginx.conf (can be found in PREFIX/conf/nginx.conf). Stock nginx.conf contains only http{} section.

Use this nginx.conf instead of stock config:

#user  nobody;
worker_processes  1;

error_log  logs/error.log debug;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       8080;
        server_name  localhost;

        # sample handlers
        #location /on_play {
        #    if ($arg_pageUrl ~* localhost) {
        #        return 201;
        #    }
        #    return 202;
        #}
        #location /on_publish {
        #    return 201;
        #}

        #location /vod {
        #    alias /var/myvideos;
        #}

        # rtmp stat
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        location /stat.xsl {
            # you can move stat.xsl to a different location
            root /usr/build/nginx-rtmp-module;
        }

        # rtmp control
        location /control {
            rtmp_control all;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

rtmp {
    server {
        listen 1935;
        ping 30s;
        notify_method get;

        application myapp {
            live on;

            # sample play/publish handlers
            #on_play http://localhost:8080/on_play;
            #on_publish http://localhost:8080/on_publish;

            # sample recorder
            #recorder rec1 {
            #    record all;
            #    record_interval 30s;
            #    record_path /tmp;
            #    record_unique on;
            #}

            # sample HLS
            #hls on;
            #hls_path /tmp/hls;
            #hls_sync 100ms;
        }

        # Video on demand
        #application vod {
        #    play /var/Videos;
        #}

        # Video on demand over HTTP
        #application vod_http {
        #    play http://localhost:8080/vod/;
        #}
    }
}

Statistics

Navigate your browser to http://localhost:8080/stat to see current streaming statistics, connected clients, bandwidth etc.

Publishing with ffmpeg

The easiest way to publish live video stream is using ffmpeg (or avconv). It’s already installed on most systems and easy to install on others.

RTMP supports only a limited number of codecs. The most popular RTMP video codecs are H264, Sorenson-H263 (aka flv) and audio codecs AAC, MP3, Nellymoser, Speex. If your video is encoded with these codecs (the most common pair is H264/AAC) then you do not need any conversion. Otherwise you need to convert video to one of supported codecs.

We’ll stream test file /var/videos/test.mp4 to server with ffmpeg.

Streaming without conversion (given test.mp4 codecs are compatible with RTMP)

ffmpeg -re -i /var/Videos/test.mp4 -c copy -f flv rtmp://localhost/myapp/mystream

Streaming and encoding audio (AAC) and video (H264), need libx264 and libfaac

ffmpeg -re -i /var/Videos/test.mp4 -c:v libx264 -c:a libfaac -ar 44100 -ac 1 -f flv rtmp://localhost/myapp/mystream

Streaming and encoding audio (MP3) and video (H264), need libx264 abd libmp3lame

ffmpeg -re -i /var/Videos/test.mp4 -c:v libx264 -c:a libmp3lame -ar 44100 -ac 1 -f flv rtmp://localhost/myapp/mystream

Streaming and encoding audio (Nellymoser) and video (Sorenson H263)

ffmpeg -re -i /var/Videos/test.mp4 -c:v flv -c:a nellymoser -ar 44100 -ac 1 -f flv rtmp://localhost/myapp/mystream

Publishing video from webcam

ffmpeg -f video4linux2 -i /dev/video0 -c:v libx264 -an -f flv rtmp://localhost/myapp/mystream

Playing with ffplay

ffplay rtmp://localhost/myapp/mystream

Publishing and playing with flash

See test/rtmp-publisher directory for test flash applets and html.

EasyRTMP开源了

经过两周的投票,最终的结果是EasyRTMPRTSPPlayer的人气高一点,十一后又加了两天,结果EasyRTMP拔了头,坦白说,这个结果是让我有点失望的,因为无论是技术上讲,还是从实用程度上来说,这两个明显不是最能“引导流媒体潮流”的东西,尤其是EasyRTMP更甚。

而从另一个角度来看,流媒体开发论坛上这么多人,流媒体开发群里有那么数百个人,这个投票搞了将近两个星期也就这么三十几个人,如此看来真正对开源项目感兴趣的人还真少,更别提会去做开源项目了。

罢了。 Continue reading “EasyRTMP开源了”

EasyRTMP更新到1.3.0.41

由于之前的版本在Windows 7下面跑总是有问题(视频采集的原因),恰好前两天安装了Windows 7,所以今天就把代码再稍微改了一下下,终于,EasyRTMP也可以支持Windows 7了。

此外,由于EasyRTMP/EzStreamSvr/EasyDSS等等工程其实有很多很多的代码都是重复了,为了日后维护的方便,特地把许多功能独立成一个个的DLL,这样,每个工程都可以使用,同时,万一发现什么问题,也可以只改一个DLL就可以了,不需要所有的工程都去改一遍。所以,这也是一个大变革(对于软件工程而言,并不是针对功能)。

建议大家下载新的程序使用。

下载地址:http://rg4.net/easyrtmp

介绍说明:http://rg4.net/easyrtmp

 

 

EasyRTMP – 基于RTMP H.264的视频监控平台

 

EasyRTMP - 基于RTMP H.264的视频监控平台
EasyRTMP - 基于RTMP H.264的视频监控平台

一直在搞视频监控系统,既然可以支持RTMP,为什么不做 一个基于RTMP的视频监控系统呢?所以我想,闲着也是闲着,就在EasyRTMP的基础上搞了这么一个东西,把大华的8路 H.264硬件压缩卡采集数据,用RTMP流发布,这样就可以让视频监控的客户端也无需安装任何插件,兼容所有Flash播放器平台。CentOS实现, 在ATOM CPU + 1G内存上完全不卡, 整机功耗只有30W。

更多关于EasyRTMP的介绍可浏览网页:http://rg4.net/easyrtmp

EasyRTMP 1.0发布

EasyRTMP

EasyRTMP其实跟EzStreamSvr差不多,它也是一个视频直播系统,只不过,EzStreamSvr是基于RTSP + RTP技术的,而EasyRTMP则是基于RTMP的。

EasyRTMP走的是Red5/FMS的解决方案,此方案最大的一个特点是客户端只要有Adobe Flash就可以了,而事实上Flash可以说是全世界装机量最高的一个软件(注意:没有之一),只要是台电脑、是个智能手机,不管你用的是什么操作系统,都有Flash,或者都可以有Flash,因此,也就是说要看EasyRTMP直播出来的视频不需要安装任何的客户端软件。

下载地址

注意

  • 要想让整个系统工作起来,您还必须安装一个Red5 Server 或者 FMS Server。
  • Demo版本只能放5分钟的实时视频,若超过5分钟,您必须重新点击EasyRTMP.exe中的Start按钮,才能继续实时视频直播(也即Demo版本您必须每5分钟点一次Start)。

Live Demo:

在RG4.NET有放一个demo,但Red5服务器不一定长时间开着,若有需要观看Demo效果,您可以打开网页:

http://rg4.net/p/easyrtmp/client/live.html

并:

a. 在其中的Server处填入您的Red5/FMS 服务器地址。如:rtmp://rtmp.rg4.net/live

b. 在Stream处填入0_320x240,然后点击Play。注:0_320×240的格式意义:第一个0代表第一个摄像头;320×240代表EasyRTMP捕捉并编码出来的视频解析度为320×240。

这样您就可以观看到EasyRTMP Public到Red5/FMS的实时视频。

意见反馈:

若您对EasyRTMP有任何的问题,欢迎随时与我们取得联络。