Transcoding problems / How to reduce memory bus load

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

Transcoding problems / How to reduce memory bus load

585 Views
erlend_eriksen
Contributor III

I've been trying to get real time FHD video transcoding to work on the imx6q using the var-som-mx6 board. However, although it works fine when the transcoding task is the only one running, it lags behind whenever I add my other tasks.

Using the mmdc profiling tool (About MMDC Profiling Tool for i.MX6 ) I've found that the memory bus load is the limiting factor for my transcoding scenario, which might be due to the fact that only one channel of the memory is used. When just running the transcoding task, the bus load hovers around 70 - 75% (BTW, is that normal?), and when I add more tasks, this increases to around 85% and the transcoding starts lagging behind at a rate of 5 seconds a minute (so after 1 minute, only 55 seconds have been transcoded, etc. ).

Running the non transcoding tasks alone gives a bus load of 35%, but the transcoding still lags behind (by 1 - 3 seconds a minute) even if I cut it down to 10 - 15%, which I wouldn't expect. It seems like I basically can't run any tasks that needs even somewhat frequent memory access.

Would be great to hear if my results are unexpected, and what level of bus loads I should expect to be able to utilize on top of what's needed for the transcoding. Also, I would love to get some general advice on how to reduce the bus load used by my tasks (maybe this is a common problem faced by imx6 users?), although I do realize it's going to depend mostly on the specific applications.

This is the gstreamer pipeline I use for transcoding:

gst-launch-1.0 -v imxv4l2videosrc device=/dev/video2 input=0 fps=30/1 ! "video/x-h264, width=1920,height=1080, framerate=30/1" ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! h264parse ! imxvpudec !  "video/x-raw, format=NV12" ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! imxvpuenc_h264 bitrate=14000 ! h264parse  ! mp4mux ! filesink location=/videos/out.mp4 -e
Labels (4)
0 Kudos
0 Replies