retina
retina copied to clipboard
Fatal: Timestamp jumped
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)
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=permissiveto 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
PLAYresponse has aRTP-Infoheader with artptimeparameter and how that compares to the RTP timestamps in the actual data stream. (I can also add some logging around this...)
Thx for your quick feedback.
Sounds frustrating. A few questions:
- Does this happen immediately every time you run the example? Yes
- What RTSP server are you using (for a camera, make/model/version)? I am using https://github.com/aler9/rtsp-simple-server
- Does adding
--initial-timestamp=permissiveto 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
PLAYresponse has aRTP-Infoheader with artptimeparameter 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 :+1:
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
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.