Forum

Rtsp push from Android

MArco 2019-02-18 11:58:23 UTC in Nimble Streamer

Hi, I'm using libstreaming (an open source lib for Android) for RTSP push into Nimble streamer server.
I can send video only for few seconds, then I see offline status in WMS Panel - incoming stream .

in nimble.log file I read this when it disconnect :
[rtsp] E: parse_rtp returns 1
[rtsp] E: rtp_parse_interleaved returns 1

Denis Slobodskoy 2019-02-19 03:40:59 UTC 

Try to capture stream by FFmpeg with command like this:
ffmpeg -rtsp_flags listen -rtsp_transport tcp -i rtsp://<your_ip>:1554/live/stream1 -c copy -f mpegts test.ts
- would it receive stream, and can you play it?
Notice that you should use another port that your set in Nimble (or shutdown nimble while receiving it by FFmpeg)
Is there source or APK available for application you're streaming from?

MArco 2019-02-19 10:02:26 UTC 

yes, it works and I can play test.ts file using vlc.

ffmpeg show only this warning (yellow log) :
[mpegts @ 00000000030d7cc0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

I did other tests with nimble and I understood that it's a authentication problem. If I remove user and password from application and global panel in wmspanel all works fine.

I set user and password using digest and nonce in Announce, and Nimble response is 200 (OK) , so maybe after that something goes wrong.

I would try authentication with ffmpeg, it's possible by changing the command that you send me ?

Denis Slobodskoy 2019-02-21 05:42:25 UTC 

Sorry, didn't find any way to make FFmpeg to require password for receiving RTSP stream.
Nimble should support Digest authentication, could you give headers from 401 response for server and subsequent announce with authorization from application?

MArco 2019-02-21 09:06:36 UTC 

This is the announce and responce sequences:
----------------------------------------------------------------------------------------------
ANNOUNCE rtsp://192.168.0.185:554/test/stream RTSP/1.0
CSeq: 1
Content-Length: 257
Content-Type: application/sdp

v=0
o=- 0 0 IN IP4 null
s=Unnamed
i=N/A
c=IN IP4 192.168.0.185
t=0 0
a=recvonly
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42000b;sprop-parameter-sets=Z0IAC6aCxOQ=,aM44gA==;
a=control:trackID=1
--------------------------------------------------------------------------------------
responce status 401

{session= yCqX7zLu5MwL0WqYZ7hhD4cPgipvQi9g,
www-authenticate= Digest realm="Nimble/3.5.4-6",
nonce="yCqX7zLu5MwL0WqYZ7hhD4cPgipvQi9g",
cseq= 1, server= Nimble/3.5.4-6}

-----------------------------------------------------------------------------------------------
ANNOUNCE rtsp://192.168.0.185:554/test/stream RTSP/1.0
CSeq: 2
Content-Length: 257
Authorization: Digest username="nexera",realm="Nimble/3.5.4-6",nonce="c2ov7892hWUv7PavAbO9VCR469NbpSft",uri="rtsp://192.168.0.185:554/test/stream",response="fd2ee4fe6c46baf1cff0fefc42307c58"
Session: 2
Content-Type: application/sdp

v=0
o=- 0 0 IN IP4 null
s=Unnamed
i=N/A
c=IN IP4 192.168.0.185
t=0 0
a=recvonly
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42000b;sprop-parameter-sets=Z0IAC6aCxOQ=,aM44gA==;
a=control:trackID=1
--------------------------------------------------------------------------------------------
Responce status 200
{session= c2ov7892hWUv7PavAbO9VCR469NbpSft,
cseq= 2,
server= Nimble/3.5.4-6}

Denis Slobodskoy 2019-02-22 08:38:23 UTC 

That seems correct, so what goes wrong after that - are subsequent SETUP and REQUEST includes same authentication, and what is Nimble's repsonse to it? What moment it start to go wrong?

MArco 2019-02-22 09:09:56 UTC 

rtsp communication seems to be right, I don't know why nimble after few seconds stop the stream. I can see offline in wms panel and outgoing stream doesn't works, but my android app still send tcp packet to socket.

I set nimble log to debug level but only log that I can see is in my first post.

this is all rtsp communication, you can see teardown becouse I stop manually from Android app the stream:

ANNOUNCE rtsp://192.168.0.185:554/test/stream RTSP/1.0
CSeq: 1
Content-Length: 257
Content-Type: application/sdp

v=0
o=- 0 0 IN IP4 null
s=Unnamed
i=N/A
c=IN IP4 192.168.0.185
t=0 0
a=recvonly
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42000b;sprop-parameter-sets=Z0IAC6aCxOQ=,aM44gA==;
a=control:trackID=1

RTSP/1.0 401 Unauthorized
CSeq: 1
Server: Nimble/3.5.4-6
WWW-Authenticate: Digest realm="Nimble/3.5.4-6", nonce="xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y"
Session: xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y

ANNOUNCE rtsp://192.168.0.185:554/test/stream RTSP/1.0
CSeq: 2
Content-Length: 257
Authorization: Digest username="nexera",realm="Nimble/3.5.4-6",nonce="xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y",uri="rtsp://192.168.0.185:554/test/stream",response="06914110e9146539a0bb994da199b04e"
Session: 1
Content-Type: application/sdp

v=0
o=- 0 0 IN IP4 null
s=Unnamed
i=N/A
c=IN IP4 192.168.0.185
t=0 0
a=recvonly
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42000b;sprop-parameter-sets=Z0IAC6aCxOQ=,aM44gA==;
a=control:trackID=1

RTSP/1.0 200 OK
CSeq: 2
Server: Nimble/3.5.4-6
Session: xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y

SETUP rtsp://192.168.0.185:554/test/stream/trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3
CSeq: 3
Content-Length: 0
Session: 1
Authorization: Digest username="nexera",realm="Nimble/3.5.4-6",nonce="xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y",uri="rtsp://192.168.0.185:554/test/stream",response="06914110e9146539a0bb994da199b04e"

RTSP/1.0 200 OK
CSeq: 3
Server: Nimble/3.5.4-6
Transport: RTP/AVP/TCP;unicast;interleaved=2-3;mode=record
Session: xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y

RECORD rtsp://192.168.0.185:554/test/stream RTSP/1.0
Range: npt=0.000-
CSeq: 4
Content-Length: 0
Session: 1
Authorization: Digest username="nexera",realm="Nimble/3.5.4-6",nonce="xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y",uri="rtsp://192.168.0.185:554/test/stream",response="06914110e9146539a0bb994da199b04e"

RTSP/1.0 200 OK
CSeq: 4
Server: Nimble/3.5.4-6
Session: xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y

TCP packet here........

TEARDOWN rtsp://192.168.0.185:554/test/stream RTSP/1.0
CSeq: 5
Content-Length: 0
Session: 1
Authorization: Digest username="nexera",realm="Nimble/3.5.4-6",nonce="xyD1gS2hEnMs48tDFuPfriNTqQMwzl2Y",uri="rtsp://192.168.0.185:554/test/stream",response="06914110e9146539a0bb994da199b04e"

Denis Slobodskoy 2019-02-22 10:20:13 UTC 

It's weird why it work without authentication - I can believe your application sends something that Nimble doesn't understand, but how it many depend on authorization?
Anyway, I suppose we should try to reproduce it on our side - please submit support ticket on https://wmspanel.com/help and describe your case; if possible, provide link to APK or Android Studio project.

tommyshelby 2019-03-14 10:55:35 UTC 

I want to ask that is this possible to have the success of the module from the ios device as well. From Android, it is working but it should work on ios also. I have also asked https://itunessupport.org/blog/fix-itunes-error-9/

Post a reply


Post a new question

Categories:

Tags:

nimbleNimble StreamerFAQHLSDVRRTMPhlsnimble streamerABRwmsauthcacheNimbleffmpegdvrAPIapitranscoderVODstreamingfailoverDASHwmspanelrtmpvodudprtsppaywallsubtitlesRTSPDispersayoutubelivelivestreamingmp4MPEG-DASHWMSAuthpay-per-viewgeodashvideostreamerabrWindowsencryptionUDPhttpswhite labeluser agentconfigsmilFFMPEGmulticastsslaudioMPEG-TSedgeCORSchunksraspberry pire-streamingandroidsldpbandwidthmpeg-dashadvertizervlcDRMrules.confadvertisingipv6FastSpringRAMwms panelthumbnailFMLEVATcrossdomainupdatempegtsRecordingplaylistSMILakamaiaespushserversSRTwowzaSSLerrorm3u8Transcodebalanceplaylist_dvrchromecastWowzareportingconfigurationsrtbugdownloadIDS3nimblestreamerdomainperformancecorschunkmpeg-tsraspianpublish controlcodecWMSPanelmobilerepublishingVidillionHttpsIPloopawsnimble webcam html5UIRegistration Issuedirect link32-bit Windowstwitchanalysecache_controlitworkmelive abr support mpeg-dashrtmp abrbeirutWWDCdubaideep statshls to multicast udplogIIS Smooth StreamingcloudmediaCDNHTTPSAbrHot-linking protectionHDSvaddioMPEGTSalertsNDIViewer Statsjwplayer websitewhmcsbaselineAuthentication in HLSCentOS v6.4nginx rtmp nimblepricedurationAV BridgelimitOld logsscreencastVaddioPI3 Ubuntuview timeattaching domainswmspanelapiinterfacesWMSCONFIG_HOMEmessageDVRRecordingrestreamcostloadbalancingoriginmetadatamod_rewriteprofileAxisgbpsID3 tagswmsauthsignhighhls restreaminghds streamVLCciscolocalresumenibler.net hotlinkVideo Playertransocding republishingdecodergentoo install server nimbleAliaslost traffictranscoding using NvidiaPublic IpPaywall Authdocumentationofflineconcurrent-connectionsTrancoderfileipicecast urlrulelebanonlocationmanifesthot linkingMP4 not playedspaceServer-sidechangetasks-controlamfstoppedplayoutseekingmaindvr streamconnectivityunique visitoronPlayReadylimuxamazon web servicealiasdata slicesdvr stream twicepay per viewHLS vodAXVVGhot-linkanalyticsapplicationpaywalblockmpeg dashTCOopenssl7brandingtrialMP4microsoft streamerrorsExpression Encoderrocksoftlog traffic statsdebianHLS Playerlive video on demandDASH PlayerbandwithABR DASHprogressive downloadmultiple originsFFmpegnimblesessionidserverlog nimble analysertmp playbackvideojsSnapshotsbitrateprivate networkadaptiveAV1 codecPullJWPLAYERNGINX-RTMPno WMSPanellive videomac osx installsoundHLS Meta Tag editing.streamsattachmentwotermarksourcecrossdomain more then 1 domain4Khelp errorvimeoconcurrent connectionvod no soundload balanceFairplaybuttcdnvsomRemote StorageWowza Agentlive streamnot foundWidevinepullfallbackamazonControl APIAS3TranscoderLive streamingsecuritympeg2tsServer-Side-Task-Controldisk migrationinstall players setup ready to goDVRSettingstwitch larix broadcaster androidAppleDelete recordsstereo to monoscreen capturedrmresourceaes encryptionicecastsubscriptionvideo looplive pull settingsABR HLS Bitratesstarttime duration seekpointrebootrtmp for YouTubemonitorIIS Media Servicsrtmp republishing transcodenimble.confDeep statsapi accessoutrateinterleavingweb playerdvr streamsnimble streamer web server php script pageautomationNimble Streamer APIlivestreamnimble streamer vod hls transmuxingloggingscreen freezecan't registercontent-dispositionNimble CapacityABR DVR problemlearnerheaderactionscript 3Cross DomainLive Switcherinsert logoDVRStreamsNimble Servernot to stealLive Broadcastblock downloadAVCaptureMovieFileOutputUbuntu artful 17.10Transcoder MPEG DASHMPEG DASHadd_chunk failedPost processingfake extensionbroadcastertranscodingFFMPEG;RTMP;I/O errorstatus:errorHotlinking ProtectionStreaming routeMPEG-Dashlarix broadcasterThumbnailsserver incorrect timepremium featureLIVELivenimble on cloudroutesprerollpaymentHow to do live stream with multiple audio tracknimble aliasesProgressivestatsincoming streamno soundreloadvp9adSecureRTMP republishrmtpno internetdemandlivestreamintransocderAndroiduser_agentdvr on wmspanelS3 AWSIOSrestartPIDHLS Streamingreportsraspberryavoid refreshthumbnail dvr-thumbnailwmsAuthSignnimble streamer mpeg-ts multiple inputsLoad-BalancingDVR SettingPORTlatencyadjustissuepricingcredentialstranscodeRepublishingdelaympeg4HTML5 playertranscoder nimbleVR-360Failoverhttp servera record21server ipav1 codecNimble connectionsabr fallbackBroadcastLarixABR bitratesPacketizingbuildTeradek Decoderubuntu 18SLDPssaiDVR Setting limitbufferartifactsrtsp push androidcache expiryQuickTimevideo streamingtraffichd25publish streamAArch64buffering videoSO_RCVBUFdissapointmentpay-per-minuteAWSspeedup my videoiOSnimble dvrlivestream bitrateUDP Multicastlogo in streamMPEG2 VideoCSSfastspringmp2 audioprogressivewebhookdvr to liveoutputcloudflareVOD HLS streaming on public IPdomain lockRTMP Republishcontentvideo and audio not matchcloudfrontrulesError when installingdistributionstoragealias route.movanalisyssctestorage space availabledisk3.6.1-1qataritworkscdnvideo.js

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.