GNOME Bugzilla – Bug 617506
[videoscale] Add support for adding black borders if necessary to keep the DAR
Last modified: 2010-07-18 13:46:13 UTC
Currently there is no *automatic* way to resize a video while adding black borders. That is: * keep DAR (see bug #371108 regarding videoscale) * maximize usage of downstream caps by adding black borders One can of course do this manually (by setting the values on videobox), but requires outside intervention to parse upstream/downstream caps and decide what values to set. Ideally we shouldn't need videobox for this use case, but instead have a 'add-black-borders' mode on videoscale which respects the two points at the top of this comment. To demonstrate what's needed, you should be able to use the following pipeline and when you resize the output window, the video should be scaled as much as possible, and have black borders added if/where neeeded : videotestsrc ! video/x-raw-yuv,width=320,height=240 ! videoscale add-black-borders=True ! ximagesink
You need a way to select the color IMHO, maybe you want white instead of black or some other color. Other than that this is definitely a useful feature... and we really need to fix DAR handling in videoscale ;)
Selecting the color would definitely be a bonus... and for alpha formats leave it transparent also.
I'll work on this.
commit 52e711b11d5aaca5e52390259b9c76fa7b816932 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sat Jul 17 20:24:18 2010 +0200 videoscale: Add support for adding black borders to keep the DAR if necessar Fixes bug #617506.