Opened 7 years ago
Last modified 4 years ago
#6415 reopened defect
Strange DTS of first packet in RTSP stream
Reported by: | Alexander | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | slamb@slamb.org | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
If I stream mp4 file from one ffmpeg instance to another throigh rtsp protocol I get warnings on incoming site though dts in source mp4 file are ordered:
cur_dts is invalid (this is harmless if it occurs once at the start per stream) Last message repeated 2 times [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 5690 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 9290 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 12890 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 16490 [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 20090 [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 23690
When I check frame dts I get them in this order:
{buf = 0x81900f140, pts = 9200, dts = 9200, data = 0x8192be980 "", size = 31378, stream_index = 0, flags = 1, side_data = 0x0, side_data_elems = 0, duration = 3600, pos = -1, convergence_duration = 0} {buf = 0x81900f3e0, pts = -8800, dts = -8800, data = 0x819069000 "", size = 981, stream_index = 0, flags = 0, side_data = 0x0, side_data_elems = 0, duration = 3600, pos = -1, convergence_duration = 0} {buf = 0x81900f520, pts = -5200, dts = -5200, data = 0x819074300 "", size = 1082, stream_index = 0, flags = 0, side_data = 0x0, side_data_elems = 0, duration = 3600, pos = -1, convergence_duration = 0} {buf = 0x81900f660, pts = -1600, dts = -1600, data = 0x819074d00 "", size = 1078, stream_index = 0, flags = 0, side_data = 0x0, side_data_elems = 0, duration = 3600, pos = -1, convergence_duration = 0}
Where first dts=9200 is coming from?
How to reproduce:
sending part:
ffmpeg -re -i source.mp4 -acodec copy -vcodec copy -f rtsp -muxdelay 0.1 rtsp://test.mysite.com/in/1
listening part:
% ffmpeg -loglevel debug -rtsp_transport tcp -rtsp_flags listen -i rtsp://test.mysite.com/in/1 -acodec copy -vcodec copy -f null /dev/null ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers built with FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-pic --enable-gp l --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --cc=cc --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-am rwb --disable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-chromaprint --disable-libdc1394 --disable-stripping --enable-htmlpages --ena ble-libfdk-aac --enable-ffserver --disable-libflite --disable-fontconfig --disable-libfreetype --disable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --disable-ic onv --disable-libilbc --disable-indev=jack --disable-libkvazaar --disable-ladspa --disable-libmp3lame --disable-libbluray --enable-mmx --disable-libmodplug --disable-netcdf --disa ble-openal --disable-indev=openal --disable-opencl --disable-libopencv --disable-opengl --disable-libopenh264 --disable-libopenjpeg --enable-optimizations --disable-libopus --disa ble-libpulse --disable-indev=pulse --disable-outdev=pulse --enable-runtime-cpudetect --disable-librubberband --disable-libschroedinger --disable-ffplay --disable-outdev=sdl --disa ble-sdl2 --disable-libsmbclient --disable-libsnappy --disable-indev=sndio --disable-outdev=sndio --disable-libsoxr --disable-libspeex --enable-sse --disable-libssh --disable-libte sseract --enable-libtheora --disable-libtwolame --disable-libv4l2 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-vaapi --disable-vdpau --disable-libvidstab --enable-libvorbi s --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable -libzimg --disable-libzmq --disable-libzvbi --disable-gcrypt --enable-gmp --disable-librtmp --disable-gnutls --enable-openssl --enable-version3 --enable-nonfree libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'. Reading option '-rtsp_flags' ... matched as AVOption 'rtsp_flags' with argument 'listen'. Reading option '-i' ... matched as input url with argument 'rtsp://test.mysite.com/in/1'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'. Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'. Reading option '-f' ... matched as option 'f' (force format) with argument 'null'. Reading option '/dev/null' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url rtsp://test.mysite.com/in/1. Successfully parsed a group of options. Opening an input file: rtsp://test.mysite.com/in/1. [tcp @ 0x807e820a0] No default whitelist set [rtsp @ 0x807e7c000] Updating control URI to rtsp://test.mysite.com:554/in/1 [rtsp @ 0x807e7c000] SDP: v=0^M o=- 0 0 IN IP4 127.0.0.1^M s=No Name^M c=IN IP4 5.9.120.9^M t=0 0^M a=tool:libavformat 57.71.100^M m=video 0 RTP/AVP 96^M b=AS:612^M a=rtpmap:96 H264/90000^M a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9mAoC/5cBEAAAMAAQAAAwAyDxgyaA==,aMlhyyA=; profile-level-id=42C01F^M a=control:streamid=0^M m=audio 0 RTP/AVP 97^M b=AS:103^M a=rtpmap:97 MPEG4-GENERIC/44100/2^M a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1210^M a=control:streamid=1^M [rtsp @ 0x807e7c000] video codec set to: h264 [rtsp @ 0x807e7c000] RTP Packetization Mode: 1 [rtsp @ 0x807e7c000] Extradata set to 0x807e74140 (size: 38) [rtsp @ 0x807e7c000] RTP Profile IDC: 42 Profile IOP: c0 Level: 1f [rtsp @ 0x807e7c000] audio codec set to: aac [rtsp @ 0x807e7c000] audio samplerate set to: 44100 [rtsp @ 0x807e7c000] audio channels set to: 2 [rtp @ 0x807e23700] No default whitelist set [udp @ 0x807e82280] No default whitelist set [udp @ 0x807e82280] end receive buffer size reported is 65536 [udp @ 0x807e82320] No default whitelist set [udp @ 0x807e82320] end receive buffer size reported is 65536 [rtsp @ 0x807e7c000] setting jitter buffer size to 500 [rtp @ 0x807e23780] No default whitelist set [udp @ 0x807e823c0] No default whitelist set [udp @ 0x807e823c0] bind failed: Address already in use [rtp @ 0x807e23780] No default whitelist set [udp @ 0x807e823c0] No default whitelist set [udp @ 0x807e823c0] end receive buffer size reported is 65536 [udp @ 0x807e82460] No default whitelist set [udp @ 0x807e82460] end receive buffer size reported is 65536 [rtsp @ 0x807e7c000] setting jitter buffer size to 500 Failed to parse interval end specification '' [h264 @ 0x807e16f00] nal_unit_type: 7, nal_ref_idc: 3 [h264 @ 0x807e16f00] nal_unit_type: 8, nal_ref_idc: 3 [h264 @ 0x807e16f00] nal_unit_type: 7, nal_ref_idc: 3 [h264 @ 0x807e16f00] nal_unit_type: 8, nal_ref_idc: 3 [h264 @ 0x807e16f00] user data:"x264 - core 144 r2533 c8a773e - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=0: 0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lo okahead=25 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00" [h264 @ 0x807e16f00] nal_unit_type: 6, nal_ref_idc: 0 [h264 @ 0x807e16f00] nal_unit_type: 5, nal_ref_idc: 3 [h264 @ 0x807e16f00] user data:"x264 - core 144 r2533 c8a773e - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=0: 0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lo okahead=25 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00" [h264 @ 0x807e16f00] Reinit context to 640x368, pix_fmt: yuv420p [h264 @ 0x807e16f00] nal_unit_type: 1, nal_ref_idc: 2 Last message repeated 2 times [aac @ 0x807e17900] skip whole frame, skip left: 0 [h264 @ 0x807e16f00] nal_unit_type: 1, nal_ref_idc: 2 Last message repeated 2 times [rtsp @ 0x807e7c000] All info found Input #0, rtsp, from 'rtsp://test.mysite.com/in/1': Metadata: title : No Name Duration: N/A, start: -0.159002, bitrate: N/A Stream #0:0, 28, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 640x360 (640x368) [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 90k tbn , 50 tbc Stream #0:1, 49, 1/44100: Audio: aac (LC), 44100 Hz, stereo, fltp Successfully opened the file. Parsing a group of options: output url /dev/null. Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy. Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy. Applying option f (force format) with argument null. Successfully parsed a group of options. Opening an output file: /dev/null. Successfully opened the file. Output #0, null, to '/dev/null': Metadata: title : No Name encoder : Lavf57.71.100 Stream #0:0, 0, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 640x360 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:1, 0, 1/44100: Audio: aac (LC), 44100 Hz, stereo, fltp Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) Last message repeated 2 times [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 5690 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 9290 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 12890 cur_dts is invalid (this is harmless if it occurs once at the start per stream) [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 16490 [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 20090 [null @ 0x807e7d800] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23690 >= 23690 frame= 40 fps=0.0 q=-1.0 size=N/A time=00:00:01.58 bitrate=N/A speed=3.17x ^Mframe= 54 fps= 54 q=-1.0 size=N/A time=00:00:02.14 bitrate=N/A speed=2.14x ^Mframe= 66 fps = 44 q=-1.0 size=N/A time=00:00:02.62 bitrate=N/A speed=1.73x ^Mframe= 79 fps= 39 q=-1.0 size=N/A time=00:00:03.14 bitrate=N/A speed=1.54x ^Mframe= 92 fps= 36 q=-1.0 siz e=N/A time=00:00:03.66 bitrate=N/A speed=1.43x ^Mframe= 106 fps= 34 q=-1.0 size=N/A time=00:00:04.22 bitrate=N/A speed=1.37x ^Mframe= 118 fps= 33 q=-1.0 size=N/A time=00:0 0:04.70 bitrate=N/A speed=1.31x ^Mframe= 130 fps= 32 q=-1.0 size=N/A time=00:00:05.20 bitrate=N/A speed=1.27x ^Mframe= 143 fps= 31 q=-1.0 size=N/A time=00:00:05.70 bitrate =N/A speed=1.24x ^MNo more output streams to write to, finishing. frame= 149 fps= 31 q=-1.0 Lsize=N/A time=00:00:05.94 bitrate=N/A speed=1.24x video:448kB audio:88kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 (rtsp://test.mysite.com/in/1): Input stream #0:0 (video): 149 packets read (458851 bytes); Input stream #0:1 (audio): 253 packets read (90186 bytes); Total: 402 packets (549037 bytes) demuxed Output file #0 (/dev/null): Output stream #0:0 (video): 149 packets muxed (458851 bytes); Output stream #0:1 (audio): 253 packets muxed (90186 bytes); Total: 402 packets (549037 bytes) muxed 0 frames successfully decoded, 0 decoding errors
I think it is the same problem as https://trac.ffmpeg.org/ticket/5018
Change History (7)
comment:1 by , 7 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Reducing probesize doesn't solve the problem. It just hide it from console output because in this case all packets came with dts=AV_NOPTS_VALUE which is much worse!
Version from git has the same issue.
comment:4 by , 7 years ago
You can reproduce this problem on a local machine:
- Start listening instance of ffmpeg:
ffmpeg -loglevel debug -rtsp_transport tcp -rtsp_flags listen -i rtsp://localhost/in/1 -acodec copy -vcodec copy -f null /dev/null
- Start sending some mp4 file:
ffmpeg -re -i source.mp4 -acodec copy -vcodec copy -f rtsp -muxdelay 0.1 rtsp://localhost/in/1
You'll get warnings about non monotonically increasing dts on listening instance.
comment:5 by , 7 years ago
Cc: | added |
---|
comment:6 by , 4 years ago
confirmed problem still exists in 4.2.2:
[Gentoo] media-video/ffmpeg 4.2.2(0/56.58.58)^t(04:10:06 AM 05/24/2020)(X bzip2 encode gpl iconv libaom network opus postproc pulseaudio sdl threads v4l x265 zlib -alsa -altivec -amr -amrenc -appkit -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -dav1d -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaribb24 -libass -libcaca -libdrm -libilbc -libressl -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma -mipsdspr1 -mipsdspr2 -mipsfpu -mmal -modplug -mp3 -openal -opencl -opengl -openh264 -openssl -oss -pic -rubberband -samba -snappy -speex -srt -ssh -static-libs -svg -test -theora -truetype -twolame -vaapi -vdpau -vidstab -vorbis -vpx -wavpack -webp -x264 -xvid -zeromq -zimg -zvbi ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_ARM="-neon -thumb -thumb2 -v6 -v8 -vfp -vfpv3" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" VIDEO_CARDS="-nvidia")
taurus /home/jlpoole/work/ffmpeg/ticket_6415 # ./client.sh ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.0 (Gentoo 8.3.0-r1 p1.1) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-4.2.2/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-optimizations --disable-libcelt --disable-indev=alsa --disable-indev=oss --disable-indev=jack --disable-outdev=alsa --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt --disable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv --disable-libtls --disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi --disable-vdpau --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --disable-opengl --disable-libv4l2 --enable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --disable-libdav1d --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24 --disable-mmal --disable-libmodplug --enable-libopus --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --disable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm --disable-libflite --disable-frei0r --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --disable-libtesseract --disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-libvo-amrwbenc --disable-libmp3lame --disable-libkvazaar --enable-libaom --disable-libopenh264 --disable-libsnappy --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --disable-libx264 --enable-libx265 --disable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --cpu=host --disable-doc --disable-htmlpages --enable-manpages libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'. Reading option '-rtsp_flags' ... matched as AVOption 'rtsp_flags' with argument 'listen'. Reading option '-i' ... matched as input url with argument 'rtsp://localhost/in/1'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'. Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'. Reading option '-f' ... matched as option 'f' (force format) with argument 'null'. Reading option '/dev/null' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url rtsp://localhost/in/1. Successfully parsed a group of options. Opening an input file: rtsp://localhost/in/1. [tcp @ 0x55f6a2d938c0] No default whitelist set [rtsp @ 0x55f6a2d913c0] Updating control URI to rtsp://localhost:554/in/1 [rtsp @ 0x55f6a2d913c0] SDP: v=0 o=- 0 0 IN IP6 ::1 s=No Name c=IN IP6 ::1 t=0 0 a=tool:libavformat 58.29.100 m=video 0 RTP/AVP 96 b=AS:465 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAHp4hgRhTTUBAQFAAAAMAEAAAAwPI8WLu,aM4GyyA=; profile-level-id=42C01E a=control:streamid=0 m=audio 0 RTP/AVP 97 b=AS:83 a=rtpmap:97 MPEG4-GENERIC/48000/1 a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1188 a=control:streamid=1 [rtsp @ 0x55f6a2d913c0] video codec set to: h264 [rtsp @ 0x55f6a2d913c0] RTP Packetization Mode: 1 [rtsp @ 0x55f6a2d913c0] Extradata set to 0x55f6a2d96880 (size: 40) [rtsp @ 0x55f6a2d913c0] RTP Profile IDC: 42 Profile IOP: c0 Level: 1e [rtsp @ 0x55f6a2d913c0] audio codec set to: aac [rtsp @ 0x55f6a2d913c0] audio samplerate set to: 48000 [rtsp @ 0x55f6a2d913c0] audio channels set to: 1 [rtp @ 0x55f6a2d9a1c0] No default whitelist set [udp @ 0x55f6a2d9ab40] No default whitelist set [udp @ 0x55f6a2d9ab40] end receive buffer size reported is 131072 [udp @ 0x55f6a2d9a840] No default whitelist set [udp @ 0x55f6a2d9a840] end receive buffer size reported is 131072 [rtsp @ 0x55f6a2d913c0] setting jitter buffer size to 500 [rtp @ 0x55f6a2dab3c0] No default whitelist set [udp @ 0x55f6a2dbbf40] No default whitelist set [udp @ 0x55f6a2dbbf40] bind failed: Address already in use [rtp @ 0x55f6a2dab140] No default whitelist set [udp @ 0x55f6a2dbc000] No default whitelist set [udp @ 0x55f6a2dbc000] end receive buffer size reported is 131072 [udp @ 0x55f6a2dbbcc0] No default whitelist set [udp @ 0x55f6a2dbbcc0] end receive buffer size reported is 131072 [rtsp @ 0x55f6a2d913c0] setting jitter buffer size to 500 Failed to parse interval end specification '' [h264 @ 0x55f6a2d96300] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x55f6a2d96300] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x55f6a2d96300] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x55f6a2d96300] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x55f6a2d96300] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0x55f6a2d96300] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0x55f6a2d96300] Format yuv420p chosen by get_format(). [h264 @ 0x55f6a2d96300] Reinit context to 560x320, pix_fmt: yuv420p [h264 @ 0x55f6a2d96300] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 Last message repeated 1 times [aac @ 0x55f6a2d97940] skip whole frame, skip left: 0 [h264 @ 0x55f6a2d96300] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 Last message repeated 3 times [rtsp @ 0x55f6a2d913c0] All info found Input #0, rtsp, from 'rtsp://localhost/in/1': Metadata: title : No Name Duration: N/A, start: -0.113000, bitrate: N/A Stream #0:0, 28, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(tv, bt709, progressive, left), 560x320, 0/1, 30 fps, 30 tbr, 90k tbn, 60 tbc Stream #0:1, 40, 1/48000: Audio: aac (LC), 48000 Hz, mono, fltp Successfully opened the file. Parsing a group of options: output url /dev/null. Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy. Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy. Applying option f (force format) with argument null. Successfully parsed a group of options. Opening an output file: /dev/null. Successfully opened the file. Output #0, null, to '/dev/null': Metadata: title : No Name encoder : Lavf58.29.100 Stream #0:0, 0, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(tv, bt709, progressive, left), 560x320 (0x0), 0/1, q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc Stream #0:1, 0, 1/48000: Audio: aac (LC), 48000 Hz, mono, fltp Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) Last message repeated 1 times [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 3000 cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 6000 cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 9000 [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 12000 [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 15000 [null @ 0x55f6a2dcb340] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 18000 ^Ctaurus /home/jlpoole/work/ffmpeg/ticket_6415 # .23 bitrate=N/A speed=1.22x taurus /home/jlpoole/work/ffmpeg/ticket_6415 #
taurus /home/jlpoole/work/ffmpeg/ticket_6415 # cat client.sh # https://trac.ffmpeg.org/ticket/6415 ffmpeg -loglevel debug -rtsp_transport tcp -rtsp_flags listen -i rtsp://localhost/in/1 -acodec copy -vcodec copy -f null /dev/null taurus /home/jlpoole/work/ffmpeg/ticket_6415 # cat server.sh # source from http://techslides.com/demos/samples/sample.mp4 # ffmpeg -re -i source.mp4 -acodec copy -vcodec copy -f rtsp -muxdelay 0.1 rtsp://localhost/in/1 taurus /home/jlpoole/work/ffmpeg/ticket_6415 # ls -la total 392 drwxr-xr-x 2 jlpoole jlpoole 4096 Jun 8 06:52 . drwxr-xr-x 3 jlpoole jlpoole 4096 Jun 8 06:54 .. -rwxr-xr-x 1 jlpoole jlpoole 170 Jun 8 06:52 client.sh -rw-r--r-- 1 jlpoole jlpoole 383631 Feb 16 2014 sample.mp4 -rwxr-xr-x 1 jlpoole jlpoole 159 Jun 8 06:50 server.sh lrwxrwxrwx 1 jlpoole jlpoole 10 Jun 8 06:51 source.mp4 -> sample.mp4 taurus /home/jlpoole/work/ffmpeg/ticket_6415 #
comment:7 by , 4 years ago
Why does this issue interest me?
Answer: because the project Moon-nvr which aggregates surveillance videos currently uses ffmpeg and this problem is giving the developer, Scott Lamb, reason to consider other libraries or even building an rtsp library for Rust which I'll wager he could do if given enough motivation. One of the stumbling blocks to capturing audio streams, as well, is identified in his Issue 36 poor behavior when camera has audio enabled. He has even identified the breaking point in his Comment on Feb 20, 2019 as being in libavformat/rtpdec.c
Replying to Alexander:
Did you confirm that reducing
-probesize
helps?For future tickets: Please remember to test current FFmpeg git head before reporting issues.