-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ivf timestamps #2987
Fix ivf timestamps #2987
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2987 +/- ##
==========================================
+ Coverage 77.84% 79.38% +1.54%
==========================================
Files 89 78 -11
Lines 10524 9649 -875
==========================================
- Hits 8192 7660 -532
+ Misses 1842 1541 -301
+ Partials 490 448 -42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -5,7 +5,6 @@ package ivfwriter | |||
|
|||
import ( | |||
"bytes" | |||
"encoding/binary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this test just undo https://github.com/pion/webrtc/pull/2853/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just need to fix the lint and we're good to go |
The problem lies in the two |
I do :) |
Done! |
Description
IVFwriter produces incorrect timestamps leading to unplayable video with the changes introduced in #2853.
The confusion lies in the different timestamps.
The RTP timestamp refects the sampling clock for the media stream. This timestamp increments based on the sampling rate.
The PTS of a media stream represents the presentation time in the time base units.
Example
v3 first captured packets from examples/save-to-disk (
ffprobe -select_streams v -show_packets -show_entries packet=pts,pts_time,dts,dts_time,duration,duration_time,size,pos -of default output.ivf
)v4 first captured packets from examples/save-to-disk (prior to this PR)
v4 first captured packets with this PR