Hi
When I use the GStreamer or Multimedia API to encode h265 and write it as a file,
Then use Streameye to analyze the stream, and find that vps does not enable vps_timing_info_present_flag, vui does not enable timing_info_present_flag,
This will cause compatibility problems with other software, because there will be no frame rate information. Can I set it to enable it?
thanks!
Hi,
We have enabled it in r28.3 and r32.1 . Please give it a try.
For r32.1, please refer to #6
I use jetpack 4.2.
below is my nv tegra release info
R32 (release), REVISION: 1.0, GCID: 14531094, BOARD: t186ref, EABI: aarch64, DATE: Wed Mar 13 07:41:08 UTC 2019
my multimedia api command :
./video_encode file.yuv 1920 1080 H265 out.265 -hpt 1 --insert-spspps-idr --copy-timestamp 0 -fps 60 1 -br 10000000
my gstreamer command :
gst-launch-1.0 videotestsrc num-buffers=300 ! ‘video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)60/1’ ! omxh265enc bitrate=10000000 ! ‘video/x-h265, stream-format=(string)byte-stream’ ! filesink location=out_g.265
do you have any advice ?
Thanks!
Hi,
Do you set ‘–insert-vui’ ?
Yes, after insert --insert-yuv, i can see timing_info_present_flag is enabled by Streameye,
but I use ffprobe to check, the frame rate is still wrong, and a lot of error message will occure,
[hevc @ 0x5596cbbe50] Error parsing NAL unit #0 .
[hevc @ 0x5596cbbe50] PPS id out of range: 0
…
…
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 25 tbc
[STREAM]
index=0
codec_name=hevc
codec_long_name=H.265 / HEVC (High Efficiency Video Coding)
profile=Main
codec_type=video
codec_time_base=1/25
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
and vps is still not enabled vps_timing_info_present_flag.
do you have any advice ?
Thanks!
Hi,
Please try attachment. We have verified below commands:
01_video_encode$ ./video_encode a.yuv 1920 1080 H265 out1.265 --insert-vui -fps 10 1
$ ffprobe ~/out1.265
ffprobe version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, hevc, from '/home/nvidia/out1.265':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 10 fps, 10 tbr, 1200k tbn, 10 tbc
The information is in VUI and not in VPS.
r32_1_libnvtvmr.zip (262 KB)
Great!
It is working now,
Thanks
Hello DaneLLL
mmapi is ok now,
but use GStreamer and omxh265enc, the issue still occurs
Hi,
Do you set ‘insert-vui=true’ in gstreamer pipeline?
Yes,
use ffprobe to check to see a lot of error message and frame rate worng.
Hi,
Please try nvv4l2h265enc
$ gst-launch-1.0 videotestsrc num-buffers=60 ! video/x-raw,width=1920,height=1080,framerate=13/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h265enc insert-vui=1 ! filesink location=out.265
DaneLLL:
Hi,
Please try nvv4l2h265enc
$ gst-launch-1.0 videotestsrc num-buffers=60 ! video/x-raw,width=1920,height=1080,framerate=13/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h265enc insert-vui=1 ! filesink location=out.265
I have used nvv4l2h265enc before, it works fine.
so after that, is it recommended to use nvv4l2h265enc?
Hi,
It works fine if you put a muxer:
$ gst-launch-1.0 videotestsrc num-buffers=60 ! video/x-raw,width=1920,height=1080,framerate=13/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh265enc insert-vui=1 ! video/x-h265,stream-format=byte-stream ! h265parse ! matroskamux ! filesink location=a.mkv
But if you need raw h265 stream which can be correctly parsed by ffprobe, please use nvv4l2h265enc.
DaneLLL:
Hi,
It works fine if you put a muxer:
$ gst-launch-1.0 videotestsrc num-buffers=60 ! video/x-raw,width=1920,height=1080,framerate=13/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh265enc insert-vui=1 ! video/x-h265,stream-format=byte-stream ! h265parse ! matroskamux ! filesink location=a.mkv
But if you need raw h265 stream which can be correctly parsed by ffprobe, please use nvv4l2h265enc.
Hi, DaneLLL,
Have a question about omxh265enc and nvv4l2h265enc which performance is better
Hi,
Since HW engine is the same, it should be with same performance.