AnsweredAssumed Answered

IM6Q Saber SD - vpuenc h264 with mp4 container

Question asked by MATTHEW REYNOLDS on Dec 13, 2013
Latest reply on Jun 9, 2014 by MATTHEW REYNOLDS
Branched to a new discussion

I would like to get the imx6 vpu to encode h264 into a mp4 container. I have seen a few post with people also having this issue but no verified solution.  Has anyone been able to successfully get this to work on the imx6q platform?  FYI, am using the latest 3.0.7 fsl plugins and the oneiric file system.

 

The test pipeline I am using is the following.

gst-launch -v --gst-debug=2 videotestsrc ! capsfilter caps="video/x-raw-yuv, width=(int)640, height=(int)480, blocksize=460800" ! queue ! vpuenc codec=6 ! ffmux_mp4 ! filesink location=./output.mp4 sync=false

 

It appears to preroll and start encoding, however the video it generates can't be played back.  Totem reports a video stream error and does not @recognize any video streams in the container.  Other things I have tried include using mp4mux instead of ffmux_mp4 and using the h264parse.


Thank you again for any help,

Matthew

 

Here is the log from running the pipeline:

 

gst-launch -v --gst-debug=2 videotestsrc ! capsfilter caps="video/x-raw-yuv, width=(int)640, height=(int)480, blocksize=460800" ! queue ! vpuenc codec=6 ! ffmux_mp4 ! filesink location=./output.mp4 sync=false
Setting pipeline to PAUSED ...
[INFO]  Product Info: i.MX6Q/D/S
vpuenc versions :)
        plugin: 3.0.7
        wrapper: 1.0.35(VPUWRAPPER_ARM_LINUX Build on Jul 30 2013 23:00:47)
        vpulib: 5.4.16
        firmware: 2.3.10.40778
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)640, height=(int)480, blocksize=(int)460800, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, framerate=(fraction)30/1
[INFO]  chromaInterleave 1, mapType 0, linear2TiledEnable 0
/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:src: caps = video/x-h264, width=(int)640, height=(int)480, framerate=(fraction)30/1, framed=(boolean)true
/GstPipeline:pipeline0/ffmux_mp4:ffmux_mp40.GstPad:video_0: caps = video/x-h264, width=(int)640, height=(int)480, framerate=(fraction)30/1, framed=(boolean)true
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)iso
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.261813059  6832    0x18050 WARN                     bin gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 3254794337 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/ffmux_mp4:ffmux_mp40.GstPad:video_0: caps = NULL
/GstPipeline:pipeline0/ffmux_mp4:ffmux_mp40.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

Outcomes