Hi,
My goal is to transcode a video with burning subtitle(by using textoverlay). I reference Gstreamer tutorial and write a little program to test 2 pipeline: pipeline 1(without subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. pipeline 2(with subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq textoverlay wait-text=false name=txo splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! txo.video_sink txo.src ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" filesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.zh-TW.srt" ! subparse subtitle-encoding=UTF-8 ! txo.text_sink dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. Pipeline 1 works correctly whether seek event is performed or not. Pipeline 2 is also working correctly without seeking but have issue while seek is performed. It will block at ret = gst_element_seek_simple (pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT, 7280 * GST_SECOND);and never return.Is there anything I can do about this? the attached file is my test code. regards, Tany gst_seek.c |
Hello, Tany
Try to is any messages appears on a bus.
From: gstreamer-devel <[hidden email]> on behalf of Tany <[hidden email]>
Sent: Wednesday, February 15, 2017 4:25:42 AM To: [hidden email] Subject: Issue burning subtitle into video when seeking Hi,
My goal is to transcode a video with burning subtitle(by using textoverlay). I reference Gstreamer tutorial and write a little program to test 2 pipeline: pipeline 1(without subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. pipeline 2(with subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq textoverlay wait-text=false name=txo splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! txo.video_sink txo.src ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" filesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.zh-TW.srt" ! subparse subtitle-encoding=UTF-8 ! txo.text_sink dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. Pipeline 1 works correctly whether seek event is performed or not. Pipeline 2 is also working correctly without seeking but have issue while seek is performed. It will block at ret = gst_element_seek_simple (pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT, 7280 * GST_SECOND); and never return. Is there anything I can do about this? the attached file is my test code. regards, Tany gst_seek.c <http://gstreamer-devel.966125.n4.nabble.com/file/n4681885/gst_seek.c> -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Issue-burning-subtitle-into-video-when-seeking-tp4681885.html Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Tany
Hello, Tany
Small help to you.
GMainLoop* _loop = g_main_loop_new(NULL, FALSE);
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(_pipeline));
gst_bus_add_watch(bus, BusCallback, this);
g_main_loop_run(_loop);
int GStreamerPlayer::BusCallback(GstBus*, GstMessage* message, void* data)
{
GStreamerPlayer* player = (GStreamerPlayer*)data;
switch (GST_MESSAGE_TYPE(message))
{
case GST_MESSAGE_WARNING:
case GST_MESSAGE_ERROR:
case GST_MESSAGE_ASYNC_DONE:
case GST_MESSAGE_EOS:
....
Mikl
From: gstreamer-devel <[hidden email]> on behalf of Tany <[hidden email]>
Sent: Wednesday, February 15, 2017 4:25:42 AM To: [hidden email] Subject: Issue burning subtitle into video when seeking Hi,
My goal is to transcode a video with burning subtitle(by using textoverlay). I reference Gstreamer tutorial and write a little program to test 2 pipeline: pipeline 1(without subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. pipeline 2(with subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0 max-size-time=0 name=mq textoverlay wait-text=false name=txo splitfilesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.mkv" ! matroskademux name=dmx dmx. ! queue ! identity sync=false ! h264parse ! omxh264dec ! txo.video_sink txo.src ! omxh264enc force-keyframe-period=40 scaling-width=1920 scaling-height=800 ! h264parse ! mq.sink_0 mq.src_0 ! mpegtsmux name=mux ! filesink location="/share/Public/aaa.ts" filesrc location="/share/Multimedia/debug/harry/Harry.Potter.and.the.Deathly.Hallows.Part.1.2010.BluRay.1080p.AAC.4Audio.x264-CHD.zh-TW.srt" ! subparse subtitle-encoding=UTF-8 ! txo.text_sink dmx. ! aacparse ! queue ! identity sync=false ! faad name=adec ! audioconvert ! audioresample ! audio/x-raw,channels=2,rate=44100 ! queue ! voaacenc ! audio/mpeg,mpegversion=4,stream-format=raw ! aacparse ! mq.sink_1 mq.src_1 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. Pipeline 1 works correctly whether seek event is performed or not. Pipeline 2 is also working correctly without seeking but have issue while seek is performed. It will block at ret = gst_element_seek_simple (pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT, 7280 * GST_SECOND); and never return. Is there anything I can do about this? the attached file is my test code. regards, Tany gst_seek.c <http://gstreamer-devel.966125.n4.nabble.com/file/n4681885/gst_seek.c> -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Issue-burning-subtitle-into-video-when-seeking-tp4681885.html Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |