Rtmp to m3u8

3,728 views
Skip to first unread message

Liu Han

unread,
Mar 20, 2011, 11:14:06 AM3/20/11
to c-rtmp...@googlegroups.com

dear mate

Is there any way to stream rtmp to HLS (m3u8 live stream) through crtmpserver

发自我的 iPhone

Madhawa Jayanath

unread,
Mar 20, 2011, 11:23:31 AM3/20/11
to c-rtmp...@googlegroups.com, Liu Han
Hello Liu,

crtmpserver ---> FFmpeg(with RTMP support)--->Segmenter(https://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor)--->Nginx
at least this works for me very well :)



You received this message because you are subscribed to "C++ RTMP Server" mailing list.
To post to this group, send email to c-rtmp...@googlegroups.com
To unsubscribe from this group, send email to
c-rtmp-serve...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/c-rtmp-server?hl=en



--
Best regards,
Madhawa Jayanath

Senior Software Engineer
101 Global Co.,Ltd.
999/9 # 2409 Rama 1, Pathumwan
Bangkok, 10330. Thailand
INUM +883-510-07-403-6540
Tel. +66.840839412
FAX. +66.26480995


Sent from my NoteBook® by Hand

Madhawa Jayanath

unread,
Jun 1, 2011, 5:59:00 AM6/1/11
to c-rtmp...@googlegroups.com
Hello Friends,
If you want to try Apple HTTP live Streaming with CRTMP server. try this :)
You need 
1) VLC Player (nightly builds)
2) Nginx Webserver
3) Free time

Here is the flow

[live VDO source]----RTMP---->[CRTMP]-----RTSP----->[VLC Player]------[WEB Server/NGINX]------->[iOS]

This solution is better than Wowza :)

For VLC on Windows XP 32 bit
=======================
1) Install VLC media player latest nightly builds from http://nightlies.videolan.org/build/win32/
2) Install Nginx 


"c:/nginx-1.0.3/html/" is Nginx document root

Han Liu

unread,
Jun 2, 2011, 8:42:53 PM6/2/11
to c-rtmp...@googlegroups.com
great mate it works

-- 
Han Liu
Sent with My AIR

Madhawa Jayanath

unread,
Jun 2, 2011, 9:16:42 PM6/2/11
to c-rtmp...@googlegroups.com
Hello,
Yep. My test stream is up & running for 3 days now :)
Today I'll have free time & will install on Ubuntu box too.


2011/6/3 Han Liu <cn.l...@gmail.com>

Max Lapshin

unread,
Jun 3, 2011, 12:26:16 AM6/3/11
to c-rtmp...@googlegroups.com
2011/6/1 Madhawa Jayanath <mad...@101g.com>:

> Hello Friends,
> If you want to try Apple HTTP live Streaming with CRTMP server. try this :)
> You need
> 1) VLC Player (nightly builds)
> 2) Nginx Webserver
> 3) Free time
> Here is the flow
> [live VDO source]----RTMP---->[CRTMP]-----RTSP----->[VLC Player]------[WEB
> Server/NGINX]------->[iOS]

Good luck with killing your hard drive with this schema.

Madhawa Jayanath

unread,
Jun 3, 2011, 12:27:58 AM6/3/11
to c-rtmp...@googlegroups.com
Hello Max,
Don't worry.
use RAM Disk.


You received this message because you are subscribed to "C++ RTMP Server" mailing list.
To post to this group, send email to c-rtmp...@googlegroups.com
To unsubscribe from this group, send email to
c-rtmp-serve...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/c-rtmp-server?hl=en

C++ RTMP Server

unread,
Jun 4, 2011, 6:17:01 AM6/4/11
to c-rtmp...@googlegroups.com

On Jun 3, 2011, at 7:27 AM, Madhawa Jayanath wrote:

> Hello Max,
> Don't worry.
> use RAM Disk.

Yes, this is very important piece of information. Max was right. I personally killed an SSD drive but not with this schema. I was doing VOD on a production server using SSD as storage. The poor disk didn't last for more than 3 weeks. I was having between 200-300 concurrent connections and people connecting were doing quite a lot of indirect seeks on the disks, especially with bad formatted media files (mp4) in which instead of interleaving the audio and video tracks, there were put in a totally separate file regions. So, the server was seeking inside the file back and forth way too many times to serve adjacent audio and video frames. They should be put close together inside the mp4 file, not in different regions.

Again, the mp4 file(s) structure was "legally" correct, but not optimized :(

Rule of thumb... Be careful with disks if you are not going to serve the files in an orderly fashion (starting from beginning of the file and never go back)

Cheers,
Andrei

------
Eugen-Andrei Gavriloaie
Web: http://www.rtmpd.com

Max Lapshin

unread,
Jun 4, 2011, 6:23:29 AM6/4/11
to c-rtmp...@googlegroups.com
Eugen. Am I right, that it is basically a good idea to reorganize mp4
in sorted DTS mode?

C++ RTMP Server

unread,
Jun 4, 2011, 6:29:08 AM6/4/11
to c-rtmp...@googlegroups.com

On Jun 4, 2011, at 11:23 AM, Max Lapshin wrote:

> Eugen. Am I right, that it is basically a good idea to reorganize mp4
> in sorted DTS mode?

Definitely! It will work much faster and relief the HDDs from such big stress.
Usually, this "bogus" mp4 files are resulted from recording live sources. The app doing the recording, because it doesn't know when the file ends, it creates multiple fixed-length mp4 files with fixed regions for audio and video tracks. What that app should do after closing a file, is to re-organize it, not leaving it like that. The second approach is to just use MOOF atoms (movie fragments), instead of MOOV atoms

Cheers,
Andrei

Madhawa Jayanath

unread,
Jun 4, 2011, 7:35:19 AM6/4/11
to c-rtmp...@googlegroups.com
Hello Andrei,
I didn't test with VoD.
I'm doing live streaming only.
I've done a set-up on linux box+ Ramdisk +Nginx  and which serves 500 concurrent streams over 24 hours.
I use Python script(multiple instance) to download m3u8 & ts files.
I didn't notice any I/O issues :)

Max Lapshin

unread,
Jun 4, 2011, 7:54:13 AM6/4/11
to c-rtmp...@googlegroups.com
On Sat, Jun 4, 2011 at 2:29 PM, C++ RTMP Server <crtmp...@gmail.com> wrote:
>
> On Jun 4, 2011, at 11:23 AM, Max Lapshin wrote:
>
>> Eugen. Am I right, that it is basically a good idea to reorganize mp4
>> in sorted DTS mode?
> Definitely! It will work much faster and relief the HDDs from such big stress.
> Usually, this "bogus" mp4 files are resulted from recording live sources. The app doing the recording, because it doesn't know when the file ends, it creates multiple fixed-length mp4 files with fixed regions for audio and video tracks. What that app should do after closing a file, is to re-organize it, not leaving it like that. The second approach is to just use MOOF atoms (movie fragments), instead of MOOV atoms
>

It is very bad. Erlyvideo recorder dumps frame by frame and only after
records moov atom.

Reply all
Reply to author
Forward
0 new messages