1

I'm new to Gstreamer. I'm trying to do network streaming using gstreamer. I could achieve that using below gst commands. Its working fine for me.

At transmitter : gst-launch-1.0 -v filesrc location=/home/user/Downloads/big_buck_bunny_480p_h264.mov ! decodebin ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

At receiver : gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink

Here , I'm using same Ubuntu PC for transmitting and receiving the video.

But now I want to play the received video on my android phone instead of ubuntu PC. I mean the ubuntu PC should act as transmitter and Android phone as receiver. Is there any way to achieve this ?

The android phone is connected to network 10.xx.yy.zz . (Android phone and Ubuntu PC are in same LAN) So I changed the udpsink host at transmitter as 10.xx.yy.zz . Now I was expecting the video to be played on android device . But it didnt . I'm getting following log messages at transmitter and receiver side

At Transmitter: /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, codec_data=(buffer)0164001effe1001a6764001eacd940d83de6f011000003000100000300308f162d9601000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high, width=(int)854, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)24/1 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 456403579 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 50171 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock

At Receiver: (string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink Setting pipeline to PAUSED ... /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96 /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96 Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock

Please help. Thanks in advance.

deepu
  • 147
  • 2
  • 12

1 Answers1

0

For android you can use vlc for that.. maybe you would need sdp file for this stream, like in this question - check comments.

Or you can do that without sdp by using mpegtsmux like in this answer.. on vlc you would then go with "Open live stream" and put there udp://@:5000 (where 5000 is the port which you used at sender pipe)

To the IP question - if its on same LAN as Ubuntu PC yes it will work(if not edit your question with details).

You can try with another PC(instead android) and vlc - using mpegtsmux as I described above.

Community
  • 1
  • 1
nayana
  • 3,787
  • 3
  • 20
  • 51
  • Hi otopolsky, As per your suggestion , I would like to implement this using SDP. SDP is new topic for me :( I checked on net but could not find convincing solution to do the SDP setup. Can you please share me if you have any information regarding SDP file setup? Regarding IP question -- Yes Both PC(trasnmitter) and android phone(receiver) are ion same LAN. I changed the udpsink host as 10.xx.yy.zz (IP of android phone) , but there is no activity observed on phone side. The transmitter terminal displays & pauses at : Pipeline is PREROLLED. Setting piepline to Playing New clock : GstSystemClock – deepu Apr 14 '16 at 06:31
  • @deepu have you figured it out? I forgot to answer this comment, you just create sdp file maybe similar to [this question](http://stackoverflow.com/a/13234988/3876138) and then somehow pass that to vlc.. I am not sure how to do that on android version of vlc.. – nayana May 10 '16 at 11:37