Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F ffmpeg-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 402
    • Issues 402
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Karl Kroening
  • ffmpeg-python
  • Issues
  • #755
Closed
Open
Issue created Mar 14, 2023 by Baby Feng@Baby-Feng

Realize low-latency transmission of rtsp video stream, and ' Application provided invalid, non monotonically increasing dts to muxer in stream 0' problem

Hello, I want to achieve low-latency transmission of rtsp video streams through ffmpeg-python, here is my code: ` process1 = ( ffmpeg .input('rtsp://localhost/test',format='rtsp') .output('pipe:', vcodec='copy') .run_async(pipe_stdout=True) )

process2 = ( ffmpeg .input('pipe:', format='rawvideo', s='{}x{}'.format(width, height)) .output('rtsp://localhost/test', format='rtsp', vcodec='copy') .overwrite_output() .run_async(pipe_stdin=True) )

while True: in_bytes = process1.stdout.read(width * height * 3) if not in_bytes: break in_frame = ( np.frombuffer(in_bytes, np.uint8) # numpy.ndarry .reshape([height, width, 3]) ) out_frame = in_frame * 0.3 process2.stdin.write(out_frame.astype(np.uint8).tobytes())

process2.stdin.close() process1.wait() process2.wait() ` One problem is that I set vcodec='copy' in process1 at the receiving end (local rtsp server) of the video stream, and the streaming delay drops significantly (<0.5s), but there will be 'Application provided invalid, non monotonically increasing dts to muxer in stream 0' (error or warning?), But the program can still continue to execute. How should I modify the code and parameters, or is there a better solution? Thanks!

Assignee
Assign to
Time tracking