Best way to fix video encoder issues with 0/1 framerate

Thomas Greenwood tcdgreenwood at hotmail.com
Mon Mar 4 06:27:15 PST 2013


I have been attempting to fix issues with the vp8enc and x264enc when the framerate is set to "0/1" (which happens if you've decoded an RTP video stream and want to re-encode it).  vp8enc complains of an invalid parameter and x264enc has a divide by zero error.  Once I have a fix I'll raise relevant bugs and hope to attach some patches, but for now wanted some advice on how to patch it.
I have found 3 possible approaches:1. Add framerate in the depayloaders - this was my first approach but I find the SDP I'm using doesn't normally have a framerate attribute so I'm not sure how this would work2. Use parsers to calculate the current framerate - there is no available parser for vp8, I don't know if this is possible yet and I think may be beyond the timescales I have.3. Make the codecs work when framerate is "0/1" - I have done this successfully for x264enc using VFR and think I can do this with VP8 (though I may require setting the timebase which I can calculate from the clock rate).
I currently favour 3 and I'm not sure that I can really do the others, plus it makes this easier and more robust for others without introducing extra elements into the pipeline.  Also I have made the patch to x264enc work, so just need to do the equivalent on vp8enc.
BTW I think if I fix this it will actually solve the issue reported by "Tony Devtalk" -  http://lists.freedesktop.org/archives/gstreamer-devel/2013-January/039137.html as it seems he is trying to do the same things but I'd have to test this to be sure.
If anyone can help or suggest an alternative approach it would be much appreciated.








Thanks 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130304/a0ba49f7/attachment.html>


More information about the gstreamer-devel mailing list