- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要开发一个使用 vlc 媒体播放器来选择 rtsp 流并播放原始 h264 的 android 应用程序。我按照 AndroidCompile 中的说明编译了 lib vlc android使用 Mac OSx
。该项目编译时出现了一些警告(如下所示),我能够在 Android
平板电脑上运行 vlc 应用程序。 vlc 应用程序可以很好地播放 h264 容器的 rtsp 流,但它不会从实时摄像头播放原始 h264。下面的 logcat 显示了几个 unable to decode stream: java.lang.NullPointerException
但我在播放任何流的开始时都看到了这些,我想是 vlc 试图找出要使用的解码器。正如日志猫所示,它确定了 h264。在 playbackservice 宣布开始播放后不久,它宣布结束播放服务。
在 google playstore 上找到的 vlc android 应用程序能够很好地播放相同的提要,因此提要没有任何问题,并且发布版本具有播放原始 h264 的编解码器和功能。 C/C++
库的编译方式是否存在问题?还是默认情况下 libvlc(compiled) 不播放原始 h264?我没有修改 AndroidCompile 中的任何源代码项目。有没有人编译过 libvlc 并且能够播放原始 h264 的 rtsp 流?或者我应该考虑将流通过管道输送到容器中并从容器中播放,我该怎么做?
我的机器运行 Mac OS X,在运行 compile.sh 脚本之前,我安装了推荐的构建工具,项目从 Android Studio
运行。在 logcat 下方,以及项目编译时的警告 fragment 。
>07-15 14:38:26.139 9037-9037/? D/PlaybackService.Client﹕ Service Connected
>07-15 14:38:26.139 9037-9037/? V/VLC/PlaybackService﹕ Creating on-the-fly Media object for rtsp://root:****@10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720
>07-15 14:38:26.139 9037-9037/? V/VLC/PlaybackService﹕ Loading position 0 in [org.videolan.vlc.MediaWrapper@42001178]
>07-15 14:38:26.149 439-744/? I/MediaFocusControl﹕ AudioFocus requestAudioFocus() from android.media.AudioManager@41f316d0org.videolan.vlc.PlaybackService$1@41e62750
>07-15 14:38:26.149 439-727/? I/MediaFocusControl﹕ Remote Control registerMediaButtonIntent() for PendingIntent{4220baf0: PendingIntentRecord{41fd9ab0 org.videolan.vlc.debug broadcastIntent}}
>07-15 14:38:26.149 9037-9037/? D/VLC﹕ [72210838] core generic: creating audio output
>07-15 14:38:26.149 9037-9037/? D/VLC﹕ [73a56e28] core audio output: looking for audio output module matching "android_audiotrack,none": 4 candidates
>07-15 14:38:26.149 9037-9037/? D/VLC﹕ [73a56e28] core audio output: using audio output module "android_audiotrack"
>07-15 14:38:26.149 9037-9037/? D/VLC﹕ [72210838] core generic: keeping audio output
>07-15 14:38:26.149 9037-9037/? D/VLC﹕ [73acc248] core input: Creating an input for 'rtsp://10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720'
>07-15 14:38:26.149 9037-9412/? D/VLC﹕ [73acc248] core input: using timeshift granularity of 50 MiB, in path '/tmp'
>07-15 14:38:26.159 9037-9412/? D/VLC﹕ [73acc248] core input: `rtsp://root:****@10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720' gives access `rtsp' demux `' path `root:****@10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720'
>07-15 14:38:26.159 9037-9412/? D/VLC﹕ [73acc248] core input: specified demux `any'
>07-15 14:38:26.159 9037-9412/? D/VLC﹕ [73acc248] core input: creating demux: access='rtsp' demux='any' location='root:****@10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720' file='(null)'
>07-15 14:38:26.159 9037-9412/? D/VLC﹕ [73890268] core demux: looking for access_demux module matching "rtsp": 6 candidates
>07-15 14:38:26.159 9037-9412/? D/VLC﹕ [73890268] live555 demux: version 2015.06.24
>07-15 14:38:26.159 9037-9052/? E/VLC-std﹕ Opening connection to
>07-15 14:38:26.159 9037-9052/? E/VLC-std﹕ 10.168.1.45
>07-15 14:38:26.159 9037-9052/? E/VLC-std﹕ , port
>07-15 14:38:26.159 9037-9052/? E/VLC-std﹕ 554
>07-15 14:38:26.159 9037-9052/? E/VLC-std﹕ ...
>07-15 14:38:26.159 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.179 9037-9052/? E/VLC-std﹕ ...remote connection opened
> Sending request: OPTIONS rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 2
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
>07-15 14:38:26.179 9037-9052/? E/VLC-std﹕ Received 143
>07-15 14:38:26.179 9037-9052/? E/VLC-std﹕ new bytes of response data.
> Received a complete OPTIONS response:
> RTSP/1.0 200 OK
> CSeq: 2
> Public: DESCRIBE, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER, >TEARDOWN
> Date: Wed, 15 Jul 2015 20:32:31 GMT
> Sending request:
>07-15 14:38:26.179 9037-9052/? E/VLC-std﹕ DESCRIBE rtsp://10.168.1.45:554/axis-media/media.amp?>videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 3
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Accept: application/sdp
>07-15 14:38:26.189 9037-9037/? E/BitmapFactory﹕ Unable to decode >stream: java.lang.NullPointerException
>07-15 14:38:26.189 9037-9052/? E/VLC-std﹕ Received 247 new bytes of >response data.
> Received a complete DESCRIBE response:
> RTSP/1.0 401 Unauthorized
> CSeq: 3
> WWW-Authenticate: Digest realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", stale=FALSE
> WWW-Authenticate: Basic realm="AXIS_00408CE6D77E"
> Date: Wed, 15 Jul 2015 20:32:31 GMT
> Resending...
> Sending request: DESCRIBE rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 4
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720", >response="23cc09ed9e29fc64404cddae9c8b44cc"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Accept: application/sdp
>07-15 14:38:26.199 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.199 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.209 9037-9412/? D/VLC﹕ [73890268] live555 demux: RTP >subsession 'video/H264'
>07-15 14:38:26.209 9037-9052/? E/VLC-std﹕ Received 809 new bytes of >response data.
> Received a complete DESCRIBE response:
> RTSP/1.0 200 OK
> CSeq: 4
> Content-Type: application/sdp
> Content-Base: rtsp://10.168.1.45:554/axis-media/media.amp/
> Date: Wed, 15 Jul 2015 20:32:31 GMT
> Content-Length: 632
> v=0
> o=- 1436992351621972 1436992351621972 IN IP4 10.168.1.45
> s=Media Presentation
> e=NONE
> b=AS:50000
> t=0 0
> a=control:rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720
> a=range:npt=0.000000-
> m=video 0 RTP/AVP 96
> c=IN IP4 0.0.0.0
> b=AS:50000
> a=framerate:25.0
> >a=transform:1.000000,0.000000,0.000000;0.000000,0.900000,0.000000;0.000000,0.000000,1.000000
> a=control:rtsp://10.168.1.45:554/axis-media/media.amp/trackID=1?videocodec=h264&resolution=1280x720
> a=rtpmap:96 H264/90000
> a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop->parameter-sets=Z0IAKeKQCgC3YC3AQEBpB4kRUA==,aM48gA==
Sending request:
>07-15 14:38:26.209 9037-9052/? E/VLC-std﹕ SETUP rtsp://10.168.1.45:554/axis-media/media.amp/trackID=1?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 5
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp/", response="8c5fc662991d144c3d2d319abdb09802"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Transport: RTP/AVP;unicast;client_port=53078-53079
>07-15 14:38:26.219 576-588/? D/dalvikvm﹕ GC_FOR_ALLOC freed 2420K, 79% free 8246K/38240K, paused 30ms, total 31ms
>07-15 14:38:26.229 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.239 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.259 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.259 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.269 439-722/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41c773b8 attribute=null, token = android.os.BinderProxy@4225d8a0
>07-15 14:38:26.289 9037-9052/? E/VLC-std﹕ Received 198 new bytes of response data.
>07-15 14:38:26.289 9037-9052/? E/VLC-std﹕ Received a complete SETUP >response:
> RTSP/1.0 200 OK
> CSeq: 5
> Session: 1EB7CD91; timeout=60
> Transport: RTP/AVP;unicast;client_port=53078->53079;server_port=50124-50125;ssrc=57E15CB7;mode="PLAY"
> Date: Wed, 15 Jul 2015 20:32:31 GMT
>07-15 14:38:26.289 9037-9412/? D/VLC﹕ [73acc248] core input: selecting program id=0
>07-15 14:38:26.289 9037-9412/? D/VLC﹕ [73890268] live555 demux: setup start: 0.000000 stop:0.000000
>07-15 14:38:26.289 9037-9052/? E/VLC-std﹕ Sending request: PLAY rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 6
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp/", response="20a147ef13ac0dd25e485b077f24d072"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Session: 1EB7CD91
> Range: npt=0.000-
>07-15 14:38:26.299 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.339 9037-9037/? D/dalvikvm﹕ GC_FOR_ALLOC freed 732K, 15% free 6659K/7816K, paused 24ms, total 25ms
>07-15 14:38:26.359 439-729/? I/ActivityManager﹕ START u0 {act=org.videolan.vlc.gui.video.PLAY_FROM_VIDEOGRID flg=0x18000000 cmp=org.videolan.vlc.debug/org.videolan.vlc.gui.video.VideoPlayerActivity (has extras)} from pid 9037
>07-15 14:38:26.409 9037-9052/? E/VLC-std﹕ Received 233 new bytes of response data.
>07-15 14:38:26.409 9037-9052/? E/VLC-std﹕ Received a complete PLAY response:
> RTSP/1.0 200 OK
> CSeq: 6
> Session: 1EB7CD91
> Range: npt=0-
> RTP-Info: url=rtsp://10.168.1.45:554/axis-media/media.amp/trackID=1?videocodec=h264&resolution=1280x720;seq=31479;rtptime=1375710016
Date: Wed, 15 Jul 2015 20:32:31 GMT
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73890268] live555 demux: We have a timeout of 60 seconds
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73890268] live555 demux: spawned timeout thread
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73890268] live555 demux: play start: 0.000000 stop:0.000000
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73890268] core demux: using access_demux module "live555"
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73acc248] core input: video is disabled, not selecting ES 0x0
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73c1aea0] core demux meta: looking for meta reader module matching "any": 1 candidates
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73c1aea0] core demux meta: no meta reader modules matched
>07-15 14:38:26.409 9037-9412/? D/VLC﹕ [73acc248] core input: `rtsp://root:****@10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720' successfully opened
>07-15 14:38:26.409 9037-9052/? E/VLC-std﹕ Sending request: TEARDOWN rtsp://10.168.1.45:554/axis-media/media.amp/trackID=1?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 7
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp/", response="c03b9bbe9546d7c65fdc193c8cee8c8f"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Session: 1EB7CD91
>07-15 14:38:26.439 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.439 116-336/? W/AudioFlinger﹕ write blocked for 374 msecs, 150 delayed writes, thread 0x40c51008
>07-15 14:38:26.469 9037-9037/? I/VLC/PlaybackService﹕ Media.Event.ParsedChanged
>07-15 14:38:26.469 9037-9037/? D/VLC/MediaWrapper﹕ Title rtsp://10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720
>07-15 14:38:26.469 9037-9037/? D/VLC/MediaWrapper﹕ Artist null
>07-15 14:38:26.469 9037-9037/? D/VLC/MediaWrapper﹕ Genre null
>07-15 14:38:26.469 9037-9037/? D/VLC/MediaWrapper﹕ Album null
>07-15 14:38:26.479 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.489 9037-9412/? D/VLC﹕ [73890268] live555 demux: tk-rtpSource->hasBeenSynchronizedUsingRTCP()
>07-15 14:38:26.489 9037-9412/? E/VLC﹕ [73acc248] core input: ES_OUT_RESET_PCR called
>07-15 14:38:26.489 9037-9052/? E/VLC-std﹕ Sending request:
>07-15 14:38:26.489 9037-9052/? E/VLC-std﹕ GET_PARAMETER rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 8
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp/", response="eef50526f953157a541671aac10b7d99"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Session: 1EB7CD91
>07-15 14:38:26.489 9037-9052/? E/VLC-std﹕ [ 07-15 14:38:26.489 9037: 9412 D/VLC ]
[73890268] live555 demux: RTSP track Close, 0 track remaining
>07-15 14:38:26.489 9037-9412/? D/VLC﹕ [73acc248] core input: EOF reached
>07-15 14:38:26.489 9037-9412/? D/VLC﹕ [73890268] core demux: removing module "live555"
>07-15 14:38:26.499 9037-9052/? E/VLC-std﹕ Sending request:
>07-15 14:38:26.499 9037-9052/? E/VLC-std﹕ TEARDOWN rtsp://10.168.1.45:554/axis-media/media.amp?videocodec=h264&resolution=1280x720 RTSP/1.0
> CSeq: 9
> Authorization: Digest username="root", realm="AXIS_00408CE6D77E", nonce="00478005Y607330b149b17a0889d51cdbe1476bcbc90d0", uri="rtsp://10.168.1.45:554/axis-media/media.amp/", response="c03b9bbe9546d7c65fdc193c8cee8c8f"
> User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
> Session: 1EB7CD91
>07-15 14:38:26.499 9037-9052/? E/VLC-std﹕ [ 07-15 14:38:26.499 9037: 9412 D/VLC ]
[73acc248] core input: Program doesn't contain anymore ES
>07-15 14:38:26.499 9037-9412/? D/dalvikvm﹕ threadid=15: thread exiting, not yet detached (count=0)
>07-15 14:38:26.499 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.519 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.529 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.709 439-729/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1741K, 32% free 10561K/15308K, paused 142ms, total 142ms
>07-15 14:38:26.729 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.749 9037-9037/? I/VLC/PlaybackService﹕ MediaPlayer.Event.Playing
>07-15 14:38:26.759 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.769 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.789 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.799 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:26.829 9037-9037/? D/VLC/VideoPlayerActivity﹕ MediaRouter information : android.media.MediaRouter@41e6f950
>07-15 14:38:26.829 9037-9037/? I/VLC/VideoPlayerActivity﹕ No secondary display detected
>07-15 14:38:26.959 9037-9037/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1372K, 22% free 6328K/8044K, paused 24ms, total 26ms
>07-15 14:38:27.029 9037-9037/? I/Choreographer﹕ Skipped 30 frames! The application may be doing too much work on its main thread.
>07-15 14:38:27.309 9037-9037/? I/VLC/PlaybackService﹕ MediaPlayerEndReached
>07-15 14:38:27.339 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:27.349 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:27.359 9037-9037/? E/BitmapFactory﹕ Unable to decode stream: java.lang.NullPointerException
>07-15 14:38:27.359 9037-9037/? W/VLC/PlaybackService﹕ Warning: invalid next index, aborted !
>07-15 14:38:27.359 9037-9037/? D/VLC﹕ [73acc248] core input: Destroying the input for 'rtsp://10.168.1.45/axis-media/media.amp?videocodec=h264&resolution=1280x720'
>07-15 14:38:27.359 9037-9037/? D/VLC﹕ [73a56e28] core audio output: removing module "android_audiotrack"
>07-15 14:38:27.379 439-744/? I/MediaFocusControl﹕ AudioFocus abandonAudioFocus() from android.media.AudioManager@41f316d0org.videolan.vlc.PlaybackService$1@41e62750
>07-15 14:38:27.379 439-1293/? I/MediaFocusControl﹕ Remote Control unregisterMediaButtonIntent() for PendingIntent{42033a48: PendingIntentRecord{41fd9ab0 org.videolan.vlc.debug broadcastIntent}}
>07-15 14:38:27.399 9037-9037/? D/PlaybackService.Client﹕ Service Connected
>07-15 14:38:27.479 9037-9037/? E/VLC/VideoPlayerActivity﹕ Invalid surface size
>07-15 14:38:27.489 9037-9037/? D/VLC/VideoPlayerActivity﹕ Continuing playback from AudioService at index 0
>07-15 14:38:27.489 439-453/? I/ActivityManager﹕ Displayed org.videolan.vlc.debug/org.videolan.vlc.gui.video.VideoPlayerActivity: +1s48ms
>07-15 14:38:27.499 9037-9037/? I/AppCompatDelegate﹕ The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
>07-15 14:38:30.069 116-336/? D/AudioHardware﹕ AudioHardware pcm playback is going to standby.
> ## Quoted Heading ##
Android NDK: WARNING:jni/Android.mk:iomx.13: non-system libraries in linker flags: -lgcc -lstagefright -lmedia -lbinder
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:iomx.14: non-system libraries in linker flags: -lgcc -lstagefright -lmedia -lbinder
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:vlcjni: non-system libraries in linker flags: /Users/breinosa/Library/Android/android/.modules/build-android-arm-linux-androideabi/liba52_plugin.a
最佳答案
我在很多地方都注意到了这一点:
Unable to decode stream: java.lang.NullPointerException
您需要找出导致 NPE 的原因。
在没有看到您的代码的情况下,我最初的猜测是它正在将一个 null
传递给位图工厂,并说“对其进行解码”。
关于java - lib vlc android 不会播放原始 h264?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31441692/
我做了一个项目,使用两个不同的textview进行触摸来播放两个音频。 这是一个文本 View 的简单代码 tv.setOnTouchListener(new OnTouchListener() {
我正在使用 pygame 模块在 python 中操作声音文件。它在交互式 python session 中工作正常,但相同的代码在 bash 中不会产生任何结果: 交互式Python $ sudo
请注意它只能是 JavaScript。请参阅下面我当前的 HTML。我需要像当前代码一样在页面之间旋转。但是,我需要能够在页面之间暂停/播放。
我有一个带有一堆音频链接的html。我正在尝试使所有音频链接都在单击时播放/暂停,并且尝试了here解决方案。这正是我所追求的,只是我现在不得不修改此功能以应用于代码中的所有音频链接(因为我不能为每个
在尝试进入我的代码中的下一个文件之前,我尝试随机播放.wav文件数毫秒。最好的方法是什么? 我目前有以下代码: #!/usr/bin/env python from random import ran
我有2个回调函数,一个播放音频,另一个停止音频。 function Play_Callback(hObject, eventdata, handles) global path; global pla
我有一个电台应用程序,并与carplay集成。在Carplay仪表板中,我仅看到专辑封面图像和停止按钮。我想在仪表板上显示播放/暂停和跳过按钮。如果您对该站有任何了解,可以帮我吗? 最佳答案 您需要使
我正在使用 ffmpeg 创建一个非常基本的视频播放器。库,我有所有的解码和重新编码,但我坚持音频视频同步。 我的问题是,电影有音频和视频流混合(交织),音频和视频以“突发”(多个音频包,然后是并列的
我不知道我在做什么错 $(document).ready(function() { var playing = false; var audioElement = document.
我正在尝试通过(input:file)Elem加载本地音频文件,当我将其作为对象传递给音频构造函数Audio()时,它不会加载/播放。 文件对象参数和方法: lastModified: 1586969
在 Qt 中创建播放/暂停按钮的最佳方法是什么?我应该创建一个操作并在单击时更改其图标,还是应该创建两个操作然后以某种方式在单击时隐藏一个操作?如何使用一个快捷键来激活这两个操作? (播放时暂停,暂停
我正在用 Python 和 SQLite 构建一个预订系统。 我有一个 Staff.db 和 Play.db (一对多关系)。这个想法是这样的:剧院的唯一工作人员可以通过指定开始日期和时间来选择何时添
我有一个服务于 AAC+ (HE v2) 的 Icecast 服务器。我在我的网页中使用 JPlayer 来播放内容。在没有 Flash Player 的 Chromium 中,它工作得很好。 对于支
当我运行我的方法时,我收到一个MediaException。我使用 playSound("src/assets/timeup.mp3"); 调用该方法。 private void playSound(
我有一项正在播放播客的服务。我希望该服务检测用户何时按下暂停或从他们的 BT radio 播放,以便我可以停止和启动它。对于我的生活,我无法弄清楚要向我的监听器添加什么过滤器(当我按下 BT 按钮时,
我对 Java 不是很在行,在研究网站上的音乐循环的简单播放/暂停按钮后,我得到了这段代码。它可以很好地离线测试,但在上传到 FTP 服务器后,它不会在任何浏览器中播放音频,我得到 SyntaxErr
我有一个使用 flickity carousel library 创建的视频轮播, 见过 here on codepen .我想要发生的是,当用户滑动轮播时,所选幻灯片停止播放,然后占据所选中间位置的
这是一个 JSFiddle: http://jsfiddle.net/8LczkwLz/19/ HTML: JS: var flashcardAudio = documen
我的问题是我无法将歌曲标题文本保持在 line-height: 800px;当用户播放或暂停播放器时。我设法在 :hover 上做到了。这似乎是一件非常棘手的事情,这真的是我第一次遇到 CSS 如此困
我还没有找到与我的完全一样的帖子,所以这就是问题所在。我正在制作一个 mp3 播放器,播放/暂停是两个单独的按钮。这是我的代码。 prevButton = document.getElementByI
我是一名优秀的程序员,十分优秀!