multimedia api video encode issues

Hi,

I use tegra_multimedia_api/samples/01_video_encode to encode H.264 & H.265 stream, here are the commands:
ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/01_video_encode$ ./video_encode ShakeNDry_3840x2160.yuv 3840 2160 H264 ShakeNDry_3840x2160_CQP20_high.h264 -p high --insert-spspps-idr -ifi 10000 -idri 10000 -fps 30 1 -MinQpI 20 -MaxQpI 20 -MinQpP 20 -MaxQpP 20
Failed to query video capabilities: Bad address

NvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
===== MSENC blits (mode: 1) into tiled surfaces =====
Could not read complete frame from input file
File read complete.
App run was successful

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/01_video_encode$ ./video_encode ShakeNDry_3840x2160.yuv 3840 2160 H265 ShakeNDry_3840x2160_CQP20.h265 --insert-spspps-idr -ifi 10000 -idri 10000 -fps 30 1 -MinQpI 20 -MaxQpI 20 -MinQpP 20 -MaxQpP 20
Failed to query video capabilities: Bad address

NvMMLiteOpen : Block : BlockType = 8
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
892744264
842091865
===== NVENC blits (mode: 1) into block linear surfaces =====
Could not read complete frame from input file
File read complete.
App run was successful

I have three questions:

  1. what does “Failed to query video capabilities: Bad address” mean?
  2. After I get encoded stream, I try to use Elecard StreamEye to open ShakeNDry_3840x2160_CQP20_high.h264, but failed, however i can open *.h264 files if the encoder profile set baseline and main.
  3. if i use FFMpeg to decode ShakeNDry_3840x2160_CQP20_high.h264, it’s OK, but to decode ShakeNDry_3840x2160_CQP20.h265, ffmpeg shows the following logs, how can i use ffmpeg to decode *.h265 file successfully? is the command wrong?

C:\Users\x00402020>D:\doc\Adoc\nvidia_tx2\CQP\ffmpeg.exe -y -loglevel debug -i D
:\doc\Adoc\nvidia_tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.h265 D:\doc\Adoc\nvidia_
tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.yuv
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 15 2014 20:42:23 with gcc 4.6 (GCC)
configuration: --prefix=/home/kikee/ffmpeg-32/ --enable-cross-compile --cross-
prefix=i686-w64-mingw32- --arch=i686 --target-os=mingw32 --sysroot=/usr/i686-w64
-mingw32/ --extra-cflags=‘-I/usr/i686-w64-mingw32/include -static’ --extra-ldfla
gs=‘-I/usr/i686-w64-mingw32/lib -static’ --extra-libs=‘-lxml2 -lexpat’ --enable-
zlib --enable-bzlib --enable-gpl --enable-static --disable-shared --disable-doc
–enable-libmp3lame --enable-libvorbis --enable-libspeex --enable-libtheora --en
able-libxvid --enable-libx264 --enable-libvpx --enable-version3 --enable-postpro
c --enable-runtime-cpudetect --enable-libvo-amrwbenc --enable-libopencore-amrnb
–enable-libopencore-amrwb --enable-libvo-aacenc
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option ‘-y’ … matched as option ‘y’ (overwrite output files) with argu
ment ‘1’.
Reading option ‘-loglevel’ … matched as option ‘loglevel’ (set logging level)
with argument ‘debug’.
Reading option ‘-i’ … matched as input file with argument ‘D:\doc\Adoc\nvidia_
tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.h265’.
Reading option ‘D:\doc\Adoc\nvidia_tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.yuv’ …
. matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file D:\doc\Adoc\nvidia_tx2\CQP\ShakeNDry_3840
x2160_CQP20_SPS.h265.
Successfully parsed a group of options.
Opening an input file: D:\doc\Adoc\nvidia_tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.
h265.
[hevc @ 008DF0A0] Format hevc probed with size=2048 and score=51
[hevc @ 008DF0A0] File position before avformat_find_stream_info() is 0
[hevc @ 008DFA80] Decoding VPS
[hevc @ 008DFA80] Decoding SPS
[hevc @ 008DFA80] Decoding PPS
[hevc @ 008DFA80] nal_unit_type: 32, nuh_layer_id: 0temporal_id: 0
[hevc @ 008DFA80] nal_unit_type: 33, nuh_layer_id: 0temporal_id: 0
[hevc @ 008DFA80] nal_unit_type: 34, nuh_layer_id: 0temporal_id: 0
[hevc @ 008DFA80] nal_unit_type: 19, nuh_layer_id: 0temporal_id: 0
[hevc @ 008DFA80] No start code is found.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DFA80] nal_unit_type: 1, nuh_layer_id: 0temporal_id: 0
Last message repeated 1 times
[hevc @ 008DFA80] PPS id out of range: 0
[hevc @ 008DFA80] Error parsing NAL unit #0.
[hevc @ 008DF0A0] Probe buffer size limit of 5000000 bytes reached
[hevc @ 008DF0A0] decoding for stream 0 failed
[hevc @ 008DF0A0] Could not find codec parameters for stream 0 (Video: hevc): un
specified size
Consider increasing the value for the ‘analyzeduration’ and ‘probesize’ options
[hevc @ 008DF0A0] File position after avformat_find_stream_info() is 5539840
D:\doc\Adoc\nvidia_tx2\CQP\ShakeNDry_3840x2160_CQP20_SPS.h265: could not find co
dec parameters
[AVIOContext @ 008DF740] Statistics: 5570560 bytes read, 0 seeks

Hi Yugui,
For 1, it is harmless.
For 2 and 3, it is about 3rd party implementation, wish other users can share experience. Please also try to decode via 00_video_decode