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 StreamerFAQHLSnimble streamerDVRRTMPhlsSRTsrtABRrtmpcacheNimblewmsauthAPItranscoderdvrffmpegapisldpudpVODaudioRTSPfailoverrtspDASHwmspanelUDPvodpaywallstreamingabrSLDPyoutubemp4DispersastreamerandroidsslmulticastLarixsubtitlesliveNDIvideolivestreamingplaylistWMSAuthMPEG-DASHpay-per-viewerrorgeoMPEG-TSre-streamingdashcorsWMSPaneledgebandwidththumbnaillarix broadcasterWindowshttpswhite labelconfigsmilFFMPEGencryptionCORSperformancechunksraspberry pimpeg-dashpublish controlcloudfrontDRMRepublishingvlcAWSS3advertisinguser agentadvertizerristrepublishingrules.confipv6MPEGTSFastSpringRecordingRAMwms panelfileFMLEVATcrossdomainSMILmpegtsaespushakamaimobilewowzaPullserverscodecmanifestSSLchromecastbalancedrmTranscodem3u8TranscoderbugWowzaIDreportingconfigurationsnapshotdownloadawsAndroidnimblestreamerdomaintranscoderaspianloopscte35streamroutesamazonupdateipVidillionHttpsmpeg-tsBroadcastplaylist_dvrVLCPIDerrorsEncoderoriginscte-35issuechunklimitsecurityLarix BroadcasterIPCDNthumbnailsUIRegistration Issuedirect link32-bit Windowstwitchcache_controlitworkmecudalive abr support mpeg-dashwmspanelapibeirutreloadWWDCdubaideep statsCentOS v6.4logIIS Smooth StreamingcloudmediaIPTVprofilelarix abrTSReaderAbrHTTPSHot-linking protectionHDSvaddioalertsMuxjwplayer websitewhmcsbaselinetimelineVaddioAV BridgePI3 Ubuntuview timeAuthentication in HLSNimble Streamer APIPi4streamsinterfacesHLS Meta Tag editing.encrytpionloadbalancingwmsattachmentHEVCmetadatamod_rewritewmsauthsignpricehighresourcehds streamOld logsciscolocalscreencastID3 tagsgbpsAxis.net hotlinkRTMP republishattaching domainssdpshoutcastno internetInterlacedocumentationofflinecontainerNimble streamer upgradeMulticast*concurrent-connectionsTrancoderrecordingrtmp abranalisysresumeniblerhls restreamingServer-siderestreamstoppedMPEG2TSNimble Streamer versionmainWMSCONFIG_HOMEdissapointmentdatmessagegentoo install server nimbletranscoding using NvidiaPublic IpPaywall AuthwildcardobsTCOno WMSPanelVideo Playertransocding republishingdecoderAliaspay per viewlost trafficdvr_archivesmpeg dashnginx rtmp nimbleRaspian Bustericecast urlexportopenssllimuxamazon web servicenginxPlayReadychangedvr stream twiceLarix GroveamfAXVVGhot-linkIOSExpression EncoderblocknvenconSteam stopped workingadaptiveAV1 codecHLS PlayerJWPLAYERNGINX-RTMPHLS in UDP outDASH PlayerHLS voddvr export to mp47analyticsapplicationpaywalbrandingtrialCablemicrosoft streamMP4rocksoftlog traffic statsjpegscreen freezecan't registeraccuracyprivate networkLarge DVR fileslive videodebianTelegraminterleavingSLDP PLayerseekingmac osx installwotermarklive video on demandbandwithnimblesessionidFFmpegmultiple originsvimeohelp errorserverload balancezabbixheadercache expirycdnvsomlog nimble analysertmp playbacklive streamsourceViewer StatsAdsvideojsLive Streamingbitrate#restreamMP4 not playedspaceServer-Side-Task-Controlvideo stopaes encryptionsubscriptionvod no soundconcurrent connectionlebanonlocationUbuntu 20 ARM - AWSunique visitorconnectivitydvr streamstereo to monoscreen capturelive pull settingsWMSPanel settingsABR HLS Bitratesrtmp for YouTube4Kcrossdomain more then 1 domainWidevineFairplaycpunot foundCPU LoadpullAS3loggingnimble streamer vod hls transmuxingbuttAWS 3Cross Domaininsert logoinstall players setup ready to goDVRSettingstwitch larix broadcaster androidicecast metadataDVRStreamsAppleDelete recordspremium featureControl APIProgressivenimble streamer web server php script pageautomationLive streamingvideo loopUbuntu artful 17.10Transcoder MPEG DASHinvalidMPEG DASHstarttime duration seekpointadd_chunk failedPost processingfake extensionstatus:errorrebootdroppingmobile app live streamingmonitoroutrateudp streamingapi accessDeep statsicecastMPEG-Dashloadbalancerweb playercontent-dispositionpaymentstatsNimble ServerAVCaptureMovieFileOutputblock downloadrestartdvr streamsavoid refreshlivestreamABR DVR problemNimble CapacityHotlinking ProtectionStreaming routehotlinkfacebookcontentRTMP RepublishSecurityLive Switcherdemandnot to stealLive BroadcastMultiple Audio trackssecure streaminglow_bandwidthwmsAuthSignnimble streamer mpeg-ts multiple inputsLoad-Balancingvp9adsounddisk migrationThumbnailsserver incorrect timeLIVELivelearnernimble webcam html5ssaiDVR Setting limitpausemosaicHow to do live stream with multiple audio trackrmtptranscoder nimblereportsdvr on wmspanelfpsVideo cant be playedS3 AWSraspberryPaywalllivestreamintransocderstorage space availablediskcredentialsdvr to livewebhookautomateuser_agentvbv-maxratedomain lockUsers limitoutputcloudflareVOD HLS streaming on public IPlarixscteInvalid frame headerno soundincoming streamSubtitleslivestream bitratedockerDVRRecordingAuthGopDVR SettingPORTdelaympeg4storagealias route.movartifactsrtsp push androidmultiviewRAM Loadhttp serverLatencywirecasta recordruleshow-tomanage_dvrError when installingVP9server ip21Nimble connectionsabr fallbackno audiolatencyaliasdata slicesplayer sldpmp2 audioNimble streamerfastspringsoftware versionadjustSO_RCVBUFbuffering videodistributionbufferqataritworkscdnvideo.jsmultiplexcompatibility protocolsCentos 8pay-per-minuteTeradek Decoderubuntu 183.6.1-1UDP MulticastMax connectionincomingmulti-viewerFallbackhelpmultiple audio udphotlink protectionRaspberryPi4ultra low latencyaws amazonhls to multicast udpnoobSSL requestsha265broadcasterOSXmd5analyseStreamIDprerollnimble on cloudrtmp sldp nimblepluginfallbacktasks-controlRaspberryRTMP to SRTLinuxgpu{stream}Connections count limitNimble_Crushwebrtc4GRIST Bondingplayoutsrt-live-transmitWowza AgentRemote StorageSSAItuningAmazonTVfireOBSvideo and audio not matchLarix broadcasterNetworkspeedup my videoiOSPerformanceSnapshotsSRT RTMPre-publishingletsencryptTonydowntranscodingFFMPEG;RTMP;I/O errorLL-HLSHTML5 playerAddendaABR DASHprogressive downloadeventLL-HLS DVRav1 codecconnectionsNimbleStreamernimble aliasesNimble StreambuildABR bitratesPacketizingcountrist set fecmultiple audioOBS StudioWMSAUTHIVSDelaympeg2tsIIS Media Servicsrtmp republishing transcodenimble.confinterfacetrackbindprogressivebroadcast videovideo audioSRT protocoldvbduplicatingpcdynamic linksTLSV 1.2 CertificatesubfolderbrowserurlGoogle DriveHLS Streamingrtmpscostnimble abr hlsthumbnail dvr-thumbnailaudio languageVR-360Failovergoogle cloud storagepricingoverlayhot linkingTRANSCODErtpnimble dvrBandwidthdurationYadifportsRokuContinuitywordpressJetson NanoSecureLarix PlayerramfairplayNginxpublish streamStream Delayhd25trafficAArch64video streamingQuickTimeCloud StorageRistmultistreamingmultipleserver ssl erroractionscript 3dropped framesCSSMPEG2 VideoPCRlogo in streammultipointrulerepublishconcurrent

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.