[완료]GStreamer에서, 비디오영상 바깥에 글자띄우는 방법

klara의 이미지

GStreamer를 이용하여 동영상을 재생하려고 합니다.
자막출력을 위해서 textoverlay를 이용하였는데, 비디오 영상안쪽에만 표시가 되네요.
16:9비디오를 4:3화면에 출력하면 상하단검은 여백으로 출력하게 되는데, 이여백쪽에 문자열을 표시하는 방법은 없을까요?
xine의 expand post plugin이나 mplayer의 expand video filter처럼, 영상을 확장해주는 플러그인이나, 혹은 여백에 텍스트출력이 가능한 방법이 있다면 알려주시면 감사하겠습니다.

ganadist의 이미지

이놈은 확인해보셨나요?

 % gst-inspect-0.10 videobox
Factory Details:
  Long name:	Video box filter
  Class:	Filter/Effect/Video
  Description:	Resizes a video by adding borders or cropping
  Author(s):	Wim Taymans <wim@fluendo.com>
  Rank:		none (0)
 
Plugin Details:
  Name:			videobox
  Description:		resizes a video by adding borders or cropping
  Filename:		/usr/lib/gstreamer-0.10/libgstvideobox.so
  Version:		0.10.11
  License:		LGPL
  Source module:	gst-plugins-good
  Binary package:	Gentoo GStreamer Ebuild
  Origin URL:		<a href="http://www.gentoo.org" rel="nofollow">http://www.gentoo.org</a>
 
GObject
 +----GstObject
       +----GstElement
             +----GstBaseTransform
                   +----GstVideoBox
 
Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw-yuv
                 format: AYUV
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-yuv
                 format: I420
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
 
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw-yuv
                 format: AYUV
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw-yuv
                 format: I420
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
 
 
Element Flags:
  no flags set
 
Element Implementation:
  Has change_state() function: gst_element_change_state_func
  Has custom save_thyself() function: gst_element_save_thyself
  Has custom restore_thyself() function: gst_element_restore_thyself
 
Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.
 
Pads:
  SRC: 'src'
    Implementation:
      Has getrangefunc(): gst_base_transform_getrange
      Has custom eventfunc(): gst_base_transform_src_event
    Pad Template: 'src'
  SINK: 'sink'
    Implementation:
      Has chainfunc(): gst_base_transform_chain
      Has custom eventfunc(): gst_base_transform_sink_event
      Has bufferallocfunc(): gst_base_transform_buffer_alloc
    Pad Template: 'sink'
 
Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: null Current: "videobox0"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false Current: false
  left                : Pixels to box at left (<0  = add a border)
                        flags: readable, writable
                        Integer. Range: -2147483648 - 2147483647 Default: 0 Current: 0
  right               : Pixels to box at right (<0 = add a border)
                        flags: readable, writable
                        Integer. Range: -2147483648 - 2147483647 Default: 0 Current: 0
  top                 : Pixels to box at top (<0 = add a border)
                        flags: readable, writable
                        Integer. Range: -2147483648 - 2147483647 Default: 0 Current: 0
  bottom              : Pixels to box at bottom (<0 = add a border)
                        flags: readable, writable
                        Integer. Range: -2147483648 - 2147483647 Default: 0 Current: 0
  fill                : How to fill the borders
                        flags: readable, writable
                        Enum "GstVideoBoxFill" Default: 0, "black" Current: 0, "black"
                           (0): black            - Black
                           (1): green            - Colorkey green
                           (2): blue             - Colorkey blue
  alpha               : Alpha value picture
                        flags: readable, writable
                        Double. Range:               0 -               1 Default:               1 Current:               1
  border-alpha        : Alpha value of the border
                        flags: readable, writable
                        Double. Range:               0 -               1 Default:               1 Current:               1

----
데스크탑 프로그래머를 꿈꾸는 임베디드 삽질러

----
데스크탑 프로그래머를 꿈꾸는 임베디드 삽질러

klara의 이미지

적용해보니 잘되네요. 감사합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.