Creating MP4 subtitles with gstreamer

Jérôme Carretero cJ-gst at zougloub.eu
Thu Apr 16 05:39:26 PDT 2015


Hi,



I would like to create MP4 subtitles (3GPP timed text aka. 3GPP TS
26.245) with gstreamer, whether using command line or a more advanced
programmatic pipeline.

With ffmpeg I could do something like:

  ffmpeg -i a.mp4 -f srt -i b.srt -c:v copy -c:a copy -c:s mov_text
  c.mp4

Note that I am *not* talking about burning subtitles in video frames,
which is widely covered in tutorials.

I've been trying:

  gst-launch-1.0 \
   mp4mux name=mux ! filesink location=out.mp4. \
   filesrc location=test.srt ! subparse ! mux. \
   videotestsrc num-buffers=300 ! videoconvert \
    ! x264enc bitrate=4000 threads=0 ! mux.

But it says:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0:
Internal data flow error. Additional debug info:
/var/tmp/paludis/media-libs-gstreamer-1.4.5/work/gstreamer-1.4.5/libs/gst/base/gstbasesrc.c(2933):
 gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...


I haven't started to dig into the code yet, and was wondering if
somebody could tell me either what I'm doing wrong, or what is the
support level of that kind of things.


Thanks,

-- 
cJ


More information about the gstreamer-devel mailing list