<div dir="ltr"><div>Thank you Ross! I did indeed need to set includeStartCodeInOutput to false.</div><div><br></div><div>Otherwise, I was having a different problem, the video was getting through but looked like a jumbled mess, so I decided to double check that I was reading the frame correctly using using ffmpeg's av_write_frame.. turns out ffmpeg's av_write_frame modifies the AVPacket received from av_read_frame before actually writing it to a file by adding some header info to every AVPacket.
</div><div><br></div><div>Long term I'll have to go through ffmpeg's code and figure out what they are doing and similarly add a header to the AVPacket since it doesn't make sense to have it creating a seperate file for every stream. But it works. Among other things, av_write_frame added a startcode to every AVPacket which I then needed to trim off but added other info too. Hope that tidbit helps out someone else who tries to combine the two.</div><div><br></div><div><br></div><div>It's now streaming to VLC,
I'm still having a bug though .I think it's a PTS issue?</div><div><br></div><div>I'm getting many of both of these errors in VLC error log:<br>picture is too late to be displayed (missing 25 ms)<br></div><div>More than 11 late frames, dropping frame </div><div><br></div><div>I have a key frame every 10 or 11 frames, so I'm thinking that's related to dropping frames every 11 frames.<br></div><div><br></div><div>I tried setting fPresentationTime.tv_sec (and setting tv_usec too) to now as well as one second in the future so that it would have time to catch up, no difference. I tried sleeping for 15 milliseconds between frames thinking I was overwhelming VLC, so I'd force it to slow down. Still having this issue. The entire video gets to openRTSP. and it works with no problems.</div><div><br></div><div>Any thoughts on making sure I have the right PTS per frame as I send it to a client like VLC?</div><div><br></div><div>Thanks,<br>Matt</div></div>