Coder Social home page Coder Social logo

Comments (10)

jrsnen avatar jrsnen commented on June 25, 2024

So the SPS is delivered, but the PPS is not.

The most interesting pieces of code are here and here. My first guess is that the PPS is somehow interpreted as the wrong type of NAL unit due to some bug in determining the NAL type.

from uvgrtp.

Consti10 avatar Consti10 commented on June 25, 2024

I guess I just gotta do these tests again with DCMAKE_BUILD_TYPE=Debug and see if I get something in the log ?

from uvgrtp.

Consti10 avatar Consti10 commented on June 25, 2024

not sure if the issue is the fact there is an SPS / PPS inside, could also be 2 successive non-aggregate packets containing anything. But I noticed the issue with the PPS only so far.

Btw, I don't think it'l help but this is the dirty rtp parser we wanna replace - both single and aggregate packets are quite easy to do.

from uvgrtp.

jrsnen avatar jrsnen commented on June 25, 2024

@Consti10 Did you say you were using uvgRTP also for sending? I added support for NAL units with size 8 to start code lookup. Sizes smaller than 8 are not yet supported, but would probably be trivial to add.

I was unable to find any issues with specific NAL types in H264.

Does d7f0af7 fix your issue?

from uvgrtp.

jrsnen avatar jrsnen commented on June 25, 2024

Now also sizes smaller than 8 should work in 5ca3c13.

from uvgrtp.

Consti10 avatar Consti10 commented on June 25, 2024

@Consti10 Did you say you were using uvgRTP also for sending? I added support for NAL units with size 8 to start code lookup. Sizes smaller than 8 are not yet supported, but would probably be trivial to add.

I was unable to find any issues with specific NAL types in H264.

Does d7f0af7 fix your issue?

That sounds like it might be the solution - the PPS NALUs were of size 9 (I think that was without a long NALU start code, so could be called size 8 as well).

I'l check it out.
Yes, I was using uvgRTP for sending, too (at first) but then switched to gstreamer as tx to eliminate tx as possible error cause.
I'l try again, will take some time to setup though.

from uvgrtp.

Consti10 avatar Consti10 commented on June 25, 2024

Hm, this seems to have made it worse, I am now only getting packets of size 6. I've changed 2 lines in examples/receiving_hoock.cc:

//std::cout << "Received RTP frame" << std::endl;
std::cout<<"Received RTP frame payload:"<<frame->payload_len<<" padding:"<<frame->padding_len<<"\n";

and changed udp input port to 5600

with the following gstreamer pipeline as tx:

gst-launch-1.0 videotestsrc ! video/x-raw, format=I420,width=640,height=480,framerate=30/1 ! x264enc name=swencoder bitrate=5000 speed-preset=ultrafast tune=zerolatency key-int-max=15 sliced-threads=0 ! queue ! h264parse config-interval=-1 ! rtph264pay mtu=1024 ! udpsink host=127.0.0.1 port=5600

I am exclusively getting:
Received RTP frame payload:6 padding:0
and a lot of messages in the form of:
[uvgRTP][DEBUG][::packet_handler] Received an RTP packet belonging to a completed frame! Timestamp: 553220523, seq: 40818

which cannot be correct (e.g. the above pipeline definitely creates NALUs bigger than 6 bytes)

from uvgrtp.

jrsnen avatar jrsnen commented on June 25, 2024

The previous fixes were only for the sending side.

Based on that debug print, I think I know what is going on in the receiving side: There is a discarding of duplicated packets in uvgRTP based on timestamps, but I would guess GStreamer puts all those different NAL units in non-aggregate packets with same timestamps, leading uvgRTP to discard the later NAL units as it thinks they have been duplicated.

Does c07a8c2 fix receiving video from GStreamer?

I also created a new issue for duplicate discarding, but this is not a high priority: #179

from uvgrtp.

Consti10 avatar Consti10 commented on June 25, 2024

Yeah, that makes sense. Just tested gstreamer sending and uvgRTP receive (h264), and the issue(s) seem to be gone.
I think we can close this issue, thanks for the help !

from uvgrtp.

jrsnen avatar jrsnen commented on June 25, 2024

@Consti10 Great! Thanks for bringing up this issue! I've been trying to fix all issues related to basic RTP/SRTP streaming for some time now.

BR, Joni

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.