<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Ok, made a little bit of progress.  I'm
      able to play an rtsp video stream generated by vlc.  This at least
      confirms that the test app is capable of playing an rtsp, which is
      good because I was starting to doubt that. <br>
      <br>
      I used the vlc wizard to set it up and the generated output string
      is as follows:<br>
       
      <meta name="qrichtext" content="1">
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment-->:sout=#transcode{vcodec=h264,vb=500,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=8000}:rtp{sdp=<a class="moz-txt-link-freetext" href="rtsp://:8554/test">rtsp://:8554/test</a>}
        :sout-keep<!--EndFragment--></p>
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
      For some reason the audio doesn't work, but I know its at least
      detecting the audio stream because if I set the codec in VLC to
      anything other than MPEG 4 Audio (AAC), MPEG Audio, or Vorbis,
      android refuses to play it at all. With one of those 3, it plays
      the video but not the audio.  I'm not terribly concerned with the
      audio part right now; I can play with that later if I at least get
      video working from gstreamer. <br>
      <br>
      Does the VLC output stream that I discovered to work differ in any
      significant ways from the gstreamer pipeline I was trying
      earlier?  Are there any gstreamer element options that would be
      needed in order to match the vlc version?<br>
      <br>
      Thanks<br>
      <br>
      On 08/16/2012 03:42 PM, Chuck Crisler wrote:<br>
    </div>
    <blockquote
cite="mid:CALXOHKpUc9gXpBszM1WF23q0zv+rCoGTydG-MSjr+iNxj=jX_g@mail.gmail.com"
      type="cite">Sorry, but I don't see anything. You might try setting
      up a different RTSP server (VLC?) and test that for comparison.
      Capture a wireshark trace to see the detail difference. Also, look
      up the Android error code -2147483648 to see what it means.<br>
      <br>
      <div class="gmail_quote">On Thu, Aug 16, 2012 at 3:05 PM, John
        Ruemker <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:john.ruemker@gmail.com" target="_blank">john.ruemker@gmail.com</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          I've switched to baseline profile and 500Kbps bitrate on
          x264enc, and scaled the resolution and framerate on videoscale
          to match the parameters specified in the android requirements,
          with no change in behavior on the client.<br>
          <br>
            gst_rtsp_media_factory_set_launch(factory, "( "<br>
            "filesrc location=/home/jruemker/Download/star.mkv ! "<br>
            " decodebin name=dec dec. ! queue ! videoscale !
          video/x-raw-yuv,width=480,height=360,framerate=(fraction)30/1
          ! "<br>
            " x264enc profile=1 bitrate=500 ! "<br>
            "rtph264pay name=pay0 pt=96 "<br>
            ")");
          <div class="HOEnZb">
            <div class="h5"><br>
              <br>
              <br>
              On 08/16/2012 02:01 PM, John Ruemker wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                Here's the entire communication between client &
                server (148 is client, 9 is server):<br>
                <br>
                 30   7.108768 192.168.2.148 -> 192.168.2.9  TCP 74
                49571 > rtsp-alt [SYN] Seq=0 Win=14600 Len=0 MSS=1460
                SACK_PERM=1 TSval=37853209 TSecr=0 WS=2<br>
                 36   7.312196  192.168.2.9 -> 192.168.2.148 TCP 74
                rtsp-alt > 49571 [SYN, ACK] Seq=0 Ack=1 Win=14480
                Len=0 MSS=1460 SACK_PERM=1 TSval=391976951
                TSecr=37853209 WS=128<br>
                 38   7.327221 192.168.2.148 -> 192.168.2.9  TCP 66
                49571 > rtsp-alt [ACK] Seq=1 Ack=1 Win=14600 Len=0
                TSval=37853257 TSecr=391976951<br>
                 39   7.336107 192.168.2.148 -> 192.168.2.9  RTSP 201
                DESCRIBE <a class="moz-txt-link-freetext" href="rtsp://">rtsp://</a><a moz-do-not-send="true"
                  href="http://192.168.2.9:8554/test" target="_blank">192.168.2.9:8554/test</a>
                RTSP/1.0<br>
                 40   7.336199  192.168.2.9 -> 192.168.2.148 TCP 66
                rtsp-alt > 49571 [ACK] Seq=1 Ack=136 Win=15616 Len=0
                TSval=391977178 TSecr=37853258<br>
                 47   8.287674  192.168.2.9 -> 192.168.2.148 RTSP/SDP
                619 Reply: RTSP/1.0 200 OK, with session description<br>
                 49   8.349307 192.168.2.148 -> 192.168.2.9  TCP 66
                49571 > rtsp-alt [ACK] Seq=136 Ack=554 Win=15706
                Len=0 TSval=37853462 TSecr=391978130<br>
                 51   8.391433 192.168.2.148 -> 192.168.2.9  TCP 66
                49571 > rtsp-alt [FIN, ACK] Seq=136 Ack=554 Win=15706
                Len=0 TSval=37853469 TSecr=391978130<br>
                 52   8.391511  192.168.2.9 -> 192.168.2.148 TCP 66
                rtsp-alt > 49571 [FIN, ACK] Seq=554 Ack=137 Win=15616
                Len=0 TSval=391978234 TSecr=37853469<br>
                 54   8.394598 192.168.2.148 -> 192.168.2.9  TCP 66
                49571 > rtsp-alt [ACK] Seq=137 Ack=555 Win=15706
                Len=0 TSval=37853471 TSecr=391978234<br>
                <br>
                <br>
                Packet 47 (the reply RTSP/1.0 200 OK) contains the
                following info in the SDP portion:<br>
                <br>
                Session Description Protocol Version (v): 0<br>
                Owner/Creator, Session Id (o): - 1188340656180883 1 IN
                IP4 192.168.2.9<br>
                Session Information (i): rtsp-server<br>
                Session Attribute (a): type:broadcast<br>
                Session Attribute (a): control:*<br>
                Session Attribute (a): range:npt=0.000000-60.767000<br>
                Media Description, name and address (m): video 0 RTP/AVP
                96<br>
                Connection Information (c): IN IP4 192.168.2.9<br>
                Media Attribute (a): rtpmap:96 H264/90000<br>
                Media Attribute (a): control:stream=0<br>
                Media Attribute (a): fmtp:96 sprop-parameter-sets=Z0LAH9kAUARbARAAAAMAF3NZQADxgySAAA==,aMuMsg==<br>
                <br>
                Full tcpdump is attached if it helps.<br>
                <br>
                Regarding the app on the android side, I'm using a
                VideoView element to play.  Supposedly you can just hand
                off the RTSP URI to a VideoView and call the play
                function and it works.  The test I'm using is pretty
                basic:<br>
                <br>
                package org.ruemker.play_rtsp;<br>
                <br>
                import android.app.Activity;<br>
                import android.net.Uri;<br>
                import android.os.Bundle;<br>
                import android.widget.MediaController;<br>
                import android.widget.VideoView;<br>
                <br>
                public class MainActivity extends Activity {<br>
                <br>
                    String SrcPath = "<a class="moz-txt-link-freetext" href="rtsp://">rtsp://</a><a moz-do-not-send="true"
                  href="http://192.168.2.9:8554/test" target="_blank">192.168.2.9:8554/test</a>";<br>
                <br>
                    @Override<br>
                    public void onCreate(Bundle savedInstanceState) {<br>
                        super.onCreate(savedInstanceState);<br>
                        setContentView(R.layout.activity_main);<br>
                        VideoView myVideoView =
                (VideoView)findViewById(R.id.myvideoview);<br>
                        myVideoView.setVideoURI(Uri.parse(SrcPath));<br>
                        myVideoView.setMediaController(new
                MediaController(this));<br>
                        myVideoView.requestFocus();<br>
                        myVideoView.start();<br>
                    }<br>
                <br>
                }<br>
                <br>
                <br>
                On 08/16/2012 01:44 PM, Loren Rogers wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Wireshark would help, and you can show "handshaking"
                  RTSP negotiation.<br>
                    What happens in RTSP is a client sends a request
                  which if you look @<br>
                  the RTSP packets it looks like a URI with a specific
                  format. You'll<br>
                  want to make sure that that URI looks correct and that
                  the android<br>
                  video rendering mechanism is configured to receive
                  that specific media<br>
                  and it's properties.  Also I'm not sure about what
                  application you are<br>
                  using on the Android side to request a RTSP session
                  and render the<br>
                  media.  But if you are using an app from Google play
                  I'd read up on<br>
                  the help if they have it.  Also have a read of RTSP
                  RFC couldn't hurt<br>
                  either.<br>
                  /Loren<br>
                  <br>
                  On Thu, Aug 16, 2012 at 1:37 PM, Chuck Crisler <<a
                    moz-do-not-send="true"
                    href="mailto:ccrisler@mutualink.net" target="_blank">ccrisler@mutualink.net</a>>
                  wrote:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    Sounds like a job for wireshark.<br>
                    <br>
                    <br>
                    On Thu, Aug 16, 2012 at 1:29 PM, Loren Rogers <<a
                      moz-do-not-send="true"
                      href="mailto:loren.rogers@gmail.com"
                      target="_blank">loren.rogers@gmail.com</a>><br>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      If the log is from the Android device, what it
                      looks like is that the<br>
                      Android device is missing the caps negotiation
                      (probably SDP) that's<br>
                      sent from the RTSP server.  OR the Android device
                      is trying to open a<br>
                      file with poorly formed stream information.<br>
                      <br>
                      On Thu, Aug 16, 2012 at 1:15 PM, John Ruemker <<a
                        moz-do-not-send="true"
                        href="mailto:john.ruemker@gmail.com"
                        target="_blank">john.ruemker@gmail.com</a>><br>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        I was wondering if the alawenc audio encoder is
                        the problem, considering<br>
                        the<br>
                        android doc states you should use AAC-LC.
                         However if I try to switch to<br>
                        ffenc_aac I can't get a stream that even vlc
                        will play. I'm not really<br>
                        sure<br>
                        with rtp payloader goes with ffenc_aac.  So
                        ultimately, I decided to<br>
                        just<br>
                        remove the audio stream for now and see if I
                        could get video working.<br>
                        VLC<br>
                        plays it fine, but android still won't, so the
                        issue is likely somewhere<br>
                        in<br>
                        the x264enc part.<br>
                        <br>
                        The logs from the android MediaPlayer and
                        VideoView classes are not very<br>
                        specific.<br>
                        <br>
                        <br>
                        08-16 13:12:39.320: D/OpenGLRenderer(30587):
                        Flushing caches (mode 0)<br>
                        08-16 13:12:39.350: D/OpenGLRenderer(30587):
                        Flushing caches (mode 1)<br>
                        08-16 13:12:45.555: D/libEGL(30783): loaded<br>
                        /system/lib/egl/libEGL_mali.so<br>
                        08-16 13:12:45.555: D/libEGL(30783): loaded<br>
                        /system/lib/egl/libGLESv1_CM_mali.so<br>
                        08-16 13:12:45.560: D/libEGL(30783): loaded<br>
                        /system/lib/egl/libGLESv2_mali.so<br>
                        08-16 13:12:45.635: D/OpenGLRenderer(30783):
                        Enabling debug mode 0<br>
                        08-16 13:12:45.645: D/MediaPlayer(30783):
                        Couldn't open file on client<br>
                        side,<br>
                        trying server side<br>
                        08-16 13:12:45.800: D/MediaPlayer(30783):
                        getMetadata<br>
                        08-16 13:12:45.905: E/MediaPlayer(30783): error
                        (1, -<a moz-do-not-send="true"
                          href="tel:2147483648" value="+12147483648"
                          target="_blank">2147483648</a>)<br>
                        08-16 13:12:45.905: E/MediaPlayer(30783): Error
                        (1,-<a moz-do-not-send="true"
                          href="tel:2147483648" value="+12147483648"
                          target="_blank">2147483648</a>)<br>
                        08-16 13:12:45.905: D/VideoView(30783): Error:
                        1,-<a moz-do-not-send="true"
                          href="tel:2147483648" value="+12147483648"
                          target="_blank">2147483648</a><br>
                        <br>
                        I guess I'll have to try and play around with
                        the resolution, bitrates,<br>
                        etc<br>
                        as you pointed out and see if I can make any
                        progress there.<br>
                        <br>
                        <br>
                        Thanks for your help.<br>
                        <br>
                        -John<br>
                        <br>
                        <br>
                        On 08/16/2012 12:35 PM, Chuck Crisler wrote:<br>
                        <br>
                        I am not sure about the default x264enc
                        parameters, but you need to<br>
                        insure<br>
                        that it is using baseline,
                        width/height/frame/bit rates all as specified<br>
                        by<br>
                        the android. I suspect that the defaults are not
                        what the Android wants<br>
                        and<br>
                        probably if any is wrong the Android would
                        reject it but VLC will deal<br>
                        with<br>
                        it. Can you get a log from the Android to see
                        what it doesn't like?<br>
                        <br>
                        On Thu, Aug 16, 2012 at 11:51 AM, John Ruemker
                        <<a moz-do-not-send="true"
                          href="mailto:john.ruemker@gmail.com"
                          target="_blank">john.ruemker@gmail.com</a>><br>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          On 08/15/2012 12:00 PM, John Ruemker wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            Hello,<br>
                            I am trying to figure out a way to take a
                            local video which may be in<br>
                            one<br>
                            of a few different formats (mkv, mp4, avi)
                            and create an rtsp stream<br>
                            that<br>
                            can be viewed by android devices.  I've been
                            playing around with<br>
                            gstreamer-rtsp-server, and using the
                            test-readme.c example can create<br>
                            a<br>
                            stream from an mkv that is watchable in vlc,
                            but android cannot<br>
                            process it:<br>
                            <br>
                               gst_rtsp_media_factory_set_launch(factory,
                            "( "<br>
                               "filesrc location=/home/user/project/spider.mkv
                            ! "<br>
                               "decodebin name=dec dec. ! queue !
                            x264enc ! "<br>
                               "rtph264pay name=pay0 pt=96 dec. ! queue
                            ! audioresample !<br>
                            audioconvert<br>
                            ! "<br>
                               "alawenc ! rtppcmapay name=pay1 pt=97 "<br>
                               ")");<br>
                            <br>
                            I'm guessing the way its encoded is not
                            supported by android:<br>
                            <br>
                            <br>
                            <br>
                            <a moz-do-not-send="true"
href="http://developer.android.com/guide/appendix/media-formats.html#recommendations"
                              target="_blank">http://developer.android.com/guide/appendix/media-formats.html#recommendations</a>
                            <br>
                            <br>
                            While I have done a good bit of reading
                            through the gstreamer docs and<br>
                            understand pipelines and such, I'll admit I
                            don't know much about<br>
                            formats<br>
                            and codecs.  What sort of pipeline should I
                            use to encode the video<br>
                            and<br>
                            audiostreams such that an android device
                            would be able to play it<br>
                            back, per<br>
                            the requirements listed in the above link?<br>
                            <br>
                            Thanks for your help.<br>
                            <br>
                            -John<br>
                          </blockquote>
                          <br>
                          Hi,<br>
                          Anyone have any ideas on the above?  I'm just
                          not sure how to go about<br>
                          encoding to meet the requirements that are
                          laid out in the Android<br>
                          development guide.  Any assistance would be
                          greatly appreciated.<br>
                          <br>
                          Thanks<br>
                          <br>
                          -John<br>
                          _______________________________________________<br>
                          gstreamer-devel mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:gstreamer-devel@lists.freedesktop.org"
                            target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                            target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                        </blockquote>
                        <br>
                        <br>
                        <br>
                        _______________________________________________<br>
                        gstreamer-devel mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:gstreamer-devel@lists.freedesktop.org"
                          target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                        <a moz-do-not-send="true"
                          href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                          target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                        <br>
                        <br>
                        <br>
                        _______________________________________________<br>
                        gstreamer-devel mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:gstreamer-devel@lists.freedesktop.org"
                          target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                        <a moz-do-not-send="true"
                          href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                          target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                        <br>
                      </blockquote>
                      <br>
                      <br>
                      -- <br>
                      "Some men see things as they are and say why. I
                      dream things that<br>
                      never were and say why not?" - GBS<br>
                      _______________________________________________<br>
                      gstreamer-devel mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:gstreamer-devel@lists.freedesktop.org"
                        target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                      <a moz-do-not-send="true"
                        href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                        target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                    </blockquote>
                    <br>
                    <br>
                    _______________________________________________<br>
                    gstreamer-devel mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:gstreamer-devel@lists.freedesktop.org"
                      target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                      target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                    <br>
                  </blockquote>
                  <br>
                  <br>
                </blockquote>
                <br>
              </blockquote>
              <br>
              _______________________________________________<br>
              gstreamer-devel mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:gstreamer-devel@lists.freedesktop.org"
                target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>