Skip to content

When I define and set pts and dts myself, the value of tbr will become 100 #1347

Description

@ncheng89

When I set the pts and dts myself, the btr will become 100 uncontrollably. When I don't modify the pts and dts, the value of the btr is consistent with the fps.

When I modify pts and dts

Duration: N/A, start: 0.000000, bitrate: 3200 kb/s
Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, 128 kb/s
Stream #0:2: Video: h264 (High), yuv420p(progressive), 1920x1080, 3072 kb/s, 25 fps, 100 tbr, 1k tbn, 50 tbc

When I don't modify pts and dts

Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, 128 kb/s
Stream #0:2: Video: h264 (High), yuv420p(progressive), 1920x1080, 3072 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc

I also set time_base:

self.archive_video_stream = self.out_archive.add_stream('h264', rate=25, options={"tbr":"25"})
self.archive_audio_stream = self.out_archive.add_stream('aac', rate=audio_rate)

self.archive_video_stream.height = self.videoHeight
self.archive_video_stream.width = self.videoWidth

self.archive_video_stream.time_base = fractions.Fraction(1, 25)
print(self.archive_video_stream.time_base)
self.archive_video_stream.framerate =  fractions.Fraction(25, 1)
self.archive_audio_stream.time_base = fractions.Fraction(1, audio_rate)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions