after finished publish this video, play the livestream.*.mp4 located in trunk/objs/nginx/html/live.
the video playback is 2x slower than the original file.
Cause
The Mp4 frame rate is determined by mp4 box: mdhd and stts. But the stts encoding in srs has bugs. The above output.flv video file has a lot of SEI type of nalu, which is not video samples, SRS can't calculate the stts correctly.
How to calculate stts?
check doc ISO/IEC 14496-12:2012(E) 8.6.1.2 Decoding Time to Sample Box.
How to reproduce?
./objs/srs -c conf/dvr.mp4.conf
ffmpeg -re -i output.flv -c copy -f flv rtmp://localhost/live/livestream
theoutput.flv
is recorded from a DJI drone, download from this google drive link: https://drive.google.com/file/d/1IVoDXI-WYoIlKiyzs65fCsDRRt0z-EuU/view?usp=sharinglivestream.*.mp4
located intrunk/objs/nginx/html/live
.Cause
The Mp4 frame rate is determined by mp4 box:
mdhd
andstts
. But thestts
encoding in srs has bugs. The aboveoutput.flv
video file has a lot ofSEI
type of nalu, which is not video samples, SRS can't calculate thestts
correctly.How to calculate
stts
?check doc ISO/IEC 14496-12:2012(E) 8.6.1.2 Decoding Time to Sample Box.
https://ossrs.net/lts/zh-cn/assets/files/ISO_IEC_14496-12-base-format-2012-b70dd5f101daecd072700609842c9649.pdf
video source generated by OBS with ultrafast + zerolatency
https://drive.google.com/file/d/1rXipV93EWmtZ-rPShwE66f5aO85ugiIc/view?usp=sharing Use this source, with video frames split to multi slices, to verify the dvr recorded mp4.