Trying to stream an NDI|HX stream from a Panasonic AW-UE40 (NDI|HX activated)
on Linux fails with a static image with NDI logo and "Video decoder not found"
as shown is the attached 'video_decoder_not_found.png'
Firmware Version: V01.17 (latest)
# mkdir ~/ndi_test; cd ~/ndi_test
1. get the NDI5 Advanced SDK for linux: https://www.ndi.tv/sdk/#download
* fill the form, and download the archive (Install_NDI_Advanced_SDK_v5_Linux.tar.gz)
* from the ndi_test extract the archive:
* run the install script and accept the EULA:
* check that you have a 'NDI Advanced SDK for Linux' folder
2. get the libndihx lib for linux
* dowload it
* extract the archive:
* run the install script and accept the EULA:
* check that you have a 'NDIHXDriverForLinux' folder
4. Setup you working env, to avoid cluttering the fs we will use library
locally with LD_LIBRARY_PATH:
3. build the `NDIlib_Recv_PNG` example, I choose this example as it is
minimalist and allow us to easily get grab an image, but the example need some
adjustment to be able to select the camera and also to skip audio frames
* Apply the here-attached patch:
* build NDIlib_Recv_PNG
* run the test (the camera NDI name is `AW-UE40 (NDI_Device-000000000)`
If everything went well you shall see a `CoolNDIImage.png` created in the
current directory, and unfortunately this image does not show the camera view
but the "video decoder not found" static image
devices (Sony SRG-X400, kiloview E2, ...)
* also tested on NDI5 SDK with the same results
* I check that the libndi*.so are correctly used with `LD_DEBUG=libs NDI\
Advanced\ SDK\ for\ Linux/examples/C++/NDIlib_Recv_PNG/NDIlib_Recv_PNG
"AW-UE40 (NDI_Device-000000000)`
* Using GStreamer gst-plugin-ndi (https://github.com/teltek/gst-plugin-ndi) I
can reproduce the issue.
* Using GStreamer gst-plugin-ndi built with advanced feature and choosing to
get compressed format I can have good image, which means that the camera is
not the root cause.
* when getting compressed through GST frame I get the following h264 format:
caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, stream-format=(string)byte-stream, alignment=(string)au, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)2:4:5:1, parsed=(boolean)true, profile=(string)high, level=(string)4`
From my understanding the issue seems to be in the libndi*.so library as I am
able to decode compressed frame and get the correct picture.
The camera is sending valid data, but it seems that libndi*.so does not
support this profile or detect an error and decide to not decode it.
The strange thing is that under the hood NDI rely on libavcodec for the
decoding of H264, which is also used with success in the Gstreamer compress
scenario.
A sample of an H264 stream sent by the camera and collected with the GST compressed scenario is available here: https://nextcloud.ubicast.net/s/p8PznZHsWkXEzb6 (not possible to attach h264 file to this forum)
I hope that some NDI tech could help me understanding what is going on, if you need more details feel free to ask.
Thanks for your help.
on Linux fails with a static image with NDI logo and "Video decoder not found"
as shown is the attached 'video_decoder_not_found.png'
Camera model:
Model: AW-EU40WEJFirmware Version: V01.17 (latest)
Linux OS:
Debian 11Reproduction steps:
0. create an ndi_test folder# mkdir ~/ndi_test; cd ~/ndi_test
1. get the NDI5 Advanced SDK for linux: https://www.ndi.tv/sdk/#download
* fill the form, and download the archive (Install_NDI_Advanced_SDK_v5_Linux.tar.gz)
* from the ndi_test extract the archive:
Code:
tar -xzf /path/to/Install_NDI_Advanced_SDK_v5_Linux.tar.gz
Code:
sh Install_NDI_Advanced_SDK_v5_Linux.sh
2. get the libndihx lib for linux
* dowload it
Code:
curl -L -o libndihx.tgz "https://onedrive.live.com/download.aspx?cid=D5F67F9D8A6754B4&authKey=%21AM8jG3BG0OqAfP4&resid=D5F67F9D8A6754B4%213923&ithint=%2Egz"
Code:
tar -xzf libndihx.tgz
* run the install script and accept the EULA:
Code:
sh NDIHXDriverForLinux.sh
4. Setup you working env, to avoid cluttering the fs we will use library
locally with LD_LIBRARY_PATH:
Code:
export LD_LIBRARY_PATH=NDI\ Advanced\ SDK\ for\ Linux/lib/x86_64-linux-gnu:NDIHXDriverForLinux/x86_64-linux-gnu
3. build the `NDIlib_Recv_PNG` example, I choose this example as it is
minimalist and allow us to easily get grab an image, but the example need some
adjustment to be able to select the camera and also to skip audio frames
* Apply the here-attached patch:
Code:
patch -d NDI\ Advanced\ SDK\ for\ Linux -p0 < NDIlib_Recv_PNG.txt
Code:
make -C NDI\ Advanced\ SDK\ for\ Linux/examples/C++
Code:
NDI\ Advanced\ SDK\ for\ Linux/examples/C++/NDIlib_Recv_PNG/NDIlib_Recv_PNG "AW-UE40 (NDI_Device-000000000)"
If everything went well you shall see a `CoolNDIImage.png` created in the
current directory, and unfortunately this image does not show the camera view
but the "video decoder not found" static image
Notes:
* the same procedure work fine (I get a valid picture) with other NDI|HXdevices (Sony SRG-X400, kiloview E2, ...)
* also tested on NDI5 SDK with the same results
* I check that the libndi*.so are correctly used with `LD_DEBUG=libs NDI\
Advanced\ SDK\ for\ Linux/examples/C++/NDIlib_Recv_PNG/NDIlib_Recv_PNG
"AW-UE40 (NDI_Device-000000000)`
* Using GStreamer gst-plugin-ndi (https://github.com/teltek/gst-plugin-ndi) I
can reproduce the issue.
Code:
gst-launch-1.0 ndisrc ndi-name="AW-UE40 (NDI_Device-000000000)" ! ndisrcdemux name=ndi ndi.video ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! videoconvert ! autovideosink ndi.audio ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! fakesink --gst-debug=3 -v
* Using GStreamer gst-plugin-ndi built with advanced feature and choosing to
get compressed format I can have good image, which means that the camera is
not the root cause.
Code:
gst-launch-1.0 ndisrc ndi-name="AW-UE40 (NDI_Device-000000000)" color-format=compressed-v4 ! ndisrcdemux name=ndi ndi.video ! queue ! h264parse ! avdec_h264 ! videoconvert ! autovideosink ndi.audio ! queue leaky=upstream ! fakesink --gst-debug=3 -v
* when getting compressed through GST frame I get the following h264 format:
caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, stream-format=(string)byte-stream, alignment=(string)au, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)2:4:5:1, parsed=(boolean)true, profile=(string)high, level=(string)4`
From my understanding the issue seems to be in the libndi*.so library as I am
able to decode compressed frame and get the correct picture.
The camera is sending valid data, but it seems that libndi*.so does not
support this profile or detect an error and decide to not decode it.
The strange thing is that under the hood NDI rely on libavcodec for the
decoding of H264, which is also used with success in the Gstreamer compress
scenario.
A sample of an H264 stream sent by the camera and collected with the GST compressed scenario is available here: https://nextcloud.ubicast.net/s/p8PznZHsWkXEzb6 (not possible to attach h264 file to this forum)
I hope that some NDI tech could help me understanding what is going on, if you need more details feel free to ask.
Thanks for your help.