Hi.

>  > I tried to use the out-band SDP generated with the -vglobal 1 flag
>  > together with my app, and now VLC managed to display a video window,
>  > but it's filled with gray noise and many errors (which never appeared
>  > for the command line):
>
>
> Uhm... This is strange. Does the ffmpeg command work correctly when you add
>  "-vglobal 1"?

Yes, it works fine. By the way, it works without the flag too - is it
because VLC ignores out-band if in-band is present?

>  Are you using the same exact libx264 parameters in your application and
>  in the ffmpeg example?

Yes, I believe so (using default params for everything, with the
exception of +loop for better quality).

>  >
>  > ffmpeg debug: concealing 681 DC, 681 AC, 681 MV errors
>  >  ([EMAIL PROTECTED])
>  > ffmpeg warning: cbp too large (61) at 22 2
>  >  ([EMAIL PROTECTED])
>  > ffmpeg warning: error while decoding MB 22 2
>  >  ([EMAIL PROTECTED])
>  > ffmpeg debug: concealing 657 DC, 657 AC, 657 MV errors
>  >  ([EMAIL PROTECTED])
>
> [...]
>
>  This might happen when the SPS and PPS described in the SDP do not match
>  the stream you are sending... Try to generate the SDP in your application
>  by calling avf_sdp_create(), just to be sure that there is no mismatch.

Problem is, avf_sdp_create() generates only the first several lines of the SDP:

v=0
o=- 0 0 IN IPV4 127.0.0.1
t=0 0
s=B
a=tool:libavformat 52.18.0

so I'm using the SDP pre-made by command line. Could it be the reason?

>  >>  Any chance you are setting the CODEC_FLAG_GLOBAL_HEADER in the 
> AVCodecContext,

> Well, output_example.c sets this flag if the output format is mp4, mov, or
>  3gp, because those formats need the extradata field to be filled. When you
>  stream RTP you can choose if you want to set this flag or not (depending on
>  your need for in-band or out-of-band config info).

Just to clarify - this flags fills extradata on disk formats (like
mp4), and specifies out-band on streaming formats (RTP), correct?


>  > What are the benefits of using out-band, compared to in-band - does it
>  > means less bandwidth required?
>
> AFAIK, out-of-band global headers allow the player to start to play the
>  stream first (without needing to wait for SPS and PPS); in-band SPS and PPS
>  allow the encoder to dynamically change some stream properties.

The SPS/PPS are sent immediately on the first frame, so there should
be virtually no delay?

> My only guess is that the global headers described in the SDP do not
>  completely match the stream (as said above); I have no other ideas...
>  Of course, remember that when streaming you have to output frames at
>  the correct rate (and not as fast as possible, like in output_example.c).

This could be the reason to another issue that I have - where the
player (VLC or QT) gradually increases it's own buffer, until the
delay significantly grows. Restarting the player temporarily helps it,
until the delay grows again.

Can you please explain what you meant by correct rate - is it setting
the fps structure (time/den) to correct FPS?

Thanks for your help and time.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to