How do I Capture H264 Output and Scale It and Copy to Other Output/Buffer?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do I Capture H264 Output and Scale It and Copy to Other Output/Buffer?

1,058件の閲覧回数
ralph__
Contributor IV

I have an application that displays overlaid H264 video on the HDMI output of my SabreLite development board.

What I would like to do is capture this decoded H264 output and scale it down to a thumbnail and then display this as an overlay on the LCD port (or just copy it to another memory buffer which could be linked to an LCD). Does anyone know how to do this?

I have had a look at the IPU lib PDF however this is not clear how to do this programmatically. I have also tried to Google for an answer but with no luck. I thought maybe there would be example code in the unit_tests but there doesn't seem to be anything relating to "ScreenLayer".

Thanks
Ralph

ラベル(5)
0 件の賞賛
返信
2 返答(返信)

862件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

You’re right, there’s not much information on this specific application and I couldn’t locate any sample code for it.

In this case you would need to work on a raw format to resize the image and then use the overlay and alpha blending options between both framebuffers. I don’t think there is a screen layer option per se.

0 件の賞賛
返信

862件の閲覧回数
ralph__
Contributor IV

Apparently you can use the "tee" element in a gstreamer pipeline. I have now got it working on the HDMI (/dev/video17) and the LCD (/dev/video18) with this:

gst-launch filesrc location=/usr/sample1080p30_40Mbps.mp4 typefind=true ! qtdemux ! vpudec framedrop=false ! tee name=splitter ! queue max-size-buffers=5 ! mfw_v4lsink device="/dev/video17" disp-width=1920 disp-height=1080 sync=false splitter. ! queue max-size-buffers=5 ! mfw_v4lsink device="/dev/video18" disp-width=800 disp-height=480 sync=false

Sadly it only gives me 26fps so I wanted to try the mfw_isink element to see if it was faster. I tried these two lines but no luck so far. Does anyone know what command line I should use?

gst-launch filesrc location=/usr/sample1080p30_40Mbps.mp4 typefind=true ! qtdemux ! vpudec framedrop=false ! tee name=splitter ! queue max-size-buffers=5 ! mfw_isink display="/dev/video17" disp-width=1920 disp-height=1080 sync=false splitter. ! queue max-size-buffers=5 ! mfw_isink display-2="/dev/video18" disp-width-2=800 disp-height-2=480 sync=false

gst-launch filesrc location=/usr/sample1080p30_40Mbps.mp4 typefind=true ! qtdemux ! vpudec framedrop=false ! tee name=splitter ! queue max-size-buffers=5 ! mfw_isink display="/dev/video17" disp-width=1920 disp-height=1080 sync=false splitter. ! queue max-size-buffers=5 ! mfw_isink display-1="/dev/video18" disp-width-1=800 disp-height-1=480 sync=false

gst-launch filesrc location=/usr/sample1080p30_40Mbps.mp4 typefind=true ! qtdemux ! vpudec framedrop=false ! tee name=splitter ! queue max-size-buffers=5 ! mfw_isink display-1="/dev/video17" disp-width-1=1920 disp-height-1=1080 sync=false splitter. ! queue max-size-buffers=5 ! mfw_isink display-2="/dev/video18" disp-width-2=800 disp-height-2=480 sync=false

Any ideas? The last one I listed above only displays on my HDMI output and not the LCD.

Thanks.

0 件の賞賛
返信