AnsweredAssumed Answered

iMX6 Gstreamer-1.0 playback framerate for encoded and multiplexed video

Question asked by Alexander Khudoshin on Dec 16, 2015
Latest reply on Jan 18, 2016 by Yuri Muhin

In Gstreamer-0.10 the pipeline

gst-launch tvsrc ! queue ! deinterlace mode=1 ! vpuenc bitrate=5000000 ! matroskamux ! filesink location=./test.mp4

produces MPEG-4 file which could be played with

gst-launch filesrc location=./test.mp4 typefind=true ! aiurdemux ! queue ! vpudec ! imxv4l2sink


In Gstreamer-1.0 the equivalent pipeline

gst-launch-1.0  imxv4l2videosrc device=/dev/video0 ! deinterlace ! imxipuvideotransform ! imxvpuenc_h264 bitrate=5000 ! avimux ! filesink location=/tmp/test.mp4

produces MPEG-4 file with the framerate of 30 for both PAL and NTSC video inputs. Also, an attempt to play it with the pipeline

gst-launch-1.0 filesrc location=/tmp/test.mp4 do-timestamp=true typefind=true ! avidemux ! queue ! imxvpudec ! queue ! imxg2dvideosink

produces the following result:

Setting pipeline to PAUSED ...

[INFO]  Product Info: i.MX6Q/D/S

Pipeline is PREROLLING ...

ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error.

Additional debug info:

/opt/oe-toradex/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0/1.4.5-r0/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 ...


Still, the same file can be played with

gst-launch-1.0 playbin uri=file:///tmp/test.mp4 video-sink="imxg2dvideosink"


So, my 2 questions are:

1. How can I set the correct framerate in the encoded .mp4 files?

2. How to create a pipeline equivalent to what playbin creates?