gstreamer transcoding on wandboard

cancel
Showing results for 
Search instead for 
Did you mean: 

gstreamer transcoding on wandboard

Jump to solution
424 Views
Contributor III

I upgrade my bsp from dizzy to morty. dizzy was using gstreamer 0.1 and morty went to gstream-1.0.

FILE to transcode =test_1280x720.mp4 : mime: video/quicktime; audio/x-m4a; application/x-3gp

START FILE MIME INFO.

Aiur: 3.0.11 Mime:

mime: video/quicktime; audio/x-m4a; application/x-3gp
video/x-h264, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate

Mime:

             audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100

END FILE MIME INFO

I transcoded a mp4 file using gstreamer 0.1 with no issues using the following 0.1 command.

WORKS BELOW WITH DIZZY BSP

gst-launch filesrc location=test_1280x720.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, format=(fourcc)NV12, width=640, height=360' ! vpuenc ! matroskamux ! filesink location=out2.mkv

I upgraded to morty and converted the 0.1 command to a gstreamer 1.0 command.

BUILD - 

  1. repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b morty
  2. bitbake fsl-image-mutimedia-full
  3. DOES NOT WORK BELOW WITH MORTY BSP

gst-launch-1.0 filesrc location=test_1280x720.mp4 typefind=true ! aiurdemux  ! imxvpudec ! 'video/x-raw, format=NV12, width=640, height=360' ! imxvpuenc_h264   ! filesink location=out2.mkv

OUTPUT = WARNING: erroneous pipeline: no element "aiurdemux"

I have looked for any other method to demux this stream by getting all possible demux elements using:

 gst-inspect-1.0 | grep demux.   I tried every one that this returned in place of aiurdemux. qtdemux gave errors. None of these worked. Did you move this into another element? The latest Linux IMX user manual has the usage of aiurdemux with gstreamer-1.0. We also downloaded the master branch and it is missing here too. How do I demux this mp4 stream. The equivalent command for gstreamer-1.0  that also scales the output would help me alot!

Labels (2)
Tags (1)
0 Kudos
1 Solution
5 Views
Contributor III

Hi IGOR - The link was very helpful and I was able to demux/decode and create scaled 422 ycc files and send to hdmi port which was my immediate need.  I still could not get the transcode operation below from my original post to work in gstreamer 1.0 . I tried many different iterations without success.  This transcode covers pretty much everything else that I need to do in the first phase of this project.

gst-launch filesrc location=test_1280x720.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, format=(fourcc)NV12, width=640, height=360' ! vpuenc ! matroskamux ! filesink location=out2.mkv

Thanks,

Rob

View solution in original post

0 Kudos
4 Replies
5 Views
NXP TechSupport
NXP TechSupport

Hi Robert

probably there is confusion between two different gstreamer versions:

community gstreamer-imx and nxp plugins, for example "imxvpudec" is from

gstreamer-imx. Linux IMX user manual  is applicable only to nxp plugins.

Difference is described on

trac.gateworks.com/wiki/Yocto/gstreamer

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
6 Views
Contributor III

Hi IGOR - The link was very helpful and I was able to demux/decode and create scaled 422 ycc files and send to hdmi port which was my immediate need.  I still could not get the transcode operation below from my original post to work in gstreamer 1.0 . I tried many different iterations without success.  This transcode covers pretty much everything else that I need to do in the first phase of this project.

gst-launch filesrc location=test_1280x720.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, format=(fourcc)NV12, width=640, height=360' ! vpuenc ! matroskamux ! filesink location=out2.mkv

Thanks,

Rob

View solution in original post

0 Kudos
5 Views
NXP TechSupport
NXP TechSupport

Hi Robert

which gstreamer you are using, community gstreamer-imx plugins or nxp gstreamer plugins.
For example please check maintainer of gstreamer-imx plugins mentioned on
https://community.nxp.com/thread/445732

Best regards
igor

0 Kudos
5 Views
Contributor III

Hi Igor, I stared out with the nxp-plugins and everything seemed went very smooth except that there did not seem to be 422 support. I wanted to be at the latest board support package which moved me from the nxp plugins to the shared community imx plugins. (gstreamer-imx plugins) Your last link helped allot. I am really just trying to go from nxp gstreamer plugins to gstreamer-imx plugins. I only care about video and can throw away the audio. I have spent a fair amount of time in breaking up the command below. If I could get the equivalent transcode for the gstreamer-imx community plugins, I would be very grateful.  The other thin\g that comes out of this is to understand how to add a container to a raw h264 file as you will see as you read further into this post.

nxp-gstream plugins : WORKS:

gst-launch filesrc location=test_1280x720.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, format=(fourcc)NV12, width=640, height=360' ! vpuenc ! matroskamux ! filesink location=out2.mkv

 

gstreamer-imx plugins.-  I broke up the command into 3 separate commands. I did this because we will be eventually be sending 422 data to the camera port and we will need to send to hdmi port as well as capture a video.

UPDATE - THIS FIXED THE transcode ISSUE (Step 2):

gst-launch-1.0  -v filesrc location=out422.yuv typefind=true  ! videoparse format=5 width=640 height=360 framerate=30 ! imxipuvideotransform ! video/x-raw,format=NV12,width=640,height=360 ! imxvpuenc_h264 gop-size=30 bitrate=512 ! h264parse ! matroskamux ! filesink location=test_640x360.mp4

0 Kudos