Closed ChrisThis closed 5 months ago
感觉应该没发,mdk貌似基于ffmpeg,而ffmpeg没有把rtsp交互指令加进去
try the latest build. player.setProperty("reader.pause", "1")
will enable pause resume command in set(State)
still the same behaviour. I also use the latest build. maybe the logs will help you
MDK:SDK-I 0.28.0 (git 4504be1) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author)
MDK:SDK-D default 0x31389180 new FrameReader...
MDK:SDK-D Registered audio backends: ALSA OpenAL null
MDK:SDK-D ALSA device name: default
MDK:SDK-D ALSA device id: default
MDK:SDK-D ALSA subdevice name: default
MDK:SDK-D default 0x3123e3b0 new FrameReader...
MDK:SDK-D Registered audio backends: ALSA OpenAL null
MDK:SDK-D ALSA device name: default
MDK:SDK-D ALSA device id: default
MDK:SDK-D ALSA subdevice name: default
MDK:SDK-D 0x31250990 player.Player()
MDK:SDK-D 0x31250990 player.onStateChanged(1)
MDK:SDK-D 0x31250990 player.onMediaStatus(1)
MDK:SDK-D 0x31250990 player.onEvent(1, 0x7fff261d08b0)
MDK:SDK-D 0x31250990 player.setDecoders(video, [VAAPI, VDPAU, CUDA, hap, FFmpeg, dav1d])
MDK:SDK-D video decoders: "VAAPI", "VDPAU", "CUDA", "hap", "FFmpeg", "dav1d"
MDK:SDK-D video decoders: "VAAPI", "VDPAU", "CUDA", "hap", "FFmpeg", "dav1d"
MDK:SDK-D 0x31250990 player property: avformat.fflags = +nobuffer
MDK:SDK-D 0x31250990 player property: avformat.fpsprobesize = 0
MDK:SDK-D 0x31250990 player property: avformat.analyzeduration = 100000
MDK:SDK-D 0x31250990 player property: avformat.rtsp_transport = tcp
MDK:SDK-D 0x31250990 player property: reader.pause = 1
MDK:SDK-D 0x31250990 player.setMedia(rtsp://172.0.0.140:8554/mp3Stream)
MDK:SDK-D default FrameReader0x31389180 state: 0=>0=>0, 0
MDK:SDK-I default0x31389180 stop, current state: 0
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MDK:SDK-D default FrameReader0x31389180 state: 0=>0=>0, 0
MDK:SDK-I default0x31389180 stop, current state: 0
MDK:SDK-D 0x31250990 player.prepare(0, ..., 2)
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MDK:SDK-I 0x31387250 MediaControl.prepare(0, ...) rtsp://172.0.0.140:8554/mp3Stream
MDK:SDK-D default 0x31389180 FrameReader.start(0, ...)
MDK:SDK-D default 0x31389180 FrameReader::update MediaStatus 0=>0X2
MainWindow MDK media status changed 2 MDK:SDK-D default FrameReader0x31389180 state: 0=>0=>1, 0
MDK:SDK-D default FrameReader0x31389180 state: 0=>1=>1, 0
MDK:SDK-D default FrameReader0x31389180 request to pause 1, loaded: 0.
MDK:SDK-D default FrameReader0x31389180 state: 0=>1=>2, 0
MDK:SDK-D default FrameReader0x31389180 state requested: 2, current: 0
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MDK:SDK-D 0x31250990 player.set(1)
MDK:SDK-D 0x31387250 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 2=>1, current state 0. status: 0X2
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MDK:SDK-D default FrameReader0x31389180 request to pause 0, loaded: 0.
MDK:SDK-D default FrameReader0x31389180 state: 0=>2=>1, 0
MDK:SDK-D default FrameReader0x31389180 state requested: 1, current: 0
MDK:SDK-D start frame reader thread: 140690136762048
MDK:SDK-D try to load av module: /home/chris/Qt_Projects/MyStreamingServerTest/MyStreamingServerTest/Client/mdk-sdk/lib/amd64/libffmpeg.so.7
MDK:SDK-D ffmpeg loaded: /home/chris/Qt_Projects/MyStreamingServerTest/MyStreamingServerTest/Client/mdk-sdk/lib/amd64/libffmpeg.so.7
MDK:SDK-D FFmpeg/Libav runtime git-2024-05-29-fa3b153-avbuild
MDK:SDK-D Selected avutil runtime version: 59.20.100 (build: 59.20.100), license: LGPL version 2.1 or later
MDK:SDK-D Selected avutil runtime configuration: --extra-version=avbuild --disable-doc --disable-debug --disable-static --enable-shared --enable-runtime-cpudetect --disable-iamf --enable-libvpl --enable-libdrm --disable-postproc --ranlib=llvm-ranlib-18 --nm=llvm-nm-18 --ar=llvm-ar-18 --nvcc=clang-18 --enable-cross-compile --target-os=linux --arch=amd64 --pkg-config=pkg-config --sysroot='$SYSROOT' --cc=clang-18 --enable-lto --enable-pic --extra-cflags='-Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIE -I/home/runner/work/avbuild/avbuild/tools/Vulkan-Headers/include -I=/usr/include/libdrm -I/tmp/dep/include -Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIE --target=x86_64-linux-gnu' --extra-ldflags='-s -fuse-ld=lld -Wl,--gc-sections -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,relro -Wl,-z,now --target=x86_64-linux-gnu' --extra-libs=-lrt --disable-stripping --enable-small --disable-outdevs --disable-filters --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --disable-protocols --enable-wolfssl --enable-decoder='sub,movtext,web,aac,ac3,eac3,alac,ape,ass,ccaption,cfhd,cook,dca,dnxhd,exr,truehd,yuv,flv,flac,gif,h26[3-4],hevc,hap,mp[1-3],prores,[mj]peg,mlp,mpl2,nellymoser,opus,pcm,qtrle,png,tiff,rawvideo,rv,sami,srt,ssa,v210,vc1,vorbis,vp[6-9],wm,wrapped_avframe,av1,ffv' --enable-demuxer='sub,ac3,ac,[mj]peg,web,au,ape,ass,avi,concat,dnxhd,dts,dash,flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm,rawvideo,rtp,spdif,srt,vc1,v210,wav,pipe,image2,mlv,nsv,nut' --enable-encoder='aac,gif,h26[3-4],av1,hevc,mjpeg,png,opus,pcm,prores,rawvideo,spdif,speedhq,jpeg,png,vp[8-9],wrapped_avframe,ff,nvenc,qsv,v4l2m2m,vaapi,vorbis,yuv' --enable-muxer='jpeg,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,pcm,rawvideo,spdif,pipe,segment,webm,wav,dash,nu,og' --enable-filter='null,afade,fifo,format,resample,aeval,atempo,pan,crop,eq,framerate,hw,scale,volume,allrgb,allyuv,bars,color,test,key,draw,_qsv,_vaapi,v4l2' --enable-protocol='cache,concat,crypto,data,fd,file,ftp,h,i,pipe,rt,s,t,u'
MDK:SDK-D global option: ffmpeg.configuration = --extra-version=avbuild --disable-doc --disable-debug --disable-static --enable-shared --enable-runtime-cpudetect --disable-iamf --enable-libvpl --enable-libdrm --disable-postproc --ranlib=llvm-ranlib-18 --nm=llvm-nm-18 --ar=llvm-ar-18 --nvcc=clang-18 --enable-cross-compile --target-os=linux --arch=amd64 --pkg-config=pkg-config --sysroot='$SYSROOT' --cc=clang-18 --enable-lto --enable-pic --extra-cflags='-Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIE -I/home/runner/work/avbuild/avbuild/tools/Vulkan-Headers/include -I=/usr/include/libdrm -I/tmp/dep/include -Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIE --target=x86_64-linux-gnu' --extra-ldflags='-s -fuse-ld=lld -Wl,--gc-sections -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,relro -Wl,-z,now --target=x86_64-linux-gnu' --extra-libs=-lrt --disable-stripping --enable-small --disable-outdevs --disable-filters --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --disable-protocols --enable-wolfssl --enable-decoder='sub,movtext,web,aac,ac3,eac3,alac,ape,ass,ccaption,cfhd,cook,dca,dnxhd,exr,truehd,yuv,flv,flac,gif,h26[3-4],hevc,hap,mp[1-3],prores,[mj]peg,mlp,mpl2,nellymoser,opus,pcm,qtrle,png,tiff,rawvideo,rv,sami,srt,ssa,v210,vc1,vorbis,vp[6-9],wm,wrapped_avframe,av1,ffv' --enable-demuxer='sub,ac3,ac,[mj]peg,web,au,ape,ass,avi,concat,dnxhd,dts,dash,flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm,rawvideo,rtp,spdif,srt,vc1,v210,wav,pipe,image2,mlv,nsv,nut' --enable-encoder='aac,gif,h26[3-4],av1,hevc,mjpeg,png,opus,pcm,prores,rawvideo,spdif,speedhq,jpeg,png,vp[8-9],wrapped_avframe,ff,nvenc,qsv,v4l2m2m,vaapi,vorbis,yuv' --enable-muxer='jpeg,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,pcm,rawvideo,spdif,pipe,segment,webm,wav,dash,nu,og' --enable-filter='null,afade,fifo,format,resample,aeval,atempo,pan,crop,eq,framerate,hw,scale,volume,allrgb,allyuv,bars,color,test,key,draw,_qsv,_vaapi,v4l2' --enable-protocol='cache,concat,crypto,data,fd,file,ftp,h,i,pipe,rt,s,t,u'
MDK:SDK-D global option: ffmpeg.version = 7
MDK:SDK-D av_dict_set0x7ff4cab3085c
MDK:SDK-W Failed to create io for url. io: (nil), open: 0
MDK:SDK-D Selected avformat runtime version: 61.3.104 (build: 61.3.104), license: LGPL version 2.1 or later
MDK:SDK-D av_muxer_iterate0x7ff4caac4caf
MDK:SDK-D Selected avcodec runtime version: 61.5.104 (build: 61.5.104), license: LGPL version 2.1 or later
MDK:SDK-D avcodec_descriptor_next0x7ff4ca66437b
MDK:SDK-D default 0x31389180 FrameReader::update MediaStatus 0X2=>0X2
MDK:SDK-D before avformat_open_input. io: (nil)()/pb: (nil), url: rtsp://172.0.0.140:8554/mp3Stream
MDK:SDK-D FFmpeg/Libav runtime git-2024-05-29-fa3b153-avbuild
MDK:SDK-D after avformat_open_input. pb: (nil), iformat: 0x7ff4cac333f0, context flags: 2097216, input format flags: 1
MDK:SDK-I Format: rtsp, range: 52 +224362ms, bitrate: 0, size: 0 Metadata: comment: mp3Stream title: MP3 Stream Streams: 1 Audio: stream#0, range: 52 +0ms, frames: 0 codec: mp3 tag: 0 profile: -99 level: -99, sample size: 0/0, block align: 0, frame_size: 1152, f32p stereo(2) @44100Hz, bitrate: 192000
MDK:SDK-D 0x31387250 prepared callback is invoked
Prepare 0 Get media info 224362 !!!! EVENT "metadata" "" mdk event "" MDK:SDK-D default 0x31389180 FrameReader::update MediaStatus 0X2=>0X4
MainWindow MDK media status changed 4 MDK:SDK-I buffering progress 0%
MDK:SDK-D default 0x31389180 FrameReader::update MediaStatus 0X4=>0X14
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MainWindow MDK media status changed 20 MDK:SDK-I ++++++++++++BUFFERING START++++++++++++
MDK:SDK-D !!!! EVENT "reader.buffering" "" mdk event "" MDK:SDK-D default FrameReader0x31389180 state: 0=>1=>1, 1
MDK:SDK-D default FrameReader0x31389180 update state: 0=>1
MainWindow MDK state changed MDK:SDK-D default FrameReader0x31389180 state: 1=>1=>2, 1
MDK:SDK-D default FrameReader0x31389180 update state: 1=>2
MainWindow MDK state changed MDK:SDK-D starting decode loop thread mdk.adec0@140690126276288
!!!! EVENT "thread.audio" "" mdk event "" MDK:SDK-D audio stream#0 starting decoding loop from decoder index 0...
MDK:SDK-D creating audio decoder: auto...
MDK:SDK-I opening audio decoder: FFmpeg...
MDK:SDK-D opening ffmpeg audio decoder: mp3
MDK:SDK-D AVCodec.Audio[mp3.] decoder: 1 Single threads
MDK:SDK-D mp3 s16p, stereo @44100Hz
!!!! EVENT "decoder.audio" "FFmpeg" mdk event "FFmpeg" MDK:SDK-I buffering progress 100%
MDK:SDK-D default 0x31389180 FrameReader::update MediaStatus 0X14=>0X124
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFFB): Input/output error
MDK:SDK-D MainWindow MDK media status changed 292 MDK:SDK-I ++++++++++++BUFFERING END++++++++++++
MDK:SDK-D !!!! EVENT "reader.buffering" "" mdk event "" MDK:SDK-D audio stream#0 sending 1 invalid AOT frame @0.078366s. seeking: 0
MDK:SDK-D 0x31387250 1st audio frame @0.078366
MDK:SDK-I 0x31387250 seek end audio frame @0.078366 seekpos: -1, syncao 1
MDK:SDK-D Selected avfilter runtime version: 10.2.102 (build: 10.2.102), license: LGPL version 2.1 or later
MDK:SDK-D AudioRenderer format: s16, stereo @44100Hz, requested: s16p, stereo @44100Hz
MDK:SDK-D AudioRenderer format changed and reinitialize
MDK:SDK-D AudioBackendALSA.close
MDK:SDK-D ALSA ERROR@218 snd_pcmdrop(pcm) (0XFFFFFFFB): Input/output error
MDK:SDK-D MDK:SDK-D buffer time(us): 2176~23777234, period time(us): 725~7925760, perdiods: 3~1024
MDK:SDK-D snd_pcm_hw_params_set_buffer_time_near 92864 ret 92857
MDK:SDK-D buffer_size dt: 5804, request periods: 16
MDK:SDK-D snd_pcm_hw_params_set_periods_near 16 ret 16
MDK:SDK-D default FrameReader0x31389180 state: 2=>2=>1, 1
MDK:SDK-D default FrameReader0x31389180 update state: 2=>1
MainWindow MDK state changed MDK:SDK-D period size: 255, time: 5783
MDK:SDK-D Using audio backend: ALSA
MDK:SDK-D ALSA ERROR@284 snd_pcmpause(pcm, value) (0XFFFFFFB3): File descriptor in bad state
MDK:SDK-D MDK:SDK-D 0x31387250 ao opened: 1, reopen: 1, bad ao: 0. valid: 0
MDK:SDK-D 0x7ff4c0002078 filter graph:
MDK:SDK-D +-----------+ | src |default--[44100Hz s16p:stereo]--swr:default | (abuffer) | +-----------+
+---------------+
swr:default--[44100Hz s16:stereo]--default| dst | | (abuffersink) | +---------------+
+-------------+
src:default--[44100Hz s16p:stereo]--default| swr |default--[44100Hz s16:stereo]--dst:default | (aresample) | +-------------+
MDK:SDK-D bad delay. written: 104 - delay = -14
MDK:SDK-D >>>>>>>>1st audio frame (after seek) rendered: 1, ao: 3, a: 78, delta: 26 +0.026122
MDK:SDK-D audio stream#0 AOT frame is sent
MDK:SDK-D 0x31250990 player.set(2)
MDK:SDK-D 0x31387250 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 1=>2, current state 1. status: 0X124
MDK:SDK-D default FrameReader0x31389180 request to pause 1, loaded: 4.
MDK:SDK-D default FrameReader0x31389180 state: 1=>1=>2, 0
MDK:SDK-D default FrameReader0x31389180 state requested: 2, current: 1
MDK:SDK-D default FrameReader0x31389180 state: 1=>2=>2, 1
MDK:SDK-D default FrameReader0x31389180 update state: 1=>2
MainWindow MDK state changed MDK:SDK-D 0x31250990 player.set(1)
MDK:SDK-D 0x31387250 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 2=>1, current state 2. status: 0X124
MDK:SDK-D default FrameReader0x31389180 request to pause 0, loaded: 4.
MDK:SDK-D default FrameReader0x31389180 state: 2=>2=>1, 0
MDK:SDK-D default FrameReader0x31389180 state requested: 1, current: 2
MDK:SDK-D default FrameReader0x31389180 state: 2=>1=>1, 1
MDK:SDK-D default FrameReader0x31389180 update state: 2=>1
MainWindow MDK state changed MDK:SDK-D 0x31250990 player.set(2)
MDK:SDK-D 0x31387250 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 1=>2, current state 1. status: 0X124
MDK:SDK-D default FrameReader0x31389180 request to pause 1, loaded: 4.
MDK:SDK-D default FrameReader0x31389180 state: 1=>1=>2, 0
MDK:SDK-D default FrameReader0x31389180 state requested: 2, current: 1
MDK:SDK-D default FrameReader0x31389180 state: 1=>2=>2, 1
MDK:SDK-D default FrameReader0x31389180 update state: 1=>2
MainWindow MDK state changed
0.28.0 (git 4504be1) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author)
the latest build is here https://sourceforge.net/projects/mdk-sdk/files/nightly/
I've tested with glfwplay -ffmpeg.log trace=rtsp -reader.pause 1 rtsp://...
and I can see PAUSE/PLAY command. the command is disabled by default because I can't resume the playback for some live streams in my tests.
PAUSE command is now working. I can see it on wireshark. But on Play, to resume the stream, no command is sending to the server and i get a demuxer io timeout:
MDK:SDK-D 0x16af6bb0 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 2=>1, current state 2. status: 0X124 MDK:SDK-D default FrameReader0x16a44700 request to pause 0, loaded: 4. MDK:SDK-D default FrameReader0x16a44700 state: 2=>2=>1, 0 MDK:SDK-D default FrameReader0x16a44700 state requested: 1, current: 2 MDK:SDK-D demuxer io timeout detected: 10092ms elapsed MDK:SDK-D demuxer io timeout detected: 10192ms elapsed MDK:SDK-D demuxer io timeout detected: 10293ms elapsed
can you try glfwplay command i mentioned above? or SetGlobalOption("ffmpeg.log", "trace=rtsp") in your code to confirm PLAY command is the log? I can see PLAY in the log, but still timeout
i can see the PAUSE command, but no PLAY command and still the timout:
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=24 [$]
MDK:SDK-D [FFmpeg:rtsp] id=0 len=1270
MDK:SDK-D [FFmpeg:rtsp] tcp_read_packet:
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=24 [$]
MDK:SDK-D [FFmpeg:rtsp] id=0 len=1270
MDK:SDK-D [FFmpeg:rtsp] tcp_read_packet:
MDK:SDK-D 0x28527ab0 player.set(2)
MDK:SDK-D 0x286939e0 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 1=>2, current state 1. status: 0X124
MDK:SDK-D default FrameReader0x285d0d50 request to pause 1, loaded: 4.
MDK:SDK-D default FrameReader0x285d0d50 state: 1=>1=>2, 0
MDK:SDK-D default FrameReader0x285d0d50 state requested: 2, current: 1
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=24 [$]
MDK:SDK-D [FFmpeg:rtsp] id=0 len=1270
MDK:SDK-D default FrameReader0x285d0d50 state: 1=>2=>2, 1
MDK:SDK-D default FrameReader0x285d0d50 update state: 1=>2
MainWindow MDK state changed
MDK:SDK-D [FFmpeg:rtsp] Sending:
PAUSE rtsp://172.0.0.140:8554/mp3Stream/ RTSP/1.0
CSeq: 6
User-Agent: Lavf61.3.104
Session: FE350DFE
--
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=52 [R]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=54 [T]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=53 [S]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=50 [P]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=2f [/]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=31 [1]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=2e [.]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=32 [2]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=4f [O]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=4b [K]
]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=0a [
]
MDK:SDK-D [FFmpeg:rtsp] line='RTSP/1.0 200 OK'
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=43 [C]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=53 [S]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=65 [e]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=71 [q]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=3a [:]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=36 [6]
]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=0a [
]
MDK:SDK-D [FFmpeg:rtsp] line='CSeq: 6'
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=44 [D]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=61 [a]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=74 [t]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=65 [e]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=3a [:]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=53 [S]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=75 [u]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=6e [n]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=2c [,]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=4a [J]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=75 [u]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=6e [n]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=39 [9]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=32 [2]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=32 [2]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=34 [4]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=39 [9]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=3a [:]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=34 [4]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=31 [1]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=3a [:]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=35 [5]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=38 [8]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=47 [G]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=4d [M]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=54 [T]
]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=0a [
]
MDK:SDK-D [FFmpeg:rtsp] line='Date: Sun, Jun 09 2024 09:41:58 GMT'
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=53 [S]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=65 [e]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=73 [s]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=73 [s]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=69 [i]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=6f [o]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=6e [n]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=3a [:]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=20 [ ]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=46 [F]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=45 [E]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=33 [3]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=35 [5]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=30 [0]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=44 [D]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=46 [F]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=45 [E]
]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=0a [
]
MDK:SDK-D [FFmpeg:rtsp] line='Session: FE350DFE'
]
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=0a [
]
MDK:SDK-D [FFmpeg:rtsp] line=''
MDK:SDK-D [FFmpeg:rtsp] tcp_read_packet:
MDK:SDK-D 0x28527ab0 player.set(1)
MDK:SDK-D 0x286939e0 virtual void mdk::MediaControlPush::setState(PlaybackState)@1068 requested state 2=>1, current state 2. status: 0X124
MDK:SDK-D default FrameReader0x285d0d50 request to pause 0, loaded: 4.
MDK:SDK-D default FrameReader0x285d0d50 state: 2=>2=>1, 0
MDK:SDK-D default FrameReader0x285d0d50 state requested: 1, current: 2
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=24 [$]
MDK:SDK-D [FFmpeg:rtsp] id=1 len=84
MDK:SDK-D [FFmpeg:rtsp] tcp_read_packet:
MDK:SDK-D [FFmpeg:rtsp] ret=1 c=24 [$]
MDK:SDK-D [FFmpeg:rtsp] id=1 len=84
MDK:SDK-D [FFmpeg:rtsp] tcp_read_packet:
MDK:SDK-D demuxer io timeout detected: 10064ms elapsed
MDK:SDK-D demuxer io timeout detected: 10164ms elapsed
MDK:SDK-D demuxer io timeout detected: 10265ms elapsed
MDK:SDK-D demuxer io timeout detected: 10365ms elapsed
MDK:SDK-D demuxer io timeout detected: 10466ms elapsed
I can't reproduce it. How do you modify your code? If use glfwplay, run glfwplay -ffmpeg.log trace=rtsp -reader.pause 1 rtsp://...
, it's same as player.setProperty("reader.pause", "1")
. Don't call player.setProperty("reader.pause", "0")
, otherwise no PLAY/PAUSE
command.
i tested also with glfwplay. When audio starts i push space. I can see the PAUSE command. I push it again, no PLAY command will appear.
I make a RSTP test stream: rtsp://aboutchris.net:8554/mp3Stream There is min. live555 server running. Just for this stream
try the latest build
Tested the latest build and it looks good. I can see the PLAY command and the server resume streaming. But i can't hear any audio. (Just streaming audio, no video)
same behavior also on glfwplay
only solution: player->set(mdk::State::Stopped) and start the stream again.
can you reproduce it?
should be fixed in the latest build. I tested with other rtsp live streams
Perfect, it works as expected. Thank you!
mdk的rtsp播放支持speed指令吗?就是倍速播放。前提是rtsp是带时长的文件,一般用于NVR回放用,ffmpeg中貌似没有实现rtsp的交互。
mdk的rtsp播放支持speed指令吗?就是倍速播放。前提是rtsp是带时长的文件,一般用于NVR回放用,ffmpeg中貌似没有实现rtsp的交互。
I use live555 as media server. This server support RTSP commands for PAUSE nad PLAY. With mdksdk i can open and use the strema perfectly.
But when i set Pause ( _player->set(mdk::State::Paused);) the player doesn' send the command to the RTSP sever. What happen: The RTSP Server still stream data... And on a movie stream, my app gets a big amount in the memory.
I checked the data with wireshark and see, that the server send following infos:
Frame 40: 220 bytes on wire (1760 bits), 220 bytes captured (1760 bits) on interface any, id 0 Linux cooked capture v1 Internet Protocol Version 4, Src: 172.0.0.140, Dst: 172.0.0.140 Transmission Control Protocol, Src Port: 8554, Dst Port: 33790, Seq: 1, Ack: 90, Len: 152 Source Port: 8554 Destination Port: 33790 [Stream index: 1] [Conversation completeness: Complete, WITH_DATA (63)] [TCP Segment Len: 152] Sequence Number: 1 (relative sequence number) Sequence Number (raw): 2258484818 [Next Sequence Number: 153 (relative sequence number)] Acknowledgment Number: 90 (relative ack number) Acknowledgment number (raw): 2473795037 1000 .... = Header Length: 32 bytes (8) Flags: 0x018 (PSH, ACK) Window: 512 [Calculated window size: 65536] [Window size scaling factor: 128] Checksum: 0x59d7 [unverified] [Checksum Status: Unverified] Urgent Pointer: 0 Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps [Timestamps] [SEQ/ACK analysis] TCP payload (152 bytes) Real Time Streaming Protocol Response: RTSP/1.0 200 OK\r\n CSeq: 1\r\n Date: Wed, Jun 05 2024 14:34:04 GMT\r\n Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER\r\n \r\n
My setup: ` _player->setProperty("avformat.fflags", "+nobuffer"); _player->setProperty("avformat.fpsprobesize", "0"); _player->setProperty("avformat.analyzeduration", "100000");
`
i tested the same stream with another client, and this works fine.
So is it possible, that mdksdk send also this commands to the server?
Thanks in advance.