Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
I build my own rtsp server and follow the steps, and actually success to stream in the first 10 secs.
But these Non-monotonous DTS...(like the log below) happens, and my stream stop.
Do you have any ideas what cause the issue happen?
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200726
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, rtsp, from 'rtsp://192.168.5.108:554/Room_01/':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 38630.301656, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p(tv, unknown/bt470bg/unknown, progressive), 640x480, 90k tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: aac (LC), 32000 Hz, stereo, fltp
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (native))
Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'pipe:':
Metadata:
title : Unnamed
comment : N/A
encoder : Lavf58.45.100
Stream #0:0: Video: mpeg1video, yuv420p(progressive), 640x480, q=2-31, 200 kb/s, 60 fps, 90k tbn, 60 tbc
Metadata:
encoder : Lavc58.91.100 mpeg1video
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: mp2, 32000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc58.91.100 mp2
name: New WebSocket Connection (1 total)B time=03:55:38.76 bitrate= 0.3kbits/s dup=0 drop=2 speed=6.92e+03x
[mpegts @ 000001c45ae07840] Non-monotonous DTS in output stream 0:1; previous: 14342068249, current: 9505014736; changing to 14342068250. This may result
in incorrect timestamps in the output file.
[mpegts @ 000001c45ae07840] Non-monotonous DTS in output stream 0:1; previous: 14342068250, current: 9505018941; changing to 14342068251. This may result
in incorrect timestamps in the output file.
[mpegts @ 000001c45ae07840] Non-monotonous DTS in output stream 0:1; previous: 14342068251, current: 9505020864; changing to 14342068252. This may result
in incorrect timestamps in the output file.
[mpegts @ 000001c45ae07840] Non-monotonous DTS in output stream 0:1; previous: 14342068252, current: 9505024816; changing to 14342068253. This may result
in incorrect timestamps in the output file.
[mpegts @ 000001c45ae07840] Non-monotonous DTS in output stream 0:1; previous: 14342068253, current: 9505028807; changing to 14342068254. This may result
in incorrect timestamps in the output file.
...
I build my own rtsp server and follow the steps, and actually success to stream in the first 10 secs. But these Non-monotonous DTS...(like the log below) happens, and my stream stop. Do you have any ideas what cause the issue happen?