The command line looks good. But as the name of the output you could remove the extension .h264 since the sample internally appends .h264 to output file name.
The error message "Display acquiring failed on device" occurs when the device is not available.
Could you confirm on which platform you are executing this sample?
Please give details such as:
Device, Device ID, Driver version, OS
Also could you kindly run the 'Capability Manager" sample and share the logs with us?