How to do rtmp streaming programmatically

Topics regarding RTMPDump.
Post Reply
rhbc73
Posts: 2
Joined: Wed Jul 25, 2012 2:34 am

How to do rtmp streaming programmatically

Post by rhbc73 » Tue Jan 06, 2015 7:12 am

Hi guys,

I'm now planning to add Youtube streaming feature into my program. It already has the ability to capture from a webcam and save to a MP4 file using ffmpeg.

As we know ffmpeg command line tool can be used to stream to Youtube live directly, just replace the normal file name with an URL starting with rtmp://xxx in a normal convert command will do the work (assuming all encoding parms are correct).

Below is the example code in muxing.c from doc/examples comes with ffmpeg sourcecode.
What I want to know is, if I supply a "rtmp://xxx" string as the filename, will the compiled program, like the ffmpeg command line tool, transparently do all those connecting, handshaking stuff so I can do a rtmp streaming just like convert to a file?

Thanks
Attachments
Capture.PNG

rogerdpack
Posts: 1871
Joined: Fri Aug 05, 2011 9:56 pm

Re: How to do rtmp streaming programmatically

Post by rogerdpack » Fri Apr 17, 2015 1:12 pm

if you pass it the right url it "should" though I don't know if it does auto reconnect [librtmp might have an option for it]. GL!

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests