how to compile gstreamer in yocto.

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

how to compile gstreamer in yocto.

Jump to solution
7,196 Views
yyuan
Contributor III

hi

I want to know how to compile gstreamer in yocto.

now I don't know which gstreamer is used in yocto, but I found several gstreamer packages.

I want to find out which gstreamer yocto is using.

thank you

Labels (1)
0 Kudos
1 Solution
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

depends on which yocto bsp version you use, you can use demo image or build the yocto by youself, the image includes gstreamer, you don't need to compile gstreamer specially

View solution in original post

0 Kudos
17 Replies
6,122 Views
joanxie
NXP TechSupport
NXP TechSupport

depends on which yocto bsp version you use, you can use demo image or build the yocto by youself, the image includes gstreamer, you don't need to compile gstreamer specially

0 Kudos
6,121 Views
yyuan
Contributor III
  • my yocto have gstreamer ,but I don't know how to call these plugins.  I play video by using glpay-1.0.Avi video is acquired through gst-launch-1.0.

    But I can't change the rate.I wonder if I need to find the source code of this part?Is there anything about this in the yocto project?

thank you 

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

what detailed operation do you need? play a video? what rate do you need to change? could you give me more detailed information?

0 Kudos
6,121 Views
yyuan
Contributor III
  • i want video and play video and osd overlay.

can you help me?

thank you

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

you just use the demo image ,or build any image you want, then you can use gstreamer to play video or osd overlay,

for play video, you can use the command like "gplay-1.0 test.mp4" or "gst-launch-1.0 playbin file=uri:///", for alpha blending, you can set alpha value in the gstreamer, use the paramter like "alpha=xx" in the gstreamer command, fb0 is BG for alpha blending

0 Kudos
6,121 Views
yyuan
Contributor III

thank you

but   i want  know  how I  can  record avi video using mxc_vpu_test?

mxc_vpu_test can recore h264,i want know what`s the difference between gstreamer and mxc_vpu_test?

thank you again

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

 if you need to record to avi, pls use gstreamer, mxc_vpu_test coudn't mux

0 Kudos
6,121 Views
yyuan
Contributor III

tnank you

must be used gstreamer?

mxc_vpu_test can recored h264,  can i use the h264 make avi?  i want to know mxc_vpu_test is hard coded or soft coded?

gstreamer is hard coded or soft coded?

l look up information,Some people say that h264 can be encapsulated as avi. i don`t know how to do it.

i want to make sure can imax6  hardcode avi video?

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

as I mentioned before, mxc_vpu_test couldn't mux to avi, both mxc_vpu_test and gstreamer use vpu which is  hardware module.

0 Kudos
6,121 Views
yyuan
Contributor III

thank you for your answer

but   i can`f find gstreamer`s source code, i can only do it by command.so i want to know where  is gstreamer`s source code  i can use.

 

gstreamer`s command is to fetch data from camera,but i need to add OSD in data stream.

so i don `t know how to use gstreamer add OSD and capture video by command.

i thought i can use mxc_vpu_test to capture h264 ,after that, i use h264 to encapsulate avi video by myself.

after hearing you say,  i think i am wrong. Neither gstreamer or mxc_vpu_test, all is hard coded? i thank gstreamer is soft coded.

but  i think that can use h264 to  encapsulate avi video in mxc_cpu_test through their own code.

i will try to capture avi with either way,

please,can you tell me that if i using gstreamer to capture avi ,what routines are available for reference in yocto project.not commmand such as gst-launch and so on.

thank you very much!!!

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

gstreamer includes many plugins, if you install x264 as encoding, yes this use software to encode, but if you use vpuenc as plugin to encode, which uses vpu (HW) to encode, so it depends on what plugin you use, but for imx6q board, of course we suggest customer to use vpu(HW)to encode, if the product don't have vpu, you need to use SW to encode, hope my explanaion is useful for you

0 Kudos
6,121 Views
yyuan
Contributor III

thank you

my product have vpu.

i use the command  gst-launch-1.0 imxv4l2src device=/dev/video1 num-buffers=300 ! 'video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1' ! queue ! vpuenc_h264 ! avimux ! filesink location=output.avi  ,   please is it vpuenc plugin? i`m not sure. This is provided by yocto project.

i have another problem. i want to encoder avi video in the application layer, do i  have to use the command that  gst-launch-1.0 imxv4l2src device=/dev/video1 num-buffers=300 ! 'video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1' ! queue ! vpuenc_h264 ! avimux ! filesink location=output.avi ?  can i use a routine like mxc_vpu_test?  i want to add encoder avi video in the application.

thank you

0 Kudos
6,121 Views
joanxie
NXP TechSupport
NXP TechSupport

1)for more detailed information about using gstreamer, pls refer the linux user guide, for example:

7.3.7 Audio/Video recording
This is an example of a command used to record audio and video together:
$GSTL –e imxv4l2src device=$DEVICE ! $INPUT_CAPS ! queue ! vpuenc_h264 ! queue
! mux. pulsesrc ! 'audio/x-raw, rate=44100, channels=2' ! imxmp3enc ! queue
! mux. $MUXER name=mux ! filesink location= output.$EXTENSION
• $INPUT_CAPS should be set to 'video/x-raw, format=(string)NV12, width=1920, height=1080,
framerate=(fraction)30/1’.
• $MUXER can be set as to qtmux, matroskamux, mp4mux, avimux, or flvmux.
Common parameters are as follws:
• -e indicates to send EOS when the user presses Ctrl+C to avoid output corruption.
• $EXTENSION is the filename extension according to the multiplexer type.

2)for how to build your own source code, pls refer to the yocto training

https://community.nxp.com/docs/DOC-94849 

this is another topic

3) for mxc_vpu_test, as I mentioned before, you can use it encoder the video, then you use your own software to mux video and audio, but we don't have source code for this

0 Kudos
6,122 Views
yyuan
Contributor III

thank you

In fact, I want to ask is I want to find a gstreamer routine in yocto project, can directly modify and compile the routine, now I seem to find the routine about gstreamer, but I do not know how to compile, just like the last picture. I don't want to use the instructions to complete the video recording. And by way of instructions I don't know how to set the rate, recorded video like Mosaic. I thought there would be a routine like this in yocto's project that I could use directly.

thank you very much

0 Kudos
6,122 Views
yyuan
Contributor III

你好   

其实我想问的是 我想在yocto的工程里找一个有关gstreamer的例程,可以直接修改并且编译的例程,现在是我好像找到了有关gstreamer的例程,但是我不知道怎么编译,就像上一条发的图片一样。我不想用指令去完成视频录制。而且通过指令方式我不知道怎么设置码率,录制出来的视频像马赛克一样。我以为在yocto的工程里会有这样的例程,是我可以直接用的。

谢谢您

0 Kudos
6,122 Views
joanxie
NXP TechSupport
NXP TechSupport

yes, you can encode by vpu, then mux by software by your own code, if you need gst1.0 plugin source code, pls find them from the link as below:

imx-gst1.0-plugin - i.MX Gstreamer 1.0 Plugin 

0 Kudos
6,122 Views
yyuan
Contributor III

thank you 

i find the gst1.0 plugin source code in my youcto project, but i don`t know how to compile it?t.bmp

it`s my project directory.it dons`t have executable file.  i don`t know how to compile it and how to execute this code?

i don't know if I'm making myself clear.do you understand me?

thank you

0 Kudos