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 StreamerFAQHLSDVRnimble streamerRTMPhlsSRTABRcachewmsauthNimbleAPItranscoderrtmpsrtapidvrffmpegVODudpRTSPsldpfailoverDASHstreamingrtspwmspanelSLDPliveyoutubevodUDPmp4paywallabrsubtitlesDispersavideoLarixmulticastaudioandroidlivestreamingWMSAuthMPEG-DASHpay-per-viewgeoMPEG-TSdashstreameredgebandwidthWMSPanelsslthumbnailWindowsencryptionhttpswhite labelplaylistconfigsmilFFMPEGperformanceCORSchunksraspberry pire-streamingmpeg-dashpublish controlcorscloudfrontDRMRepublishingadvertizerrepublishingvlcS3user agentNDIristrules.confadvertisingipv6MPEGTSFastSpringRAMwms panelRecordingfileFMLEVATcrossdomainSMILmpegtsaespushakamaiwowzamobileserversPullcodecerrorbalanceSSLTranscodem3u8TranscoderchromecastWowzaIDbugconfigurationreportingdownloadsnapshotawsmpeg-tsLarix BroadcasterAndroidnimblestreamerdomainloopraspianAWSoriginscte35CDNipupdateroutesamazonlarix broadcasterplaylist_dvrVidillionHttpschunkIPsecurityUInimble webcam html5Registration Issuedirect link32-bit Windowstwitchcache_controlitworkmecudalive abr support mpeg-dashwmspanelapibeirutreloadWWDCdubaideep statsCentOS v6.4hls to multicast udpnooblogIIS Smooth StreamingcloudmediaAbrHTTPSHot-linking protectionHDSvaddioalertsjwplayer websitewhmcsbaselinetimelineVaddioAV BridgePI3 Ubuntuview timeAuthentication in HLSNimble Streamer APIPi4priceinterfacesresourcelimitOld logsencrytpionCloud Storagescte-35loadbalancingscreencastmetadatamod_rewriteprofilelarix abrAxisgbpsID3 tagswmsauthsignhighattaching domainshds streamcontainer*ciscolocalsdpshoutcast.net hotlinkdatmessageWMSCONFIG_HOMErestreamcostrtmp abrgentoo install server nimblePublic Iptranscoding using NvidiaPaywall AuthofflinedocumentationNimble streamer upgradehls restreamingTrancoderconcurrent-connectionsVLCresumeniblerServer-sideVideo Playertransocding republishingdecoderstoppedNimble Streamer versionmainAliaslost trafficpay per viewicecast urldvr_archivesmpeg dashnginx rtmp nimblehot linkinglebanonlocationmanifestwildcardobsTCORaspian BusterchangeMP4 not playedspaceexportopensslamfLarix GroveseekingExpression EncoderonSteam stopped workinglimuxamazon web servicePlayReadynginxHLS voddvr stream twicerepublishHLS PlayerAXVVGhot-linkDASH Playeranalyticspaywalapplicationblocknvencjpeg7brandingtrialdebianmicrosoft streamMP4screen freezecan't registererrorsrocksoftlog traffic statsLarge DVR filesprivate networklive video on demandbandwithno WMSPanelserverlive videonimblesessionidFFmpegmultiple originsinterleavingSLDP PLayerABR DASHprogressive downloadmac osx installwotermarksourceheadervimeohelp errorLive Streaminglog nimble analysertmp playbackload balancezabbixAdsvideojscache expiryvideo stopcdnvsombitrate#restreamlive streamViewer StatsstreamsadaptiveAV1 codecJWPLAYERNGINX-RTMPHEVCattachmentDelaympeg2tsServer-Side-Task-Controldisk migrationvod no soundconcurrent connectiondvr on wmspaneldvr streamconnectivityUbuntu 20 ARM - AWSunique visitor4Kcrossdomain more then 1 domainscreen capturestereo to monocpuaes encryptionsubscriptionWidevineFairplayWMSPanel settingslive pull settingsABR HLS BitratesbuttAWS 3rtmp for YouTubedrmnot foundCPU LoadpullControl APIAS3Live streaminginstall players setup ready to goDVRSettingstwitch larix broadcaster androidAppleDelete recordsadd_chunk failedPost processingfake extensionnimble streamer vod hls transmuxinglogginglearnernimble streamer web server php script pageautomationCross Domainoutrateudp streaminginsert logovideo loopicecaststarttime duration seekpointrebootmonitorapi accessDeep statsloadbalancerinvalidMPEG DASHUbuntu artful 17.10Transcoder MPEG DASHweb playerblock downloadAVCaptureMovieFileOutputdvr streamslivestreamcontent-dispositionNimble CapacityABR DVR problemLive SwitcherNimble Servernot to stealLive BroadcastfacebookStreaming routeHotlinking ProtectionSecuritysecure streamingpaymentRTMP republishstatsadvp9contentRTMP RepublishdemandIOSpremium featureserver incorrect timeThumbnailsssaiDVR Setting limitLiveLIVELoad-Balancingnimble streamer mpeg-ts multiple inputswmsAuthSignrmtpInterlaceno internetsoundHLS Meta Tag editing.How to do live stream with multiple audio trackProgressivenimble aliasestranscoder nimblethumbnail dvr-thumbnailavoid refreshraspberryreportsPaywallS3 AWSVideo cant be playedcredentialsstorage space availabledisktranscodevbv-maxrateSecureJetson NanoHTML5 playerlivestreamintransocderFailoverVR-360publish streamStream Delaytraffichd25AArch64webhookdvr to liveautomateuser_agentbuildrist set fecABR bitratesPacketizingdomain lockoutputUsers limitcloudflareVOD HLS streaming on public IPlarixanalisyssctedelaympeg4storagealias route.movInvalid frame headerno soundincoming streamSubtitlesDVRRecordingAuthlivestream bitratedockerGopLL-HLS DVRav1 codecNimbleStreamerfastspringNimble streamermp2 audiodata slicesaliasplayer sldpdistributionVP9http serverwirecasta recordqataritworkscdnvideo.jslatencyno audiobuffering videoSO_RCVBUFbufferCentos 8dissapointmentpay-per-minuteQuickTimevideo streamingcompatibility protocolsmultiplexactionscript 3server ssl errorCSSTeradek Decoderubuntu 18restarthelpFallback3.6.1-1server ip21SSL requestMax connectionUDP Multicastincomingmulti-viewersha265RIST BondingplayoutrulesError when installinghow-tomanage_dvrDVRStreamsaws amazonmultiple audio udphotlink protectionRaspberryPi4ultra low latencyMPEG2 Videologo in streamDVR SettingPORTanalyseStreamIDprogressivebroadcast video4GwebrtcNimble_Crushvideo audioSRT protocolartifactsrtsp push androidtuningWowza AgentRemote StorageSSAIprerollstreamrtmp sldp nimblenimble on cloudfallbackRaspberrytasks-controlLinuxRTMP to SRTBroadcastvideo and audio not matchLarix broadcastergpu{stream}SnapshotsOBSMPEG-DashLL-HLSGoogle DriveHLS StreamingPIDurlnimble.confrtmp republishing transcodeIIS Media Servicstrackspeedup my videoiOSmultipointrulethumbnailssubfolderTLSV 1.2 Certificatedynamic linksdvbNetworkRAM Loadstatus:errortranscodingdownTonyFFMPEG;RTMP;I/O errorissuepricinggoogle cloud storageRistmultiplertpnimble dvrdurationBandwidthYadifportsfairplayNginxbroadcasterOSXmd5abr fallbackNimble connectionsletsencryptmultiple audioadjustsoftware versionre-publishingSRT RTMP

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.