artclarke / humble-video

Humble Video: Demuxing, Decoding, Filtering, Encoding and Muxing of 100's of video and audio formats and Codecs from the JVM
GNU Affero General Public License v3.0
557 stars 115 forks source link

Example to Read RTMP Stream #95

Open kuyajon opened 8 years ago

kuyajon commented 8 years ago

Is there example for Humble Video to read RTMP live stream? There are many examples on the net for Xuggle but all are dead links so it is hard to research.

DemuxerFormat flvFormat = DemuxerFormat.findFormat("flv"); Demuxer demuxer = Demuxer.make(); demuxer.open("rtmp://mydomain.com/rtmp/temp", flvFormat, false, false, null, null);

I can only proceed with open when I pass the demuxer format and false to query metadata. But if there are no metadata, then I don't have decoders.

jtanul commented 8 years ago

It is working now, the issue is it ca't read live stream from nginx-rtmp. I switched to crtmpserver and it works perfectly.

Just need to append live=1 to the url and also do not query meta on open.