Administrator
|
Hi everyone,
I would like to know what is the key difference between these two plugins. Which one gives better results? And also, videoscale too maintains aspect ratio during resizing if you set add-borders to TRUE. I dont quite understand the use of videobox in that case ~BO |
Administrator
|
I would want to scale an image with letter box for maintaining display aspect ratio. I tried to upscale a 352x288 image to 640x360 by running the below mentioned command. I'm not satisfied with the result. Input is http://i49.tinypic.com/os51r6.png but the result is http://i47.tinypic.com/25ksm6s.png
gst-launch-1.0 -v filesrc location=/mnt/temp/cif_test.yuv ! videoparse width=352 height=288 ! videoscale add-borders=1 ! video/x-raw,width=640,height=360 ! filesink location=/mnt/temp/out.yuv My log looked like Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstVideoParse:videoparse0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 /GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)11/16, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)11/16, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)11/16, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)11/16, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 /GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)25/1 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 3051953093 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... |
Le vendredi 23 novembre 2012 à 06:26 -0800, Baby Octopus a écrit :
> I would want to scale an image with letter box for maintaining display > aspect > ratio. I tried to upscale a 352x288 image to 640x360 by running the > below > mentioned command. I'm not satisfied with the result. Input is > http://i49.tinypic.com/os51r6.png but the result is > http://i47.tinypic.com/25ksm6s.png This looks like a bug to me, it's seems that width and height is being inverted somewhere. Please file a bug, https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer. Another way to show the problem: Broken with xvimagesink: gst-launch-1.0 videotestsrc ! video/x-raw,width=352,height=288,aspect-ratio=1/1 ! videoscale add-borders=1 ! video/x-raw,width=640,height=360 ! xvimagesink Good with ximagesink: gst-launch-1.0 videotestsrc ! video/x-raw,width=352,height=288,aspect-ratio=1/1 ! videoscale add-borders=1 ! video/x-raw,width=640,height=360 ! ximagesink Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
In reply to this post by Baby Octopus
Any idea on this pls?
~BO |
Le dimanche 25 novembre 2012 à 21:28 -0800, Baby Octopus a écrit :
> Any idea on this pls? Actually, I found that forcing the pixel-aspect-ratio downstream can be used to work around the problem. I skeptical on how this aspect ratio is being computed. This pipeline works for me: gst-launch-1.0 videotestsrc ! video/x-raw,width=352,height=288,aspect-ratio=1/1 ! videoscale add-borders=1 ! video/x-raw,width=640,height=360,pixel-aspect-ratio=1/1 ! xvimagesink _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
Nicolas,
Thank you. Setting pixel-aspect-ratio downstream does the job for me. I was initially setting pixel_aspect_ratio=1/1. Why is it that I should use pixel-aspect-ratio and not pixel_aspect_ratio? ~BO |
Le lundi 26 novembre 2012 à 22:31 -0800, Baby Octopus a écrit :
> Why is it that Because the field name is pixel-aspect-ratio, not pixel_aspect_ratio. Extra unknown fields are ignored. Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
Hi Nicolas,
The reason I asked this question is coz I do not see any issue when I use underscore(_) in place of hyphen(-) while setting element property, but I see an issue if I do that while setting caps property. For example, it doesnt matter if I use "add-borders" or "add_borders" for adding letter box for videoscale. Both give same result with borders being added when input/output aspect ratio are different. But I see an issue if I use "pixel_aspect_ratio" in place of "pixel-aspect-ratio". Is there some kind of bug in caps property parsing? ~BO |
Free forum by Nabble | Edit this page |