Hi. > > > > Yes, I believe so (using default params for everything, with the > > exception of +loop for better quality). > > > Maybe that's the difference which is creating the problem...
Just tried with the loop parameter - both in and out band work normally. > [...] > > Then, we have a problem. I do not know if it is due to a bug in libavformat, > to some wrong parameter passed to avf_sdp_create() (can you double-check you > are passing the correct parameters?), or to some other issue... Maybe this > is not the cause of the other problems you are encountering, but it should > be investigated. I simply took the example in ffmpeg.c (function print_sdp() ), and copied it to my code. This half-done SDP is what it producing. > > so I'm using the SDP pre-made by command line. Could it be the reason? > I suspect it might be. Both the command line generated file, and the avf_create_sdp results beginning in same way. Any reason for them to be different (if the parameters are the same)? > > The SPS/PPS are sent immediately on the first frame, so there should > > be virtually no delay? > If the player is started after the beginning of the stream, it does not > receive the first packets, so it is not guaranteed to immediately receive > SPS and PPS (as a result, you can see some "waiting for SPS/PPS..." > messages after starting the player). Is the in-band SPS/PPS sent on every frame, or only every several frames? > No; you just need to wait for the correct time before calling > av_write_frame(). So, you need to add something like a usleep() or > similar... The correct time for sending a frame can be computed > based on the DTS of the frame. An easy way to compute this time could > be: > <time when the first frame has been sent> + av_rescale_q(pkt.dts, > st->time_base, AV_TIME_BASE_Q); By this formula you mean (just to understand the approach): 1) Store the time of the first frame 2) Calculate the time of the next frame via first frame time + result of av_rescale_q 3) Sleep until the next frame time arrives and then send the next frame? Thanks for your help, as always. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
