RTSP stream for android devices
Loren Rogers
loren.rogers at gmail.com
Thu Aug 16 10:29:38 PDT 2012
If the log is from the Android device, what it looks like is that the
Android device is missing the caps negotiation (probably SDP) that's
sent from the RTSP server. OR the Android device is trying to open a
file with poorly formed stream information.
On Thu, Aug 16, 2012 at 1:15 PM, John Ruemker <john.ruemker at gmail.com> wrote:
> I was wondering if the alawenc audio encoder is the problem, considering the
> android doc states you should use AAC-LC. However if I try to switch to
> ffenc_aac I can't get a stream that even vlc will play. I'm not really sure
> with rtp payloader goes with ffenc_aac. So ultimately, I decided to just
> remove the audio stream for now and see if I could get video working. VLC
> plays it fine, but android still won't, so the issue is likely somewhere in
> the x264enc part.
>
> The logs from the android MediaPlayer and VideoView classes are not very
> specific.
>
>
> 08-16 13:12:39.320: D/OpenGLRenderer(30587): Flushing caches (mode 0)
> 08-16 13:12:39.350: D/OpenGLRenderer(30587): Flushing caches (mode 1)
> 08-16 13:12:45.555: D/libEGL(30783): loaded /system/lib/egl/libEGL_mali.so
> 08-16 13:12:45.555: D/libEGL(30783): loaded
> /system/lib/egl/libGLESv1_CM_mali.so
> 08-16 13:12:45.560: D/libEGL(30783): loaded
> /system/lib/egl/libGLESv2_mali.so
> 08-16 13:12:45.635: D/OpenGLRenderer(30783): Enabling debug mode 0
> 08-16 13:12:45.645: D/MediaPlayer(30783): Couldn't open file on client side,
> trying server side
> 08-16 13:12:45.800: D/MediaPlayer(30783): getMetadata
> 08-16 13:12:45.905: E/MediaPlayer(30783): error (1, -2147483648)
> 08-16 13:12:45.905: E/MediaPlayer(30783): Error (1,-2147483648)
> 08-16 13:12:45.905: D/VideoView(30783): Error: 1,-2147483648
>
> I guess I'll have to try and play around with the resolution, bitrates, etc
> as you pointed out and see if I can make any progress there.
>
>
> Thanks for your help.
>
> -John
>
>
> On 08/16/2012 12:35 PM, Chuck Crisler wrote:
>
> I am not sure about the default x264enc parameters, but you need to insure
> that it is using baseline, width/height/frame/bit rates all as specified by
> the android. I suspect that the defaults are not what the Android wants and
> probably if any is wrong the Android would reject it but VLC will deal with
> it. Can you get a log from the Android to see what it doesn't like?
>
> On Thu, Aug 16, 2012 at 11:51 AM, John Ruemker <john.ruemker at gmail.com>
> wrote:
>>
>> On 08/15/2012 12:00 PM, John Ruemker wrote:
>>>
>>> Hello,
>>> I am trying to figure out a way to take a local video which may be in one
>>> of a few different formats (mkv, mp4, avi) and create an rtsp stream that
>>> can be viewed by android devices. I've been playing around with
>>> gstreamer-rtsp-server, and using the test-readme.c example can create a
>>> stream from an mkv that is watchable in vlc, but android cannot process it:
>>>
>>> gst_rtsp_media_factory_set_launch(factory, "( "
>>> "filesrc location=/home/user/project/spider.mkv ! "
>>> "decodebin name=dec dec. ! queue ! x264enc ! "
>>> "rtph264pay name=pay0 pt=96 dec. ! queue ! audioresample ! audioconvert
>>> ! "
>>> "alawenc ! rtppcmapay name=pay1 pt=97 "
>>> ")");
>>>
>>> I'm guessing the way its encoded is not supported by android:
>>>
>>>
>>> http://developer.android.com/guide/appendix/media-formats.html#recommendations
>>>
>>> While I have done a good bit of reading through the gstreamer docs and
>>> understand pipelines and such, I'll admit I don't know much about formats
>>> and codecs. What sort of pipeline should I use to encode the video and
>>> audiostreams such that an android device would be able to play it back, per
>>> the requirements listed in the above link?
>>>
>>> Thanks for your help.
>>>
>>> -John
>>
>>
>> Hi,
>> Anyone have any ideas on the above? I'm just not sure how to go about
>> encoding to meet the requirements that are laid out in the Android
>> development guide. Any assistance would be greatly appreciated.
>>
>> Thanks
>>
>> -John
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
--
"Some men see things as they are and say why. I dream things that
never were and say why not?" - GBS
More information about the gstreamer-devel
mailing list