Discussion:
Streaming to a Flash Media Server using the rtmpsink element
André Dieb Martins
2012-02-01 14:08:40 UTC
Permalink
Hello,

I'm trying to stream a flv stream into a Flash Media Server using the following pipeline:

GST_DEBUG=2,*rtmp*:5 gst-launch -v videotestsrc ! videorate ! ffmpegcolorspace ! x264enc ! flvmux streamable=true ! queue2 ! rmtpsink location="rtmp://host/app/stream live=1"

This is the result: http://pastebin.com/utD1t4CE

My question is: how should I start debugging? I'm also wondering if the src caps of flvmux are okay.

Thanks in advance.
André Dieb
2012-02-01 14:12:41 UTC
Permalink
Oops, I'm sorry.

I forgot to mention the pipeline closes right after the last line of the
Ari-Pekka Viitanen
2012-02-01 22:33:10 UTC
Permalink
I've had some problems streaming to Wowza with rtmpsink. I've never
actually read the log on that particular problem, because I noticed that
streaming baseline h.264 "solves" the problem (actually just setting
b-frames to 0 does the same).

Could you try if setting "profile=baseline" or "bframes=0" on x264enc has
any effect?
André Dieb
2012-02-02 03:18:31 UTC
Permalink
Hello Ari-Pekak Viitanen,

Firstly thank you for the help.

Setting either one of the parameters you mentioned didn't had any effect. I
just discovered that the RTMP_Write() call on gstrmpsink.c line 258 is
raising a SIGPIPE signal, which is the cause of the abnormal shutdown.

Any idea?
Post by Ari-Pekka Viitanen
I've had some problems streaming to Wowza with rtmpsink. I've never
actually read the log on that particular problem, because I noticed that
streaming baseline h.264 "solves" the problem (actually just setting
b-frames to 0 does the same).
Could you try if setting "profile=baseline" or "bframes=0" on x264enc has
any effect?
_______________________________________________
gstreamer-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
@andredieb <http://www.twitter.com/andredieb>
pratikshinde
2012-02-08 20:04:50 UTC
Permalink
Hello,

I am trying to stream audio + video by using rtmpsink.

My pipeline works well with raw audio + h264(hw accelerated) video
However if I use aac encoded audio(hardware accelerated) and h264(hw
accelerated) video it does not work.
I am trying to do over TI DM3730(omap3)

here is my pipeline :
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=2 !
video/x-raw-yuv,format=\(fourcc\)UYVY ! TIVidenc1 codecName=h264enc
engineName=codecServer resolution=720x480 ! queue2 ! flvmux name=mux alsasrc
! TIAudenc1 codecName=aacheenc engineName=codecServer numChannels=2
samplefreq=44100 bitrate=44000 ! mux. mux. ! queue2 ! rtmpsink
location='rtmp://192.168.2.200/videochat/sankar'

However If I use ffenc_aac instead of TIAudenc1,its working fine.

Here is working pipeline:
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=2 !
video/x-raw-yuv,format=\(fourcc\)UYVY ! TIVidenc1 codecName=h264enc
engineName=codecServer resolution=720x480 ! queue2 ! flvmux name=mux alsasrc
! ffenc_aac ! mux. mux. ! queue2 ! rtmpsink
location='rtmp://192.168.2.200/videochat/sankar'

What is going wrong?

please give suggestions.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4370700.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
André Dieb
2012-02-17 13:12:27 UTC
Permalink
Hi pratik,

I honestly don't know out of my head why it doesn't work, though I'm sure a
log dump with GST_DEBUG=3 might help :)

Just out of curiosity, which server are you using on rtmp://
192.168.2.200/videochat/sankar ? My attempts to stream using rtmpsink and
Flash Media Server did not work, showing a lot of errors on the FMS side.

br
Post by André Dieb Martins
Hello,
I am trying to stream audio + video by using rtmpsink.
My pipeline works well with raw audio + h264(hw accelerated) video
However if I use aac encoded audio(hardware accelerated) and h264(hw
accelerated) video it does not work.
I am trying to do over TI DM3730(omap3)
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=2 !
video/x-raw-yuv,format=\(fourcc\)UYVY ! TIVidenc1 codecName=h264enc
engineName=codecServer resolution=720x480 ! queue2 ! flvmux name=mux alsasrc
! TIAudenc1 codecName=aacheenc engineName=codecServer numChannels=2
samplefreq=44100 bitrate=44000 ! mux. mux. ! queue2 ! rtmpsink
location='rtmp://192.168.2.200/videochat/sankar'
However If I use ffenc_aac instead of TIAudenc1,its working fine.
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=2 !
video/x-raw-yuv,format=\(fourcc\)UYVY ! TIVidenc1 codecName=h264enc
engineName=codecServer resolution=720x480 ! queue2 ! flvmux name=mux alsasrc
! ffenc_aac ! mux. mux. ! queue2 ! rtmpsink
location='rtmp://192.168.2.200/videochat/sankar'
What is going wrong?
please give suggestions.
--
http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4370700.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
@andredieb <http://www.twitter.com/andredieb>
pratikshinde
2012-03-11 18:56:31 UTC
Permalink
Hello André Dieb,

I am streaming to wowza media server,
I found that h264+aac in flv container will not work,
so I am trying with h264+aac in mp4 container, its f4v file format.


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4464408.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Redking
2012-03-15 00:26:00 UTC
Permalink
Hi,

I had (probably) the same problem.

Add this caps filter after your faac entry :

audio/mpeg,mpegversion=4,stream-format=raw

Because flvmux only accept raw aac on his audio sink.

It solves my problem, hope it will solves yours too.

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4473569.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
pratikshinde
2012-03-15 14:54:36 UTC
Permalink
Hello,

could you please share your pipeline its still not working for me.


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4475244.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Redking
2012-03-16 11:45:32 UTC
Permalink
Example working pipeline (file streamed in "real time") :

gst-launch filesrc location=movies/big_buck_bunny_480p_surround-fix.avi !
decodebin name=demux ! queue ! videorate ! videoscale method=0 !
video/x-raw-yuv,width=852,height=480,framerate=\(fraction\)24/1 !
ffmpegcolorspace ! x264enc pass=pass1 threads=0 bitrate=900 tune=zerolatency
! flvmux name=mux ! rtmpsink
location='rtmp://my.rtmp.server/live/stream_name' demux. ! queue !
progressreport ! audioconvert ! audiorate ! audioresample ! *faac
bitrate=96000 ! audio/mpeg,mpegversion=4,stream-format=raw *! mux.

Working with Wowza and crtmpserver.

I'm using gstreamer 0.10.36 and these plugins versions :

Plugin Details:
Name: rtmp
Description: RTMP source and sink
Filename: /usr/lib/gstreamer-0.10/libgstrtmp.so
Version: 0.10.23
License: LGPL
Source module: gst-plugins-bad
Source release date: 2012-02-20
Binary package: GStreamer Bad Plugins (Archlinux)
Origin URL: http://www.archlinux.org/

...

Plugin Details:
Name: faac
Description: Free AAC Encoder (FAAC)
Filename: /usr/lib/gstreamer-0.10/libgstfaac.so
Version: 0.10.23
License: LGPL
Source module: gst-plugins-bad
Source release date: 2012-02-20
Binary package: GStreamer Bad Plugins (Archlinux)
Origin URL: http://www.archlinux.org/






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4477963.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Redking
2012-03-15 00:22:33 UTC
Permalink
Hi,

I had (probably) the same problem.

Add this caps filter after your faac entry :

*audio/mpeg,mpegversion=4,stream-format=raw*

Because flvmux only accept raw aac on his audio sink.

It solves my problem, hope it will solves yours too.

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-to-a-Flash-Media-Server-using-the-rtmpsink-element-tp4347963p4473565.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Loading...