Gstreamer pipeline to convert MPEG-4 video to MPEG-TS format

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Gstreamer pipeline to convert MPEG-4 video to MPEG-TS format

anarayan
I am trying to write gstreamer pipeline to convert mpeg4 video to mpegts
format.

I tried below pipeline but no luck

$ gst-launch-1.0 -e filesrc location=20200818125158_00001.ts.mp4 ! qtdemux
name=mdemux ! \
h264parse ! video/x-h264,stream-format=byte-stream ! mpegtsmux name=mux !
filesink location=20200818125158_00001.ts

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:mdemux: Delayed
linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads ():
/GstPipeline:pipeline0/GstQTDemux:mdemux:
failed delayed linking some pad of GstQTDemux named mdem

Based on previous questions I tried changing pipeline to
$ gst-launch-1.0 filesrc location=why.mp4 ! qtdemux  ! h264parse ! mpegtsmux
! filesink location=1.ts
and I get

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: Delayed
linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads ():
/GstPipeline:pipeline0/GstQTDemux:qtdemux0:
failed delayed linking some pad of GstQTDemux named qtdemux0 to some pad of
GstH264Parse named h264parse0
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: Internal
data stream error.
Additional debug info:
qtdemux.c(6073): gst_qtdemux_loop ():
/GstPipeline:pipeline0/GstQTDemux:qtdemux0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Could you please help. I am new to gstreamer

My input format is
*gst-discoverer-1.0 vid.mp4
*Analyzing file:///vid.mp4
Done discovering file:///vid.mp4

Topology:
  container: Quicktime
    video: MPEG-4 Video (Simple Profile)

Properties:
  Duration: 0:00:07.267000000
  Seekable: yes
  Live: no
  Tags:
      video codec: MPEG-4 video
      maximum bitrate: 8400000
      bitrate: 298925
      encoder: Lavf57.83.100
      container format: ISO MP4/M4A

My expected output format is
Topology:
  container: MPEG-2 Transport Stream
    video: H.264 (High Profile)

Properties:
  Duration: 0:00:09.900164000
  Seekable: yes
  Live: no
  Tags:
      video codec: H.264



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel