Coder Social home page Coder Social logo

Comments (7)

jrsnen avatar jrsnen commented on September 26, 2024

Hello and thank you for interest in uvgRTP.

What you are describing is to my knowledge the default way uvgRTP works, giving all possible frames that did not lose fragmentation units to the user. The fragments belonging to frames that were not completed are deleted with garbage collection. There are plans for discarding frames lacking reference frames, but those have not been implemented yet and will be done via additional flags.

As for the latency, there is no way to get information for the reception of the first fragment, but when all the fragments are received, the installed hook in media_stream is called immediately so this can be used to measure last fragment timing.

I added a few lines of documention for packet loss.

Hope this clarifies issues,
Joni

from uvgrtp.

Consti10 avatar Consti10 commented on September 26, 2024

Thanks, this sound really good.
I'l test it out and report back.

from uvgrtp.

Consti10 avatar Consti10 commented on September 26, 2024

Are RTP H264 type 24 (aggregated NALUs) supported ? Aka multiple NALUs (e.g. SPS and PPS) in one rtp packet.

from uvgrtp.

Consti10 avatar Consti10 commented on September 26, 2024

Hm, I am having some weird issue, for some reason uvgRtp seems to always drop the PPS data in our case.
TX: Simple streamer based on libcamera + uvgrtp
RX: QOpenHD application with custom decode.

To analyze, I have some logs - with our current custom / crap rtp decoder (which is what I want to replace with uvgRtp) decode works, and I am getting:

...
Got RTP H264 type [1..23] (single) payload size: 35
Got NALU 39
SPS found
Got RTP H264 type [1..23] (single) payload size: 5
Got NALU 9
PPS found
...

Aka a SPS (size 39) then a PPS (size 9), and ... are key / non-key frames

but with uvgRtp I am getting:
...
Got NALU 38
SPS found
...

I figured out uvgRtp does not always prefix with 0001 - this is why the SPS shows up size 39 with previous, size 38 with uvgRTP.
(And is not an issue)

But for some reason I am never getting the PPS from uvgRTP (or rather any frame sized 9 / 9-1=8 )

Any ideas what's ging on there ?

from uvgrtp.

Consti10 avatar Consti10 commented on September 26, 2024

Debugging a bit more, found out that I get the SPS and PPS when I use a gstreamer tx pipeline AND set
aggregate-mode=1

Aka aggregation seems to be suported in uvgRTP (regarding my earlier question) but for some reason non-aggregated SPS and PPS r.n don't work

from uvgrtp.

Consti10 avatar Consti10 commented on September 26, 2024

Yeah, so for some reason I am not getting 2 successive RTP H264 type [1..23] (single) "frames" (if you count sps / pps as a frame) from uvgRTP as an rx. If I embed the SPS & PPS into an aggregation unit (e.g. using a gstreamer tx pipeline) I don't have this issue.

from uvgrtp.

jrsnen avatar jrsnen commented on September 26, 2024

Are RTP H264 type 24 (aggregated NALUs) supported ? Aka multiple NALUs (e.g. SPS and PPS) in one rtp packet.

Unfortunately, no, H264 neither STAP nor MTAP aggregate NALUs have not yet been implemented. There is a chance that the STAP reception works by coincidence due to similarity with H265. I added an issue (#176) for STAP support.

The H264 format in general is the least tested inside our group, since we focus more on H265 and H266 formats.

Hm, I am having some weird issue, for some reason uvgRtp seems to always drop the PPS data in our case. TX: Simple streamer based on libcamera + uvgrtp RX: QOpenHD application with custom decode.

To analyze, I have some logs - with our current custom / crap rtp decoder (which is what I want to replace with uvgRtp) decode works, and I am getting:

... Got RTP H264 type [1..23] (single) payload size: 35 Got NALU 39 SPS found Got RTP H264 type [1..23] (single) payload size: 5 Got NALU 9 PPS found ...

Aka a SPS (size 39) then a PPS (size 9), and ... are key / non-key frames

but with uvgRtp I am getting: ... Got NALU 38 SPS found ...

I figured out uvgRtp does not always prefix with 0001 - this is why the SPS shows up size 39 with previous, size 38 with uvgRTP. (And is not an issue)

But for some reason I am never getting the PPS from uvgRTP (or rather any frame sized 9 / 9-1=8 )

Any ideas what's ging on there ?

Firstly, thank you for bringing this to our attention.

H264 uses three byte start code (001) whereas H265/H266 use four byte (0001), at least that is how I understood it and that might explain the one byte difference.

Debugging a bit more, found out that I get the SPS and PPS when I use a gstreamer tx pipeline AND set aggregate-mode=1

Aka aggregation seems to be suported in uvgRTP (regarding my earlier question) but for some reason non-aggregated SPS and PPS r.n don't work

It is possible that aggregate packet reception works, since the packet structure is essentially the same in h264 STAP as it is h265/h266 aggregate packet (code here).

Yeah, so for some reason I am not getting 2 successive RTP H264 type [1..23] (single) "frames" (if you count sps / pps as a frame) from uvgRTP as an rx. If I embed the SPS & PPS into an aggregation unit (e.g. using a gstreamer tx pipeline) I don't have this issue.

I opened #177 for this bug, we can continue this discussion there.

from uvgrtp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.