Skip to content
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

Fatal: Timestamp jumped #64

Open
christopher-wilke opened this issue Aug 10, 2022 · 4 comments
Open

Fatal: Timestamp jumped #64

christopher-wilke opened this issue Aug 10, 2022 · 4 comments
Labels
interop interoperability problem with another (often broken) RTSP implementation

Comments

@christopher-wilke
Copy link

I am trying to run the mp4 sample: cargo run --package client mp4 --url rtsp://ip.address.goes.here/ --username admin --password test out.mp4

This is the output I get:

PS C:\Users\chriwil\source\repos\retina> cargo run --package client -- mp4 --url rtsp://localhost:8554/mystream out.mp4
    Finished dev [unoptimized + debuginfo] target(s) in 0.61s
     Running `target\debug\client.exe mp4 --url rtsp://localhost:8554/mystream out.mp4`
I20220810 14:36:31.369 main client::mp4] Using h264 video stream
I20220810 14:36:31.371 main client::mp4] Using mpeg4-generic audio stream (rfc 6381 codec mp4a.40.2)
1628175071 (mod-2^32: 1628175071), npt 0.140: 670-byte video frame
I20220810 14:36:31.537 main client::mp4] new video params: VideoParameters { rfc6381_codec: "avc1.4D401F", pixel_dimensions: (1280, 720), pixel_aspect_ratio: Some((1, 1)), frame_rate: Some((2, 50)), extra_data: Length: 43 (0x2b) bytes
0000:   01 4d 40 1f  ff e1 00 1c  67 4d 40 1f  e8 80 28 02   [email protected]@...(.
0010:   dd 80 b5 01  01 01 40 00  00 03 00 40  00 00 0c 83   ......@....@....
0020:   c6 0c 44 80  01 00 04 68  eb ef 20                   ..D....h..  }
E20220810 14:36:31.543 main client] Fatal: Timestamp jumped -2692 (-0.061 sec) from 2705800284 to 2705797592 (mod-2^32: 2705797592), npt -0.061; policy is to allow 0..10 sec only

conn: [::1]:52007(me)->[::1]:8554@2022-08-10T14:36:31
stream: TCP, interleaved channel ids 2-3
ssrc: 57185d5e
seq: 0000f0e9
pkt: 1762@2022-08-10T14:36:31
error: process didn't exit successfully: `target\debug\client.exe mp4 --url rtsp://localhost:8554/mystream out.mp4` (exit code: 1)
@scottlamb
Copy link
Owner

Sounds frustrating. A few questions:

  • Does this happen immediately every time you run the example?
  • What RTSP server are you using (for a camera, make/model/version)?
  • Does adding --initial-timestamp=permissive to the command help?
  • Are you able to / interested in getting a packet capture with e.g. Wireshark? If you don't want to share it publicly with your camera's IP/MAC/etc, I'm happy to look at it privately instead. I'm wondering if e.g. the RTSP PLAY response has a RTP-Info header with a rtptime parameter and how that compares to the RTP timestamps in the actual data stream. (I can also add some logging around this...)

@christopher-wilke
Copy link
Author

Thx for your quick feedback.

Sounds frustrating. A few questions:

  • Does adding --initial-timestamp=permissive to the command help?
    I will test this parameter by next week 👍
  • Are you able to / interested in getting a packet capture with e.g. Wireshark? If you don't want to share it publicly with your camera's IP/MAC/etc, I'm happy to look at it privately instead. I'm wondering if e.g. the RTSP PLAY response has a RTP-Info header with a rtptime parameter and how that compares to the RTP timestamps in the actual data stream. (I can also add some logging around this...)
    I will provide you some Wireshark data as soon as possible 👍

@christopher-wilke
Copy link
Author

Here are some updates:

Does adding --initial-timestamp=permissive to the command help?
The parameter --initial-timestamp=permissive did not fix the issue

I will try to provide a Wireshark protocol later

@scottlamb
Copy link
Owner

Any update? I'm curious to see the Wireshark capture.

Do you know if your camera uses B-frames? This is likely the same thing as #61 if so.

@scottlamb scottlamb added the interop interoperability problem with another (often broken) RTSP implementation label Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop interoperability problem with another (often broken) RTSP implementation
Projects
None yet
Development

No branches or pull requests

2 participants