Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to reproduce?
./objs/srs -c conf/dvr.mp4.conf
ffmpeg -re -i output.flv -c copy -f flv rtmp://localhost/live/livestream
the
output.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