IM6Q Saber SD - vpuenc h264 with mp4 container

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IM6Q Saber SD - vpuenc h264 with mp4 container

5,436 Views
matthewreynolds
Contributor III

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 ...

Labels (3)
Tags (4)
0 Kudos
28 Replies

401 Views
YixingKong
Senior Contributor IV

Matt,

We are sorry for getting back to you so late. Are you still stuck with the issue? If you have somehow resolved the issue,

can we close the discussion? If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos

401 Views
matthewreynolds
Contributor III

Yixing,

Yes the issue can be closed.  Switching to the latest Yocto release has been working for us.  Sorry, I had left the discussion open.

Thanks,

Matthew

0 Kudos

401 Views
tongchunyang
Contributor III

Hi Leo

When I building the target using bitbake, there are many softwares need to be download manually. I just donwload them from different web url. But when I finding the source rpm-5.4.9.tar.gz, I found the same question you have mentioned on the web.

Freescale OpenEmbedded/Yocto Layers discussion list ()

Has this issue solved?

And where can download the source about rpm-5.4.9.tar.gz or if there have some other problems?

0 Kudos

402 Views
tongchunyang
Contributor III

Hi Leo

With your command as above, I finished checkout of the source master-next.

Thanks a lot.

0 Kudos

402 Views
matthewreynolds
Contributor III

Thank you Leo,

I was able to get through the "repo sync" command using those steps.

Matthew

0 Kudos

402 Views
matthewreynolds
Contributor III

Leo,

The FAE, Norbel from Freescale had provided me the vpuenc and vpu_wrapper source files that are going to be used in the up coming Ubuntu BSP release.  I re-compiled the IMX_MMCODEC_3.0.35_4.1.0_BUNDLE with them but couldn't get h264+mp4 encoded videos to playback.  I tested the pipelines using gst-launch and verified the new plugin and wrapper were used because, they showed my build date in the debug messages.  I used different combinations of mp4mux, ffmux_mp4, matroskamux and h264parse in the pipeline.  Like before, only videos encoded with the matroskamux would playback.  A notable difference I saw was with using using the vpuenc with the mp4mux.   GStreamer no longer printed warnings about "no stream-format field in h264 caps" and "pad video_00 refused caps video".  I had thought this was the main problem and was caused by the vpuenc not providing that field.  However, since those messages are not being printed anymore I am at a bit of a loss what could be wrong.


I have not yet used Yocto but, would we certainly willing to try.  Do you know if any new information from the multimedia team came out about this bug, such as if it has been fixed in Yocto or the upcoming Ubuntu BSP?  If you would also like to try the source files for the Ubuntu build to verify them I can send them to you.


Sincerely,

Matthew

0 Kudos

402 Views
LeonardoSandova
Specialist I

Hi Matt,

For the fixes on this release, please ask to Norbel. I got the vpu sources you have tried, but for the moment lets focus on latest release instead.

0 Kudos

402 Views
matthewreynolds
Contributor III

Thank you very much for investigating this issue for me Leo.


Regards,

Matthew

0 Kudos