Cannot read Anafi Parrot stream using pdraw

I am using a Jetson AGX Orin on Jetpack 6. While connected by wifi to an Anafi Parrot. When running pdraw I see no errors of any kind but I get a black stream and success messages.

I am getting the following logs when running pdraw installed with the groundsdk :

 /home/janice/code/groundsdk-tools/out/groundsdk-linux/staging/native-wrapper.sh pdraw -u  rtsp://192.168.42.1/live
  ___ ___       ___      __
 | _ \   \ _ _ /_\ \    / /
 |  _/ |) | '_/ _ \ \/\/ /
 |_| |___/|_|/_/ \_\_/\_/

Parrot Drones Audio and Video Vector - desktop player application
Copyright (c) 2016 Aurelien Barre
Copyright (c) 2017 Parrot Drones SAS

Streaming from URL 'rtsp://192.168.42.1/live'

I pdraw_desktop: display #0 mode: 1920x1200 60Hz
I pdraw_session: state change to READY
I pdraw_elmt: StreamDemuxerNet#1: element state change to CREATED
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTING
I rtsp_client: connecting to address 192.168.42.1 port 554
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTING
I pdraw_desktop: socket_created_cb fd=28
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTED
I rtsp_client: client connected
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTED
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to CONNECTED
I rtsp_client: send RTSP request OPTIONS: cseq=1 session=-
I rtsp_client: response to RTSP request OPTIONS: status=200(OK) cseq=1 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_options_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to OPTIONS_DONE
I rtsp_client: send RTSP request DESCRIBE: cseq=2 session=-
I rtsp_client: response to RTSP request DESCRIBE: status=200(OK) cseq=2 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_describe_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
I pdraw_demuxer: StreamDemuxerNet#1: application selected media 1 (DefaultVideo)
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to DESCRIBE_DONE
W pdraw_dmxstrmnet: StreamDemuxerNet#1#front: failed to set rx buffer size: got 212992, expecting 1048576
I rtsp_client: send RTSP request SETUP: cseq=3 session=-
I pdraw_dmxstrm: StreamDemuxerNet#1: media 'front' not set up, setting up
I rtsp_client: response to RTSP request SETUP: status=200(OK) cseq=3 session=1fa2ada14c047098 req_status=OK
I rtsp_client: client session 1fa2ada14c047098 added
N pdraw_dmxstrm: EVT:STREAM;event='client_setup_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';session='1fa2ada14c047098';res='live';media='front';src='192.168.42.1:5004,5005';dst='0.0.0.0:55004,55005'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to SETUP_DONE
I rtsp_client: client session 1fa2ada14c047098 media 'live/front' added
I pdraw_desktop: open_resp_cb status=0(Success)
I pdraw_desktop: ready_to_play_cb ready=1
I rtsp_client: send RTSP request PLAY: cseq=4 session=1fa2ada14c047098
I rtsp_client: response to RTSP request PLAY: status=200(OK) cseq=4 session=1fa2ada14c047098 req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_play_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';session='1fa2ada14c047098';res='live';start_ts=0;stop_ts=0;rtp_ts=0;seq=0
I pdraw_desktop: play_resp_cb status=0(Success) timestamp=0 speed=1.000000
I rtsp_client: send RTSP request GET_PARAMETER: cseq=5 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=5 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=6 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=6 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=7 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=7 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=8 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=8 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=9 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=9 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=10 session=1fa2ada14c047098
I rtsp_client: response to RTSP request GET_PARAMETER: status=200(OK) cseq=10 session=1fa2ada14c047098 req_status=OK
I rtsp_client: send RTSP request GET_PARAMETER: cseq=11 session=1fa2ada14c047098

I also tried pdraw-vsink-test and I get the same behavior :

/home/janice/code/groundsdk-tools/out/groundsdk-linux/staging/native-wrapper.sh pdraw-vsink-test rtsp://192.168.42.1/live
I pdraw_session: state change to READY
I pdraw_elmt: StreamDemuxerNet#1: element state change to CREATED
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTING
I rtsp_client: connecting to address 192.168.42.1 port 554
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTING
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTED
I rtsp_client: client connected
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTED
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to CONNECTED
I rtsp_client: send RTSP request OPTIONS: cseq=1 session=-
I rtsp_client: response to RTSP request OPTIONS: status=200(OK) cseq=1 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_options_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to OPTIONS_DONE
I rtsp_client: send RTSP request DESCRIBE: cseq=2 session=-
I rtsp_client: response to RTSP request DESCRIBE: status=200(OK) cseq=2 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_describe_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
I pdraw_vsink: select_media_cb: selecting media 'DefaultVideo'
I pdraw_demuxer: StreamDemuxerNet#1: application selected media 1 (DefaultVideo)
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to DESCRIBE_DONE
W pdraw_dmxstrmnet: StreamDemuxerNet#1#front: failed to set rx buffer size: got 212992, expecting 1048576
I rtsp_client: send RTSP request SETUP: cseq=3 session=-
I pdraw_dmxstrm: StreamDemuxerNet#1: media 'front' not set up, setting up
I rtsp_client: response to RTSP request SETUP: status=200(OK) cseq=3 session=f4b2945a940e9775 req_status=OK
I rtsp_client: client session f4b2945a940e9775 added
N pdraw_dmxstrm: EVT:STREAM;event='client_setup_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';session='f4b2945a940e9775';res='live';media='front';src='192.168.42.1:5004,5005';dst='0.0.0.0:55004,55005'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to SETUP_DONE
I rtsp_client: client session f4b2945a940e9775 media 'live/front' added
I pdraw_vsink: open_resp_cb: status=0
I pdraw_vsink: ready_to_play_cb: ready=1
I rtsp_client: send RTSP request PLAY: cseq=4 session=f4b2945a940e9775
I rtsp_client: response to RTSP request PLAY: status=200(OK) cseq=4 session=f4b2945a940e9775 req_status=OK

I would like to be able to display my rtsp stream, and then link pdraw to a gstreamer appsrc while keeping the metadata. But I’m stuck at the first step : getting pdraw images. Any help would be greatly appreciated.

UPDATE :
Segfaulting when trying to read a simple mp4 file due to ffmpeg nvidia plugins that are missing. Shouldn’t the program fall back to CPU decoder when nvidia plugins are emissing ?

./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u /home/janice/work/vslam/vslam/3000M-8.5Mm.mp4 --hud 0

  ___ ___       ___      __
 | _ \   \ _ _ /_\ \    / /
 |  _/ |) | '_/ _ \ \/\/ /
 |_| |___/|_|/_/ \_\_/\_/

Parrot Drones Audio and Video Vector - desktop player application
Copyright (c) 2016 Aurelien Barre
Copyright (c) 2017 Parrot Drones SAS

Offline playing of file '/home/janice/work/vslam/vslam/3000M-8.5Mm.mp4'

I pdraw_desktop: display #0 mode: 1920x1200 60Hz
I pdraw_session: state change to READY
I pdraw_elmt: RecordDemuxer#1: element state change to CREATED
I pdraw_elmt: RecordDemuxer#1: element state change to STARTING
I pdraw_demuxer: RecordDemuxer#1: application selected media 1 (VideoHandler)
I pdraw_source: RecordDemuxer#1: add port for media name=CodedVideoMedia#1
I pdraw_source: RecordDemuxer#1: add port for media name=CodedVideoMedia#2
I pdraw_elmt: VideoDecoder#2: element state change to CREATED
E pdraw_sink: VideoDecoder#2: coded video media format H264/AVCC not supported
I pdraw_elmt: VideoDecoder#2: element DESTROYED
I pdraw_desktop: media_added_cb id=1 path=RecordDemuxer#1$CodedVideoMedia#1
I pdraw_elmt: VideoDecoder#3: element state change to CREATED
I pdraw_sink: VideoDecoder#3: link media name=CodedVideoMedia#2
I pdraw_elmt: VideoDecoder#3: element state change to STARTING
I vdec_ffmpeg: 01: ffmpeg implementation - libavcodec version=60.3.100 - using H264 NVDEC HW decoding
I vdec: 01: dimensions: width=1280 height=1024 SAR=1:1
I vdec: 01: crop: left=0 top=0 width=1280 height=1024
I vdec: 01: declared framerate: 90000/1 -> 90000.000 fps
I vdec: 01: 8 bits, color primaries: BT709, transfer function: BT709, matrix coefficients: BT709, full range: 0
I pdraw_elmt: VideoDecoder#3: element state change to STARTED
I pdraw_source: RecordDemuxer#1: link media name=CodedVideoMedia#2 (channel owner=0xffff91c59ca8)
I pdraw_desktop: media_added_cb id=2 path=RecordDemuxer#1$CodedVideoMedia#2
I pdraw_dmxrec: RecordDemuxer#1: media 'VideoHandler' not set up, setting up
I pdraw_dmxrec: RecordDemuxer#1: select RecordDemuxer#1#track#1 as ref media
I pdraw_elmt: RecordDemuxer#1: element state change to STARTED
I pdraw_desktop: open_resp_cb status=0(Success)
I pdraw_desktop: ready_to_play_cb ready=1
I pdraw_elmt: VideoDecoder#3: element flushing state change to UNFLUSHED
I pdraw_elmt: RecordDemuxer#1: element flushing state change to UNFLUSHED
I vdec_ffmpeg: 01: frame is a sync point
I pdraw_desktop: play_resp_cb status=0(Success) timestamp=0 speed=1.000000
E vdec_ffmpeg: av: Cannot load libnvcuvid.so.1
E vdec_ffmpeg: av: Failed loading nvcuvid.
E vdec_ffmpeg: av: Failed setup for format cuda: hwaccel initialisation returned error.
[1]    24591 segmentation fault (core dumped)  ./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u  --hud 0

Hi,

Thanks for sending the PDrAW logs. From what I can see, the RTSP channel seems to be working correctly, but no frames are being received on the RTP channel.
I suspect this might be caused by a firewall. Could you please try disabling your firewall and test again?

Regarding the crash, you can build PDrAW without hardware decoding support by disabling the following option in the product configuration. To do so, please run:

./build.sh -p groundsdk-linux -A xconfig

Then search for “ffmpeg” and disable the “enable NVCODEC hardware acceleration” option.
Next, rebuild PDrAW:

./build.sh -p groundsdk-linux -t build -j-3

This will use the FFMPEG software decoder instead, which should work fine.

Best regards,

Mathieu

xconfig does not seem to work:

./build.sh -p groundsdk-linux -A xconfig
[I] Starting task 'alchemy' with args: xconfig
[I] In '/home/janice/code/groundsdk-tools': ALCHEMY_TARGET_CONFIG_DIR="/home/janice/code/groundsdk-tools/products/groundsdk/linux/config" ALCHEMY_TARGET_OUT="/home/janice/code/groundsdk-tools/out/groundsdk-linux" ALCHEMY_TARGET_PRODUCT="groundsdk" ALCHEMY_TARGET_PRODUCT_VARIANT="linux" ALCHEMY_TARGET_SCAN_ADD_DIRS=" /home/janice/code/groundsdk-tools/packages" ALCHEMY_TARGET_SCAN_PRUNE_DIRS=" /home/janice/code/groundsdk-tools" ALCHEMY_USE_COLORS="1" ALCHEMY_WORKSPACE_DIR="/home/janice/code/groundsdk-tools" PARROT_BUILD_PROP_GROUP="drones" PARROT_BUILD_PROP_PRODUCT="groundsdk" PARROT_BUILD_PROP_PROJECT="groundsdk" PARROT_BUILD_PROP_UID="groundsdk-linux-20251013-1441-0.0.0" PARROT_BUILD_PROP_VARIANT="linux" PARROT_BUILD_PROP_VERSION="0.0.0" /home/janice/code/groundsdk-tools/build/alchemy/scripts/alchemake -j 1 xconfig
----------------------------------------------------------------------
+ ALCHEMY_WORKSPACE_DIR = /home/janice/code/groundsdk-tools
+ TARGET_PRODUCT = groundsdk
+ TARGET_PRODUCT_VARIANT = linux
+ TARGET_OS = linux
+ TARGET_OS_FLAVOUR = native
+ TARGET_LIBC = native
+ TARGET_ARCH = aarch64
+ TARGET_CPU =
+ TARGET_OUT = /home/janice/code/groundsdk-tools/out/groundsdk-linux
+ TARGET_CONFIG_DIR = /home/janice/code/groundsdk-tools/products/groundsdk/linux/config
+ TARGET_CC_PATH = /usr/bin/cc
+ TARGET_CC_VERSION = 11
----------------------------------------------------------------------
Scanning /home/janice/code/groundsdk-tools/packages for makefiles...
Found 62 makefiles
Prebuilt module json marked as overriden
Prebuilt module libcrypto marked as overriden
/home/janice/code/groundsdk-tools/packages/protobuf/atom.mk: defining unknown LOCAL variable LOCAL_EXPORT_FILES
Found 207 modules
Computing modules dependencies...
Generating rules...
Processing rules...
/bin/sh: 1: /home/janice/code/groundsdk-tools/build/alchemy/scripts/../kconfig/bin-linux-aarch64/qconf: not found
[E] /home/janice/code/groundsdk-tools/build/alchemy/scripts/../kconfig/bin-linux-aarch64/qconf /tmp/tmpd1caz_54.alchemy failed with status 127
[I] Finished task 'alchemy'

Regarding the firewall I believe I checked the tcpdump of port 5004 & 5005 and I was indeed receiving packets. I also managed to get a stream going using ffplay & gstreamer. I completely shut down ufw & now when I launch pdraw I am getting a segfault just like the mp4 :

./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u rtsp://192.168.42.1/live
  ___ ___       ___      __
 | _ \   \ _ _ /_\ \    / /
 |  _/ |) | '_/ _ \ \/\/ /
 |_| |___/|_|/_/ \_\_/\_/

Parrot Drones Audio and Video Vector - desktop player application
Copyright (c) 2016 Aurelien Barre
Copyright (c) 2017 Parrot Drones SAS

Streaming from URL 'rtsp://192.168.42.1/live'

I pdraw_desktop: display #0 mode: 1920x1200 60Hz
I pdraw_session: state change to READY
I pdraw_elmt: StreamDemuxerNet#1: element state change to CREATED
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTING
I rtsp_client: connecting to address 192.168.42.1 port 554
D rtsp_client: connection_state: DISCONNECTED to CONNECTING
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTING
I pdraw_desktop: socket_created_cb fd=28
I pdraw_elmt: StreamDemuxerNet#1: element state change to STARTED
I rtsp_client: client connected
D rtsp_client: connection_state: CONNECTING to CONNECTED
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP client CONNECTED
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to CONNECTED
I rtsp_client: send RTSP request OPTIONS: cseq=1 session=-
I rtsp_client: response to RTSP request OPTIONS: status=200(OK) cseq=1 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_options_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to OPTIONS_DONE
I rtsp_client: send RTSP request DESCRIBE: cseq=2 session=-
I rtsp_client: response to RTSP request DESCRIBE: status=200(OK) cseq=2 session=- req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_describe_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';res='live'
D sdp: SDP: username=- sess_id=3315918477993992370 sess_version=1 nettype=IN addrtype=IP4 unicast_address=192.168.42.1
D sdp: SDP: session name=live
D sdp: SDP: session info=ANAFI-F131431
D sdp: SDP: nettype=IN addrtype=IP4 connection_address=0.0.0.0
D sdp: SDP: start_time=0stop_time=0
D sdp: SDP: media=video port=0 proto=RTP/AVP payload_type=96
D sdp: SDP: media title=DefaultVideo
D sdp: SDP: payload_type=96 encoding_name=H264 clock_rate=90000 encoding_params=(null)
I pdraw_demuxer: StreamDemuxerNet#1: application selected media 1 (DefaultVideo)
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to DESCRIBE_DONE
D tskt_impl: fd=33 local 0.0.0.0:55004 remote 192.168.42.1:0
D tskt_impl: fd=34 local 0.0.0.0:55005 remote 192.168.42.1:0
I rtsp_client: send RTSP request SETUP: cseq=3 session=-
I pdraw_dmxstrm: StreamDemuxerNet#1: media 'front' not set up, setting up
I rtsp_client: response to RTSP request SETUP: status=200(OK) cseq=3 session=c8ea6e0df4f0dd3f req_status=OK
I rtsp_client: client session c8ea6e0df4f0dd3f added
D tskt_impl: fd=33 local 0.0.0.0:55004 remote 192.168.42.1:5004
D tskt_impl: fd=34 local 0.0.0.0:55005 remote 192.168.42.1:5005
D pdraw_dmxstrmnet: StreamDemuxerNet#1#front: startRtpAvp localStreamPort=55004 localControlPort=55005
N pdraw_dmxstrm: EVT:STREAM;event='client_setup_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';session='c8ea6e0df4f0dd3f';res='live';media='front';src='192.168.42.1:5004,5005';dst='0.0.0.0:55004,55005'
I pdraw_dmxstrm: StreamDemuxerNet#1: RTSP state change to SETUP_DONE
I rtsp_client: client session c8ea6e0df4f0dd3f media 'live/front' added
I pdraw_desktop: open_resp_cb status=0(Success)
I pdraw_desktop: ready_to_play_cb ready=1
I rtsp_client: send RTSP request PLAY: cseq=4 session=c8ea6e0df4f0dd3f
I rtsp_client: response to RTSP request PLAY: status=200(OK) cseq=4 session=c8ea6e0df4f0dd3f req_status=OK
N pdraw_dmxstrm: EVT:STREAM;event='client_play_resp';element='StreamDemuxerNet#1';status=0;status_str='Success';session='c8ea6e0df4f0dd3f';res='live';start_ts=0;stop_ts=0;rtp_ts=0;seq=0
I pdraw_desktop: play_resp_cb status=0(Success) timestamp=0 speed=1.000000
I vstrm: receiver: init_source: ssrc=0x606a706c seq=0
I vstrm: receiver: init_seq: seq=0 (keep_ps: 0)
D vstrm: rtp_h264: waiting for sps/pps: dropping frame
D vstrm: rtp_h264: waiting for sps/pps: dropping frame
D pdraw_dmxstrm: StreamDemuxerNet#1#front: codec info changed
I pdraw_dmxstrm: StreamDemuxerNet#1#front: new output media
I pdraw_source: StreamDemuxerNet#1: add port for media name=CodedVideoMedia#1
I pdraw_source: StreamDemuxerNet#1: add port for media name=CodedVideoMedia#2
D pdraw_session: onOutputMediaAdded(raw) name=CodedVideoMedia#1
I pdraw_elmt: VideoDecoder#2: element state change to CREATED
E pdraw_sink: VideoDecoder#2: coded video media format H264/AVCC not supported
I pdraw_elmt: VideoDecoder#2: element DESTROYED
I pdraw_desktop: media_added_cb id=1 path=StreamDemuxerNet#1$CodedVideoMedia#1
D pdraw_session: onOutputMediaAdded(raw) name=CodedVideoMedia#2
I pdraw_elmt: VideoDecoder#3: element state change to CREATED
I pdraw_sink: VideoDecoder#3: link media name=CodedVideoMedia#2
I pdraw_elmt: VideoDecoder#3: element state change to STARTING
I vdec_ffmpeg: 01: ffmpeg implementation - libavcodec version=60.3.100 - using H264 NVDEC HW decoding
I vdec: 01: dimensions: width=1280 height=720 SAR=1:1
I vdec: 01: crop: left=0 top=0 width=1280 height=720
I vdec: 01: declared framerate: 30000/1001 -> 29.970 fps
I vdec: 01: 8 bits, color primaries: BT709, transfer function: BT709, matrix coefficients: BT709, full range: 0
I vdec: 01: declared NAL bitrate: 4999168 bit/s (CPB size 4999936 bits)
I vdec: 01: declared VCL bitrate: 4999168 bit/s (CPB size 4999936 bits)
I pdraw_elmt: VideoDecoder#3: element state change to STARTED
I pdraw_source: StreamDemuxerNet#1: link media name=CodedVideoMedia#2 (channel owner=0xffffae7be468)
D pdraw_vdec: VideoDecoder#3: resync: decoder is already flushed, nothing to do
I pdraw_desktop: media_added_cb id=2 path=StreamDemuxerNet#1$CodedVideoMedia#2
I pdraw_elmt: VideoDecoder#3: element flushing state change to UNFLUSHED
I pdraw_elmt: StreamDemuxerNet#1: element flushing state change to UNFLUSHED
I vdec_ffmpeg: 01: frame is not an IDR, generating grey IDR
D vstrm: clock_delta: null originate timestamp
D pdraw_dmxstrm: StreamDemuxerNet#1#front: session metadata changed
D pdraw_sink: VideoDecoder#3: channel downstream event SESSION_META_UPDATE
E pdraw_vdec: VideoDecoder#3: onChannelSessionMetaUpdate: output media not found
E vdec_ffmpeg: av: Cannot load libnvcuvid.so.1
E vdec_ffmpeg: av: Failed loading nvcuvid.
E vdec_ffmpeg: av: Failed setup for format cuda: hwaccel initialisation returned error.
D vdec_ffmpeg: av: Reinit context to 1280x720, pix_fmt: yuv420p
[1]    125613 segmentation fault (core dumped)  ./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u

I managed to make it work using the following atom.mk within the ffmpeg package :

LOCAL_PATH := $(call my-dir)

ifeq ("$(TARGET_OS_FLAVOUR)","native")
  # Optional prebuilt package: OpenH264 prebuilt binaries
  $(call register-prebuilt-pkg-config-module,libopenh264,openh264)
endif

include $(CLEAR_VARS)

LOCAL_MODULE := ffmpeg-libav
LOCAL_CATEGORY_PATH := multimedia/ffmpeg
LOCAL_DESCRIPTION := Cross-platform tools and libraries to convert, manipulate and stream a wide range of multimedia formats and protocols

LOCAL_CONFIG_FILES := aconfig.in
$(call load-config)

ifeq ("$(TARGET_ARCH)","x64")
  LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --arch="x86_64"
else
  LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --arch="$(TARGET_ARCH)"
endif

# Main compilation options
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-shared \
	--enable-cross-compile \
	--enable-optimizations \
	--cross-prefix="$(TARGET_CROSS)" \
	--cc=$(TARGET_CC) \
	--cxx=$(TARGET_CXX)

ifeq ("$(TARGET_OS)","windows")
  ifeq ("$(TARGET_ARCH)","x86")
    LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --target-os="mingw32"
  else ifeq ("$(TARGET_ARCH)","x64")
    LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --target-os="mingw64"
  endif
else
  LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --target-os="$(TARGET_OS)"
endif

# on x86_*, nasm is expected
ffmpeg_use_nasm := $(if $(filter $(TARGET_ARCH),x86 x64),1,0)
ifeq ("$(ffmpeg_use_nasm)","1")
  LOCAL_DEPENDS_HOST_MODULES := host.nasm
else
  LOCAL_AUTOTOOLS_CONFIGURE_ARGS += --disable-x86asm
endif

# ----------------------------------------------------------------------
# NVCODEC (NVDEC/NVENC/CUDA) HARD DISABLE
# ----------------------------------------------------------------------
# Even if ffnvcodec headers exist on the host, force ffmpeg to build
# without nvdec/cuvid/cuda/nvenc so runtime never tries NV hw accel.
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--disable-nvdec \
	--disable-cuvid \
	--disable-cuda \
	--disable-nvenc

# (Keep the old optional NVCODEC block commented out; we do not register
# ffnvcodec nor enable any NV* features.)
# Optional NVCODEC HW encoding/decoding support: use the nvidia headers
# LOCAL_CONDITIONAL_LIBRARIES := \
# 	CONFIG_FFMPEG_ENABLE_NVCODEC:ffnvcodec
# ifdef CONFIG_FFMPEG_ENABLE_NVCODEC
# LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
# 	--enable-nvdec \
# 	--enable-nvenc
# endif

# Optional OpenH264 encoding support
ffmpeg_has_openh264 := $(call is-module-in-build-config,libopenh264)
ifneq ("$(ffmpeg_has_openh264)","")
LOCAL_CONDITIONAL_LIBRARIES := \
	CONFIG_FFMPEG_ENABLE_OPENH264:libopenh264
ifdef CONFIG_FFMPEG_ENABLE_OPENH264
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-libopenh264
endif
endif

# Components options
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--disable-orc \
	--disable-avconv \
	--disable-avplay \
	--disable-avprobe \
	--disable-avserver \
	--disable-avdevice \
	--disable-avresample \
	--disable-filters \
	--disable-bzlib \
	--disable-stripping

# Licensing options
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--disable-gpl \
	--disable-version3 \
	--disable-nonfree

# User selected components
#
# By default all decoders/encoders/parsers/muxers/demuxers are disabled to
# reduce the compilation time.
# When a user needs a specific component a new configuration should be added
# to 'aconfig.in' and an entry should be added in this section
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--disable-all \
	--disable-everything

ifdef CONFIG_FFMPEG_HEVC_DECODING
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec \
	--enable-decoder=hevc
# (NVDEC hwaccel explicitly not enabled)
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil
endif

ifdef CONFIG_FFMPEG_AVC_DECODING
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec \
	--enable-decoder=h264
# (NVDEC hwaccel explicitly not enabled)
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil
endif

ifdef CONFIG_FFMPEG_HEVC_ENCODING
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec
# (NVENC encoder explicitly not enabled)
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil
endif

ifdef CONFIG_FFMPEG_AVC_ENCODING
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec
# (NVENC encoder explicitly not enabled)
ifneq ("$(ffmpeg_has_openh264)","")
ifdef CONFIG_FFMPEG_ENABLE_OPENH264
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-encoder=libopenh264
endif
endif
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil
endif

ifdef CONFIG_FFMPEG_AAC_ENCODING
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec \
	--enable-encoder=aac
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil
endif

ifdef CONFIG_FFMPEG_MOV_FORMAT
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avformat \
	--enable-demuxer=mov \
	--enable-muxer=mov
endif

ifdef CONFIG_FFMPEG_PROGRAMS
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-avcodec \
	--enable-avfilter \
	--enable-avformat \
	--enable-swresample \
	--enable-swscale \
	--enable-ffmpeg \
	--enable-ffplay \
	--enable-ffprobe \
	--enable-protocol=file \
	--enable-demuxer=h264 \
	--enable-muxer=h264 \
	--enable-parser=h264 \
	--enable-demuxer=mov \
	--enable-muxer=mp4
LOCAL_EXPORT_LDLIBS += \
	-lavcodec \
	-lavutil \
	-lavformat \
	-lavfilter \
	-lswresample \
	-lswscale
else
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--disable-programs
endif

ifdef CONFIG_FFMPEG_ENABLE_VDPAU
LOCAL_AUTOTOOLS_CONFIGURE_ARGS += \
	--enable-vdpau \
	--enable-decoder=h264_vdpau
endif

# License check (shall be the last rule)
ifneq (,$(filter --enable-nonfree --enable-version3 --enable-nonfree, \
	$(LOCAL_AUTOTOOLS_CONFIGURE_ARGS)))
$(warning some options: "$(filter --enable-nonfree --enable-version3 \
	--enable-nonfree, $(LOCAL_AUTOTOOLS_CONFIGURE_ARGS))" \
	are not compatible with a release)
endif

LOCAL_LIBRARIES := zlib

define LOCAL_AUTOTOOLS_CMD_POST_INSTALL
	@rm -rf $(TARGET_OUT_STAGING)/usr/share/ffmpeg
endef

include $(BUILD_AUTOTOOLS)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.