Hi,
Stas Oskin wrote:
> I got H.264 RTP streaming working via ffmpeg command line, in following
> fashion:
> ffmpeg -i ace.mp4 -vcodec libx264 -f rtp rtp://192.168.253.32:5000
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.
> But when I try to do the same via code, I get no video (packets are
> being receiving though).
> VideoLan constantly shows the following debug message: "waiting for SPS/PPS."
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).
Or maybe the extradata are malformed (it happens when reading the H.264 video
from an mp4 or mov file. Maybe this can be fixed by using a proper bitstream
filter).
Can you have a look at the SDP, and check the sprop-parameter-sets attribute?
Also, how are you encoding the h264 video?
Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user