video conversion

Patrick Welche prlw1 at cam.ac.uk
Mon Jun 26 10:48:40 UTC 2017


This feels like a FAQ, but I haven't managed to put my finger on the
right documentation. The question is how to set about working out a
pipeline. (The overall problem is that matlab 2017a still uses gstreamer-0.10, 
despite bugs to that affect being closed as "will appear in a future
release", so I am trying to use gstreamer-1.0 to convert to a video to
a format easy for a default gstreamer-0.10 installation to understand.)

Story so far:

The camera generates a:

$ gst-discoverer-1.0 DAV_3319.MOV 
Analyzing file:///home/prlw1/DAV_3319.MOV
Done discovering file:///home/prlw1/DAV_3319.MOV

Topology:
  container: Quicktime
    video: H.264 (High Profile)

Properties:
  Duration: 0:00:22.800000000
  Seekable: yes
  Tags: 
      video codec: H.264 / AVC
      language code: en
      bitrate: 21992710
      datetime: 2016-07-22T15:51:29Z
      QT atom: buffer of 388690 bytes
      container format: Quicktime


$ gst-inspect-1.0 | grep -i quicktime
isomp4:  qtmux: QuickTime Muxer
isomp4:  qtdemux: QuickTime demuxer
libav:  avenc_adpcm_ima_qt: libav ADPCM IMA QuickTime encoder
libav:  avenc_qtrle: libav QuickTime Animation (RLE) video encoder
libav:  avdec_adpcm_ima_qt: libav ADPCM IMA QuickTime decoder
libav:  avdec_8bps: libav QuickTime 8BPS video decoder
libav:  avdec_qtrle: libav QuickTime Animation (RLE) video decoder
libav:  avdec_rpza: libav QuickTime video (RPZA) decoder
libav:  avdec_smc: libav QuickTime Graphics (SMC) decoder
libav:  avmux_mov: libav QuickTime / MOV muxer (not recommended, use qtmux instead)
typefindfunctions: image/x-quicktime: qif, qtif, qti
typefindfunctions: video/quicktime: mov, mp4

As QuickTime is being used as a container, it looks as though qtdemux is
appropriate.

$ gst-inspect-1.0 qtdemux
...
  SRC template: 'video_%u'
    Availability: Sometimes
    Capabilities:
      ANY

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/quicktime
...
Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "qtdemux0"
...

The graphics format is H.264, so

$ gst-inspect-1.0 | grep -i h264
rtp:  rtph264pay: RTP H264 payloader
rtp:  rtph264depay: RTP H264 depayloader
libav:  avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
typefindfunctions: video/x-h264: h264, x264, 264

$ gst-inspect-1.0 avdec_h264
...
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-h264
              alignment: au
          stream-format: { avc, byte-stream }


I naively try to string them together (SRC=ANY to SINK=video/x-h264):

$ gst-launch-1.0 -v filesrc location="DAV_3319.MOV" ! qtdemux qtdemux0.video_00 ! avdec_h264 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:
failed delayed linking pad  video_00 of GstQTDemux named qtdemux0 to some pad of avdec_h264 named avdec_h264-0
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: Internal data stream error.
Additional debug info:
qtdemux.c(5850): 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 ...


I have a feeling I'm missing something fundamental... Any pointers gratefully
received!


Cheers,

Patrick


More information about the gstreamer-devel mailing list