[API] overlay: need generic overlay base class for textoverlay, assrender, tiger, xsub, dvdspu etc.
Submitted by Rudolf Polzer
Link to original bug (#614612)
Description
When encoding videos from MKV to MP4 for my Blackberry using gst-launch, I ended up with trouble regarding subtitle rendering:
- textoverlay can word-wrap, but looks ugly (no anti aliasing)
- cairotextoverlay looks good, but cannot word wrap, and, which is the focus of this report, stalls the pipeline whatever I try.
An example video (released online by the Chaos Computer Club Cologne, subtitles by me) can be found at http://rm.endoftheinternet.org/~nexuiz/gst-cairotextoverlay-hang/
The includes shell script, if called with the argument "fail", performs:
gst-launch \
filesrc location="17.mkv" ! matroskademux name=demuxer \
demuxer.subtitle_00 ! queue ! sub. \
demuxer.video_00 ! queue ! decodebin ! queue ! cairotextoverlay name=sub ! queue ! xvimagesink sync=false
The pipeline will hang (i.e. playback wills top) at the first line of subtitles (in what I ACTUALLY want to encode, I get that hang only after about 20 seconds of input).
If cairotextoverlay is replaced by textoverlay, the pipeline does NOT stall and playback continues up to the end.
If the filesrc is doubled, it seems to not stall - the video plays indeed back to the end - but then gst-launch does not exit. The "last words" with added -v -m are:
Got message #4883
from element "pipeline0" (eos): no message details
Got EOS from element "pipeline0".
Execution ended after 72374852699 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue3.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue3.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCairoTextOverlay:sub.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCairoTextOverlay:sub.GstPad:text_sink: caps = NULL
/GstPipeline:pipeline0/GstCairoTextOverlay:sub.GstPad:video_sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer2.GstPad:subtitle_00: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer2.GstPad:audio_00: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer2.GstPad:video_00: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer.GstPad:subtitle_00: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer.GstPad:audio_00: caps = NULL
/GstPipeline:pipeline0/GstMatroskaDemux:demuxer.GstPad:video_00: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
gst-launch \
filesrc location="17.mkv" ! matroskademux name=demuxer \
filesrc location="17.mkv" ! matroskademux name=demuxer2 \
demuxer2.subtitle_00 ! queue ! sub. \
demuxer.video_00 ! queue ! decodebin ! queue ! cairotextoverlay name=sub ! queue ! xvimagesink sync=false
Any idea whether this is a) a bug in cairotextoverlay, or b) in my command line, and in case of b), how I can fix it?