Eglstream Cross-Process issue

I try the eglstream sample, for “Single-Process Examples” is workable.
But when I try Cross-Process Examples.
It can not show on display or record to file?
Log for show on display, but not display:
"./nvm_eglstream -f …/…/…/Media/nv_medusa_h264_1080P_short.mp4 -producer 0 -standalone 1 -consumer 1 -fifo -v 3
Operation mode: Producer
nvmedia: EGLStreamInit - Start
nvmedia: EGLStreamReceivefd: listen_fd: 12
nvmedia: EGLStreamReceivefd: connect_fd: 13
nvmedia: Producer file descriptor: 12
EGL_STREAM_STATE_CREATED_KHR
EGL Stream consumer - Mode: FIFO Length: 4
EGL Stream consumer - Latency: 16000 usec
EGL Stream consumer - Timeout: 16000 usec
nvmedia: EGLStreamInit - End
nvmedia: main - VideoDecoderInit - Before
nvmedia: DecodeThread: Init
Init: Opening file: …/…/…/Media/nv_medusa_h264_1080P_short.mp4
nvmedia: main - VideoDecoderInit - After
nvmedia: Init: video_parser_create
nvmedia: Init: NvMediaDeviceCreate
nvmedia: DecodeThread: Decode
Decode start
nvmedia: main - stop producer thread and consumer thread
nvmedia: wait for video decoder thread exit
nvmedia: main - stop produer thread and consumer thread: Done
nvmedia: main - flush producer and consumer eglstream
nvmedia: main - flush produer and consumer eglstream: Done
nvmedia: main - program end, clean up start
nvmedia: main: Deinit
nvmedia: EGLStreamFini: EGL Stream destroyed
nvmedia: main - clean up done
"
Preformatted text`./nvm_eglstream -consumer 1 -standalone 2 -producer 0 -fifo -d 0 -v 3
Operation mode: Consumer
nvmedia: EGLStreamInit - Start
nvmedia: Consumer file descriptor: 13
nvmedia: EGLStreamSendfd: sock_fd: 12
nvmedia: EGLStreamSendfd: Wait is done
nvmedia: EGLStreamSendfd: sendmsg: res: 1
EGL Stream consumer - Mode: FIFO Length: 4
EGL Stream consumer - Latency: 16000 usec
EGL Stream consumer - Timeout: 16000 usec
nvmedia: EGLStreamInit - End
nvmedia: main - image_display_init
nvmedia: image_display_init: NvMediaDeviceCreate
nvmedia: image_display_init: IDP create 0
nvmedia: NVMedia image consumer thread is active
nvmedia: Nvmedia image Consumer: - EGL_STREAM_STATE_DISCONNECTED_KHR received
nvmedia: main - stop producer thread and consumer thread
nvmedia: wait for nvmedia image consumer thread exit
nvmedia: main - stop produer thread and consumer thread: Done
nvmedia: main - flush producer and consumer eglstream
nvmedia: main - flush produer and consumer eglstream: Done
nvmedia: main - program end, clean up start
nvmedia: image_display_Deinit: start
nvmedia: image_display_Deinit: consumer destroy
nvmedia: image_display_Deinit: done
nvmedia: EGLStreamFini: EGL Stream destroyed
nvmedia: main - clean up done
"
Log for record file, but only create a size 0 file
./nvm_eglstream -f …/…/…/Media/nv_medusa_h264_1080P_short.mp4 -producer 0 -standalone 1 -consumer 1 -fifo -v 3
Operation mode: Producer
nvmedia: EGLStreamInit - Start
nvmedia: EGLStreamReceivefd: listen_fd: 12
nvmedia: EGLStreamReceivefd: connect_fd: 13
nvmedia: Producer file descriptor: 12
EGL_STREAM_STATE_CREATED_KHR
EGL Stream consumer - Mode: FIFO Length: 4
EGL Stream consumer - Latency: 16000 usec
EGL Stream consumer - Timeout: 16000 usec
nvmedia: EGLStreamInit - End
nvmedia: main - VideoDecoderInit - Before
nvmedia: DecodeThread: Init
Init: Opening file: …/…/…/Media/nv_medusa_h264_1080P_short.mp4
nvmedia: main - VideoDecoderInit - After
nvmedia: Init: video_parser_create
nvmedia: Init: NvMediaDeviceCreate
nvmedia: DecodeThread: Decode
Decode start
nvmedia: main - stop producer thread and consumer thread
nvmedia: wait for video decoder thread exit
nvmedia: main - stop produer thread and consumer thread: Done
nvmedia: main - flush producer and consumer eglstream
nvmedia: main - flush produer and consumer eglstream: Done
nvmedia: main - program end, clean up start
nvmedia: main: Deinit
nvmedia: EGLStreamFini: EGL Stream destroyed
nvmedia: main - clean up done

./nvm_eglstream -consumer 1 -standalone 2 -producer 0 -fifo -v 3 -enc test.264
nvmedia: Encode enabled
Operation mode: Consumer
nvmedia: EGLStreamInit - Start
nvmedia: Consumer file descriptor: 13
nvmedia: EGLStreamSendfd: sock_fd: 12
nvmedia: EGLStreamSendfd: Wait is done
nvmedia: EGLStreamSendfd: sendmsg: res: 1
EGL Stream consumer - Mode: FIFO Length: 4
EGL Stream consumer - Latency: 16000 usec
EGL Stream consumer - Timeout: 16000 usec
nvmedia: EGLStreamInit - End
nvmedia: main - image_display_init
nvmedia: image_display_init: NvMediaDeviceCreate
nvmedia: NVMedia image consumer thread is active
nvmedia: Nvmedia image Consumer: - EGL_STREAM_STATE_DISCONNECTED_KHR received
nvmedia: main - stop producer thread and consumer thread 
nvmedia: wait for nvmedia image consumer thread exit
nvmedia: main - stop produer thread and consumer thread: Done 
nvmedia: main - flush producer and consumer eglstream 
nvmedia: main - flush produer and consumer eglstream: Done
nvmedia: main - program end, clean up start
nvmedia: image_display_Deinit: start
nvmedia: image_display_Deinit: consumer destroy
nvmedia: image_display_Deinit: done
nvmedia: EGLStreamFini: EGL Stream destroyed
nvmedia: main - clean up done

Please provide the following info:
Software Version
DRIVE OS Linux 5.1.15 and DriveWorks 3.0

Target Operating System
Linux

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)

SDK Manager Version
1.4.0.7363
other

Host Machine Version
native Ubuntu 18.04

Dear @Denny.hsu,
Could you please share reproducible video and commands to test on our end?

I use video in nvidia/…/samples/Media/
NVIDIA_LOGO_SLIGHT_PUSH_track1.h264
nv_medusa_h264_1080P_short.mp4
test command for display
./nvm_eglstream -f …/…/…/Media/nv_medusa_h264_1080P_short.mp4 -producer 0 -standalone 1 -consumer 1 -fifo -v 3
./nvm_eglstream -consumer 1 -standalone 2 -producer 0 -fifo -d 0 -v 3
test command for record
./nvm_eglstream -f …/…/…/Media/nv_medusa_h264_1080P_short.mp4 -producer 0 -standalone 1 -consumer 1 -fifo -v 3
./nvm_eglstream -consumer 1 -standalone 2 -producer 0 -fifo -v 3 -enc test.264

update hardware should be Pegasus with dgpu
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
[*] NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

Dear @Denny.hsu ,
My apologies for late responce. Do you still see this issue?

The problem is that nvm_eglstream being a simple application does not support decoding of MP4 files or any other container types such as AVI, OGG, MVK, etc.
The only supported format is elementary H.264 file which complies to the ISO/IEC 14496-10 – MPEG-4 Part 10, Advanced Video Coding specification.
In the example given by the documentation we have this command line which is correct since it describes an H.264 file as input not a container:
./nvm_eglstream -f test.h264 -producer 0 -standalone 1 -consumer 0 [-ot yuv420]

We have tested the scenario replacing the MP4 file with an H.264 file and everything was working properly.
You can use open source FFMPEG software package to extract H.264 stream from an MP4 file.