[Live-devel] [live555] Stream FFMPEG packets using subclassed OnDemandServerMediaSubsession
Matthew Czarnek
mczarnek at edge360.com
Wed Feb 26 14:22:53 PST 2020
Thank you Ross! I did indeed need to set includeStartCodeInOutput to false.
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.
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.
It's now streaming to VLC, I'm still having a bug though .I think it's a
PTS issue?
I'm getting many of both of these errors in VLC error log:
picture is too late to be displayed (missing 25 ms)
More than 11 late frames, dropping frame
I have a key frame every 10 or 11 frames, so I'm thinking that's related to
dropping frames every 11 frames.
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.
Any thoughts on making sure I have the right PTS per frame as I send it to
a client like VLC?
Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20200226/b57549e4/attachment.htm>
More information about the live-devel
mailing list