- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using the "simple_6_transcode_opaque - async - ffmpeg" example and would like to fix the PTS / DTS calculations.
The PTS is accessible by pMfxBitstream->TimeStamp which is correct.
Acording to the Source code and the Documentation Media SDK 1.6 introduced automatic computation of DTS which is accessible by
pMfxBitstream->DecodeTimeStamp
However I am getting only garbage for DTS. Here is an example when I try to encode a video:
PTS V: 0, DTS: -7200
PTS V: 4, DTS: -17996
PTS V: 2, DTS: -7198
PTS V: 1, DTS: 1
PTS V: 3, DTS: -3597
PTS V: 7, DTS: -14393
PTS V: 5, DTS: -3595
PTS V: 6, DTS: -3594
PTS V: 11, DTS: -17989
PTS V: 9, DTS: -7191
PTS V: 8, DTS: 8
PTS V: 10, DTS: -3590
PTS V: 15, DTS: -17985
PTS V: 13, DTS: -7187
PTS V: 12, DTS: 12
PTS V: 14, DTS: -3586
Any ideas what is wrong that the DTS is incorrect?
Thanks, Artem
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Input and output pts/dts are measured in 1/90000 sec units. Do you set/interpret them correctly?
-7200 is most likely a -80ms (-2 frames at 25p/50i fps)...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
thanks for the reply, but this does not make any sense for me. If -7200 is -80ms for the first frame then why has Frame 4 a DTS of 1 and Frame 11 a DTS of 8?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you pass incorrect input pts then you shouldn't expect any correct output pts/dts.
I think output dts 1, 8, 12 are for frames with pts==dts (most likely, B-frames) and are simply copied from input pts.
Other dts values are very similar to be in 1/90kHz units: -17996-4 = -200ms, etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
many thanks. The input PTS was bad / the example source code had badly implemented it. After fixing the input PTS I got a correct output DTS now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good luck!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page