Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-ugly gst-plugins-ugly
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-uglygst-plugins-ugly
  • Issues
  • #38
Closed
Open
Issue created Apr 13, 2021 by Sebastian Dröge@slomo🍵Owner

x264enc: Segment changes can cause invalid DTS to be generated

See below log of mp4mux. in is the PTS/DTS from x264enc, out is the corresponding running time with the currently configured segment.

in: pts 1000:00:01.666666667 dts 1000:00:01.600000000 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:01.141107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.666666667 dts 0:00:01.600000000 dur 0:00:00.033333333
in: pts 1000:00:01.633333333 dts 1000:00:01.633333333 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:01.141107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.633333333 dts 0:00:01.633333333 dur 0:00:00.033333333
in: pts 1000:00:01.700000000 dts 1000:00:01.666666667 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:01.141107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.700000000 dts 0:00:01.666666667 dur 0:00:00.033333333

[new segment -- shifted by about 3s]

in: pts 1000:00:03.733333333 dts 1000:00:01.700000000 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:03.041107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.833333333 dts 99:99:99.999999999 dur 0:00:00.033333333
in: pts 1000:00:03.833333333 dts 1000:00:01.800000000 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:03.041107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.933333333 dts 99:99:99.999999999 dur 0:00:00.033333333

[DTS has caught up]

in: pts 1000:00:03.766666667 dts 1000:00:03.733333333 dur 0:00:00.033333333
segment: time segment start=999:59:58.858892452, offset=0:00:03.041107548, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 999:59:58.858892452, duration 99:99:99.999999999
out: pts 0:00:01.866666667 dts 0:00:01.833333333 dur 0:00:00.033333333

Maybe the correct behaviour of x264enc would be to always drain on segment changes to avoid this?

Assignee
Assign to
Time tracking