The following pipeline is intended to simulate capturing two streams, mixing them picture-in-picture, muxing in audio and writing the result to a file:
hres=960
vres=544
hres2=`expr $hres / 2`
vres2=`expr $vres / 2`
xpos=$hres2
ypos=$vres2
framerate=60
audiosamples=`expr 44100 / $framerate`
duration=10
queuesize=12
buffers=`expr $framerate \\* $duration`
gst-launch --gst-debug=3 --verbose \
omx_videomixer framerate=$framerate port-index=0 name=mix \
sink_00::outX=0 sink_00::outY=0 \
sink_00::outWidth=$hres sink_00::outHeight=$vres \
sink_01::outX=$hres2 sink_01::outY=$vres2 \
sink_01::outWidth=$hres2 sink_01::outHeight=$vres2 \
! "video/x-raw-yuv,width=$hres,height=$vres,format=(fourcc)YUY2" \
! omx_noisefilter \
! "video/x-raw-yuv,width=$hres,height=$vres,format=(fourcc)NV12" \
! omx_h264enc \
! "video/x-h264" \
! gstperf \
! avimux name=mux \
! filesink location=capture_test_544.avi \
v4l2src always-copy=false queue-size=$queuesize num-buffers=$buffers \
! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' \
! omxbufferalloc numBuffers=$queuesize \
! tee name=vidsource \
vidsource. ! queue ! mix. \
vidsource. ! queue ! mix. \
audiotestsrc samplesperbuffer=$audiosamples num-buffers=$buffers \
! queue ! mux.
The video source is 1080p60 and connected to the component video inputs on the evaluation board. The environment is the EZSDK 5_05_02_00 and GST_DM81XX_00_07_00_00.
When run as shown above, it runs correctly and generates a 960x544 avi file. If I change the resolution to be 1920x1088, the pipeline hangs, and none of the debug info indicates a problem of any sort. If I change the resolution to be 1200x736, the pipeline also hangs, but the debug info includes the following lines:
0:00:02.778474700 ^[[335m 1480^[[00m 0x23ead8 ^[[32;01mINFO ^[[00m ^[[00m omx gstomx_base_filter.c:626:pad_chain:<omxnoisefilter0>^[[00m omx: play
OMX_EventError: 0x80001001
unrecoverable error: The cause of the error could not be determined (0x80001001)
0:00:02.784869400 ^[[335m 1480^[[00m 0x251cd0 ^[[33;01mWARN ^[[00m ^[[00m omx gstomx_base_filter.c:498:output_loop:<omxnoisefilter0>^[[00m null buffer: leaving
0:00:02.785022200 ^[[335m 1480^[[00m 0x251cd0 ^[[32;01mINFO ^[[00m ^[[00m omx gstomx_base_filter.c:553:output_loop:<omxnoisefilter0>^[[00m pause task, reason: error
I need the pipeline to work at full resolution...
EDIT: the run that produced the error message above, was run at 1200x736... which should have been 1280x736. When run at the corrected resolution, this pipeline hangs the same way as the 1920x1088 full resolution pipeline. In both pipelines that hang, the last debug line output is:
0:00:04.231018750 ^[[331m 1482^[[00m 0x26d6b0 ^[[32;01mINFO ^[[00m ^[[00;01;31m GST_STATES gstelement.c:2354:gst_element_continue_state:<pipeline0>^[[00m posting state-changed PAUSED to PLAYING
In the 960x544 resolution pipeline that runs successfully, the line which follows is:
0:00:02.888359800 ^[[335m 1480^[[00m 0x23bf40 ^[[32;01mINFO ^[[00m ^[[00m v4l2src gstv4l2src.c:1024:gst_v4l2src_create:<v4l2src0>^[[00m sync to 0:00:00.000000000
...followed by similar lines until the v4l2src sends an EOS