Hi,

Stas Oskin wrote:
> Hi.
> 
>> Note that here you are sending PPS and SPS "in band" (try adding "-vglobal 1"
>>  if you want "out of band" SPS and PPS. You should see a new
>>  "sprop-parameter-sets=..." entry in the SDP.
> 
> 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"?
Are you using the same exact libx264 parameters in your application and
in the ffmpeg example?

> 
> 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.


>> This generally happens when you send a stream that does not contain any PPS 
>> and
>>  SPS (so, you are supposed to send them "out of band" in an SDP entry), but 
>> the
>>  SDP does not contain a proper "sprop-parameter-sets=..." entry.
> 
>>  Any chance you are setting the CODEC_FLAG_GLOBAL_HEADER in the 
>> AVCodecContext,
>>  but you are using the same SDP used in the previous case (whe PPS and SPS 
>> were
>>  in band)? (In this case, you just need to re-generate the SDP by calling
>>  avf_sdp_create() in your code).
> 
> You are right - I used this flag (as it was mentioned in the OutputExample).

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).


> 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.


> As I explained, I took a working example which writes to disk, and
> basically redirected it to RTP. Now, only this gray noise + error
> messages remain - any idea what is wrong?

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).


                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to