mengzhidaren/Vlc-sdk-lib

无法播放rtsp流问题

Closed this issue · 4 comments

最近连接海康威视的运动相机,但是发现无法打开rtsp流,希望大神能指点,以下是log

--------- beginning of system
06-11 15:19:58.283 331-2867/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
06-11 15:19:58.283 331-2867/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
06-11 15:19:58.558 23691-23691/com.yyl.vlc I/Timeline: Timeline: Activity_launch_request time:19187755
06-11 15:19:58.565 23876-23876/? D/FloatingUIController: dismissFloatView
06-11 15:19:58.566 4954-23942/? E/zeus-AndroidUtils-[pool-5-thread-69]: top : com.yyl.vlc
06-11 15:19:58.566 4954-23942/? E/AD-PLUGIN-SplashController: This package is fore ground , skip splash : com.yyl.vlc
06-11 15:19:58.567 1910-4473/? I/ActivityManager: START u0 {cmp=com.yyl.vlc/.vlc.VlcPlayerActivity} from uid 10134 on display 0
06-11 15:19:58.570 4386-4566/? D/WtProcessController: onAMCreateActivity callback
06-11 15:19:58.574 4386-4566/? D/WtProcessController: onAMPauseActivity callback
06-11 15:19:58.587 4386-4566/? D/WtProcessController: onAMRestartActivity callback
06-11 15:19:58.590 1910-4234/? I/Timeline: Timeline: App_transition_ready time:19187787
06-11 15:19:58.609 23691-23691/com.yyl.vlc V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@84c2c0f
06-11 15:19:58.609 23691-23691/com.yyl.vlc V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@75849c
06-11 15:19:58.643 3992-3992/? D/wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
06-11 15:19:58.657 3992-3992/? D/wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=49
06-11 15:19:58.689 23691-23691/com.yyl.vlc I/vlc: options=[--audio-time-stretch, --avcodec-skiploopfilter, 1, --avcodec-skip-frame, 0, --avcodec-skip-idct, 0, --subsdec-encoding, , --stats, --network-caching=1500, --android-display-chroma, YUV, --audio-resampler, soxr, --audiotrack-session-id=36, --freetype-rel-fontsize=16, --freetype-color=16777215, --freetype-background-opacity=0, --vout=gles2,none, --keystore, file_crypt,none, --keystore-file, /data/user/0/com.yyl.vlc/app_keystore/file, -vv, --no-sout-chromecast-audio-passthrough, --sout-chromecast-conversion-quality=2, --sout-keep]
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/a039002c] libvlc libvlc: VLC media player - 3.0.7 Vetinari
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/6d696e61] libvlc libvlc: Copyright © 1996-2019 the VideoLAN team
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/0] libvlc libvlc: revision 3.0.6-90-g092c795b0b
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/a0a885c4] libvlc libvlc: configured with ../configure '--host=arm-linux-androideabi' '--build=x86_64-unknown-linux' '--with-contrib=/mnt/ssd/build-avlc/vlc/contrib/arm-linux-androideabi' '--prefix=/mnt/ssd/build-avlc/vlc/build-android-arm-linux-androideabi/install/' '--enable-neon' '--disable-nls' '--enable-live555' '--enable-realrtsp' '--enable-avformat' '--enable-swscale' '--enable-avcodec' '--enable-opus' '--enable-opensles' '--enable-matroska' '--enable-taglib' '--enable-dvbpsi' '--disable-vlc' '--disable-shared' '--disable-update-check' '--disable-vlm' '--disable-dbus' '--enable-lua' '--disable-vcd' '--disable-v4l2' '--enable-dvdread' '--enable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-decklink' '--disable-libva' '--disable-dv1394' '--enable-mod' '--disable-sid' '--disable-gme' '--disable-tremor' '--disable-mad' '--enable-mpg123' '--disable-dca' '--disable-sdl-image' '--enable-zvbi' '--disable-fluidsynth' '--enable-fluidlite' '--disable-jack' '--disable-pulse' '--disable-alsa'
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/9fa98428] libvlc libvlc: plug-ins loaded: 364 modules
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [a98b79d0/2d6e6f2d] libvlc logger: looking for logger module matching "any": 4 candidates
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [a98b79d0/692d6e6f] libvlc logger: using logger module "android_logger"
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/5c8b] libvlc libvlc: translation test: code is "C"
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [a98b7a30/5c8b] libvlc keystore: looking for keystore module matching "memory": 3 candidates
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [a98b7a30/5c8b] libvlc keystore: using keystore module "memory"
06-11 15:19:58.697 23691-23691/com.yyl.vlc D/VLC: [b37626b0/5c8b] libvlc libvlc: CPU has capabilities ARM_NEON FPU
06-11 15:19:58.700 23691-23691/com.yyl.vlc D/VLC: [a0ab1b10/5c8b] libvlc generic: creating audio output
06-11 15:19:58.700 23691-23691/com.yyl.vlc D/VLC: [a9d9acb0/5c8b] libvlc audio output: looking for audio output module matching "android_audiotrack": 4 candidates
06-11 15:19:58.700 23691-23691/com.yyl.vlc D/VLC: [a9d9acb0/5c8b] libvlc audio output: using audio output module "android_audiotrack"
06-11 15:19:58.701 23691-23691/com.yyl.vlc D/VLC: [a0ab1b10/5c8b] libvlc generic: keeping audio output
06-11 15:19:58.701 23691-23691/com.yyl.vlc I/VlcPlayer: startPlay
06-11 15:19:58.703 23691-23691/com.yyl.vlc I/VlcPlayer: start
06-11 15:19:58.693 4027-4027/? W/Binder:1910_6: type=1400 audit(0.0:1053): avc: denied { ioctl } for path="socket:[933388]" dev="sockfs" ino=933388 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-11 15:19:58.693 4027-4027/? W/Binder:1910_6: type=1400 audit(0.0:1054): avc: denied { ioctl } for path="socket:[933388]" dev="sockfs" ino=933388 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-11 15:19:58.707 23691-23691/com.yyl.vlc D/ActivityThreadInjector: clearCachedDrawables.
06-11 15:19:58.726 1910-4432/? I/Timeline: Timeline: App_transition_ready time:19187923
06-11 15:19:58.727 1910-4432/? I/Timeline: Timeline: App_transition_ready time:19187924
06-11 15:19:58.739 23691-23691/com.yyl.vlc I/VlcPlayer: setSurface
06-11 15:19:58.739 23691-23691/com.yyl.vlc I/VlcPlayer: startPlay
06-11 15:19:58.740 23691-23769/com.yyl.vlc I/VlcPlayer: setVideoSurface attachViews
06-11 15:19:58.740 23691-23769/com.yyl.vlc D/VLC: [ae9e1830/5cd9] libvlc input: Creating an input for 'rtsp://10.15.12.1/live'
06-11 15:19:58.741 23691-23769/com.yyl.vlc I/vlc: 加载 true
06-11 15:19:58.743 23691-24003/com.yyl.vlc D/VLC: [ae9e1830/5dc3] libvlc input: using timeshift granularity of 50 MiB
06-11 15:19:58.743 23691-24003/com.yyl.vlc D/VLC: [ae9e1830/5dc3] libvlc input: using default timeshift path
06-11 15:19:58.744 23691-24003/com.yyl.vlc D/VLC: [ae9e1830/5dc3] libvlc input: rtsp://10.15.12.1/live' gives access rtsp' demux any' path 10.15.12.1/live'
06-11 15:19:58.744 23691-24003/com.yyl.vlc D/VLC: [a9a9a8f0/5dc3] libvlc input source: creating demux: access='rtsp' demux='any' location='10.15.12.1/live' file='(null)'
06-11 15:19:58.744 23691-24003/com.yyl.vlc D/VLC: [a9a9a990/5dc3] libvlc demux: looking for access_demux module matching "rtsp": 6 candidates
06-11 15:19:58.744 23691-24003/com.yyl.vlc D/VLC: [a9a9a990/5dc3] libvlc demux: version 2016.11.28
06-11 15:19:58.748 331-2867/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
06-11 15:19:58.748 331-2867/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
06-11 15:19:58.758 1910-2156/? I/Timeline: Timeline: App_transition_ready time:19187956
06-11 15:19:58.761 1910-2156/? I/ActivityManager: Displayed com.yyl.vlc/.vlc.VlcPlayerActivity: +177ms
06-11 15:19:58.743 4343-4343/? W/Binder:1910_B: type=1400 audit(0.0:1055): avc: denied { ioctl } for path="socket:[932919]" dev="sockfs" ino=932919 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-11 15:19:58.743 4343-4343/? W/Binder:1910_B: type=1400 audit(0.0:1056): avc: denied { ioctl } for path="socket:[932919]" dev="sockfs" ino=932919 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-11 15:19:58.763 3836-3836/? V/PhoneStatusBarPolicy: updateManagedProfile mManagedProfileFocused: false mManagedProfileInQuietMode: false mKeyguardVisible: false mCurrentUserId:0 mCurrentProfileId:0 mSecondSpaceStatusIconVisible: true showIcon:false
06-11 15:19:58.773 23691-23691/com.yyl.vlc I/VlcPlayer: Opening
06-11 15:19:58.773 23691-23691/com.yyl.vlc I/VlcPlayer: MediaPlayer.Event.Buffering0.0
06-11 15:19:58.775 23691-24003/com.yyl.vlc W/VLC: [a9a9a990/5dc3] libvlc demux: RTP subsession 'video/H265' failed (getsockname() error: Bad file descriptor)
06-11 15:19:58.775 23691-24003/com.yyl.vlc D/VLC: [a9a9a990/5dc3] libvlc demux: setup start: 0.000000 stop:0.000000
06-11 15:19:58.775 23691-24003/com.yyl.vlc E/VLC: [a9a9a990/5dc3] libvlc demux: Nothing to play for rtsp://10.15.12.1:554/live
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [a9a9a990/5dc3] libvlc demux: no access_demux modules matched
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: creating access: rtsp://10.15.12.1/live
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: looking for access module matching "rtsp": 23 candidates
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: try to open 'rtsp://10.15.12.1/live'
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: connect to host '10.15.12.1'
06-11 15:19:58.778 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: net: connecting to 10.15.12.1 port 554
06-11 15:19:58.782 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: connection succeeded (socket = 51)
06-11 15:19:58.782 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: net: opening 0.0.0.0 datagram port 9348
06-11 15:19:58.782 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: net: opening 0.0.0.0 datagram port 9349
06-11 15:19:58.785 23691-23739/com.yyl.vlc D/OpenGLRenderer: endAllStagingAnimators on 0xa9823b00 (RippleDrawable) with handle 0xa9dbb970
06-11 15:19:58.786 23691-24003/com.yyl.vlc E/VLC: [ae9e40b0/5dc3] libvlc stream: Failed to setup RTSP session
06-11 15:19:58.786 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: net: connecting to 10.15.12.1 port 554
06-11 15:19:58.788 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: connection succeeded (socket = 51)
06-11 15:19:58.797 23691-24003/com.yyl.vlc W/VLC: [ae9e40b0/5dc3] libvlc stream: Cseq mismatch, got 1, assumed 0
06-11 15:19:58.797 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: rtsp connected
06-11 15:19:58.797 23691-24003/com.yyl.vlc W/VLC: [ae9e40b0/5dc3] libvlc stream: only real/helix rtsp servers supported for now
06-11 15:19:58.797 23691-24003/com.yyl.vlc D/VLC: [ae9e40b0/5dc3] libvlc stream: no access modules matched
06-11 15:19:58.797 23691-24003/com.yyl.vlc E/VLC: [ae9e1830/5dc3] libvlc input: Your input can't be opened
06-11 15:19:58.797 23691-24003/com.yyl.vlc E/VLC: [ae9e1830/5dc3] libvlc input: VLC is unable to open the MRL 'rtsp://10.15.12.1/live'. Check the log for details.
06-11 15:19:58.798 23691-23691/com.yyl.vlc I/VlcPlayer: EncounteredError
06-11 15:19:58.798 23691-23691/com.yyl.vlc I/VlcPlayer: Stopped isLoop=true
06-11 15:19:58.798 23691-24003/com.yyl.vlc W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[23,tid=24003,Native,Thread*=0xa9ab8d00,peer=0x12ff10a0,"VlcObject"]
06-11 15:19:59.026 1910-2156/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{f229e5d u0 com.yyl.vlc/.vlc.VlcPlayerActivity t115} time:19188224
06-11 15:19:59.062 1910-2156/? I/Timeline: Timeline: App_transition_stopped time:19188260
06-11 15:19:59.103 367-490/? I/ThermalEngine: Sensor:batt_temp:341 mC
06-11 15:19:59.996 583-583/? D/charger_monitor: vchg_loop stable: 0, is_settled = 0,usb_target_ua = 500000, usbin_current_now = 500000,fastchg_sts = 0, num_attempts = 0
06-11 15:20:00.023 583-583/? D/charger_monitor: vchg_loop stable: 0, is_settled = 0,usb_target_ua = 500000, usbin_current_now = 500000,fastchg_sts = 0, num_attempts = 0
06-11 15:20:00.034 4386-4386/? I/SleepModeManager: I notifyEvent !mIsEnable return
06-11 15:20:00.034 4386-4386/? I/SleepModeManager_CertSleepDetection: I CertBroadcastReceiver onReceive:android.intent.action.BATTERY_CHANGED
06-11 15:20:00.039 5094-5315/? I/InfoCollectManager: ACTION:android.intent.action.BATTERY_CHANGED
06-11 15:20:00.050 4386-4386/? I/SleepModeManager: I notifyEvent !mIsEnable return
06-11 15:20:00.051 4386-4386/? I/SleepModeManager_CertSleepDetection: I CertBroadcastReceiver onReceive:android.intent.action.BATTERY_CHANGED
06-11 15:20:00.052 5094-5315/? I/InfoCollectManager: ACTION:android.intent.action.BATTERY_CHANGED
06-11 15:20:00.090 4386-4566/? W/WtProcessController: do not trim { PackageName :com.yyl.vlc Pid: 23691 Uid: 10134 Start by: activity Score:100 Old score:100 state:0 mBackgroundTimeInMillis:0 WakelockCount:0 wakelogsize:0 ActivityDestroied:false Activity size: 2 PackageInfo:{WhetstonePackageInfo#PacakgeName:com.yyl.vlc uid:10134 uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:1073745984,0x40001040 [,TRIMHEAPS,FLAG_DEAL_SCHEDULE] Type:64[,AUTO_START] } tasknum:115}
06-11 15:20:00.104 367-490/? I/ThermalEngine: Sensor:batt_temp:341 mC

libvlc stream: only real/helix rtsp servers supported for now
你确认下 在电脑上用vlc能播不 然后在android手机上用官方的vlc-android试下这个地址,都没问题在改代码适配

都可以播放的,请问如何修改参数呢

要是官方apk播放没有问题,这个库一般不会出错的,我没改多少源码,试着切换软解码硬解码和修改启动配置,有option文档

都可以播放的,请问如何修改参数呢

看ip是和萤石的运动相机一样的协议么