[Live-devel] FFMPEG VP8/VP9 Encoding to Live555

Ross Finlayson finlayson at live555.com
Wed Apr 4 08:43:25 PDT 2018


> I’d like to encode a live video stream using FFMPEG API’s using the VP8 and VP9 codecs and make the stream available using Live555 as RTSP.

Yes, VP8 encoding (using FFMPEG/libvpx) and streaming (using our “VP8VideoRTPSink”) works fine.  (In fact, I do this in our WebRTC demo (still offline, unfortunately) to transcode incoming H.264, MPEG-4, or JPEG RTSP/RTP streams into outgoing VP8 RTP streams.)  I haven’t yet tested encoding/streaming VP9, but I have no reason to believe that it won’t work.


> 1.       Do I need to parse the output (similar to the H264 NAL parsing) of the VP8/VP9 AVPacket?
> 2.       Do I need some type of discrete framer for VP8/VP9?
No, as long as your VP8 or VP9 encoder gives you
	a) complete, discrete frames (i.e., one frame at a time; not partial frames or multiple frames at a time), and
	b) an accurate ‘presentation time’ (i.e., setting “fPresentationTime”).
Bot are true for me for VP8 encoded using “libvpx” (I have’t yet tried VP9).  For each frame, I just set “fPresentationTime” using “gettimeofday(), and set “fDurationInMicroseconds” to 1000000/<frames-per-second>.  (Actually, because I’m encoding from a live source, rather than from pre-recorded data, I could have just left “fDurationInMicroseconds” at its default value of 0.)

> 3.       Is libvpx just too slow for 30fps real-time encoding? (Probably should have asked this first…)

This obviously depends on your computer.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list