I met a dual-direction video streaming question when using camera for video phone application, seems some troubles come from VPU.
I had two i.mx53 board with camera, one's ip is 192.168.0.202, the other's is 192.168.0.210. Used following command line as video streaming receiver:
gst-launch-0.10 -v udpsrc port=5002 ! queue ! capsfilter caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)420014, payload=(int)96" ! rtph264depay ! mfw_vpudecoder codec-type=std_avc ! queue ! mfw_isink sync=false async=false
Used following command line as video streaming transmitter:
gst-launch-0.10 -v mfw_v4lsrc capture-width=352 capture-height=288 ! queue ! mfw_vpuencoder codec-type=std_avc ! rtph264pay ! queue ! udpsink host=192.168.0.202 port=5002 sync=false async=false
All single direction video communication worked well, but if I used dual direction command line like a video phone, the error came out .
I ran this command line on 192.168.0.102
gst-launch-0.10 -v udpsrc port=5002 ! queue ! capsfilter caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)420014, payload=(int)96" ! rtph264depay ! mfw_vpudecoder codec-type=std_avc ! queue ! mfw_isink sync=false async=false &
gst-launch-0.10 -v mfw_v4lsrc capture-width=352 capture-height=288 ! queue ! mfw_vpuencoder codec-type=std_avc ! rtph264pay ! queue ! udpsink host=192.168.0.210 port=5010 sync=false async=false
And ran this command line on 192.168.0.102
gst-launch-0.10 -v udpsrc port=5010 ! queue ! capsfilter caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)420014, payload=(int)96" ! rtph264depay ! mfw_vpudecoder codec-type=std_avc ! queue ! mfw_isink sync=false async=false &
gst-launch-0.10 -v mfw_v4lsrc capture-width=352 capture-height=288 ! queue ! mfw_vpuencoder codec-type=std_avc ! rtph264pay ! queue ! udpsink host=192.168.0.202 port=5002 sync=false async=false
Both mx53 boards came out such log line text every second:
"[WARN] VPU mutex couldn't be locked before timeout expired"
And the screen freezed and no any video playing.
Can anybody give me some suggestion? Thank you!
Yeah!
The "loopback" parameter worked well in MPEG-4 format streaming.
Still have problem in H.264 streaming. I will trace it in detail.
Lots of thank to Daiane ! :-)
yes, try it with true (loopback=true)
it will allow gst plugin to create thread properly to configure VPU to have 2 simultaneous instances (one for decoder and one for encoder just like a loopback)
yes, it has, default value is false.
Is it needed to be true? Can you tell me what this property's function is? Some confused by the inspect log line.
Thank you, Daiane!
Can you, please, see if your vpuencoder / vpudecoder has a loopback property?
gst-inspect mfw_vpudecoder | grep loopback