When I record video using MediaRecorder in portrait mode, video recorded in landscape mode ,
I have tried for mMediaRecorder.setOrientationHint(90); and mServiceCamera.setDisplayOrientation(90); but it is not working
There's not a good way to do this for older API levels.
If you're using >=14, you can use Media Effect calls to change the orientation. Instructions for its use can be found in that link. You'll need a valid OpenGL context to use with it, so it's slightly more complicated than a simple camera app.
You'll want to use EFFECT_ROTATE
, most likely.