The nvv4l2h264enc has a problem when sending a rtmp stream to vimeo.com, WowzaStreamingEngine-4.8.12+1 server using a transcoder or some other rtmp platforms.
But with x264enc had no problem So I made and dumped the encoded files to compare between nvv4l2h264enc and x264enc.
A difference of two plugins was “nominal bitrate” and the encoded file by nvv4l2h264enc had no bitrate value.
Is there anyway to set “nominal bitrate” in audio and video?
filedump with x264enc
$ gst-launch-1.0 -e -v \
flvmux name=mux streamable=true latency=100000000 \
! filesink location=x264.flv \
videotestsrc num-buffers=1000 \
! "video/x-raw ,width=(int)640 ,height=(int)360 ,framerate=(fraction)30/1, format=(string)NV12" \
! x264enc \
! h264parse \
! mux. \
audiotestsrc num-buffers=1000 \
! "audio/x-raw,format=(string)S32LE,rate=48000,channels=2" \
! audiorate \
! queue \
! audioconvert \
! voaacenc \
! aacparse \
! mux.
$ gst-discoverer-1.0 -v x264.flv
Analyzing file:///home/aile/x264.flv
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Done discovering file:///home/aile/x264.flv
Topology:
container: video/x-flv
audio: audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)48000, channels=(int)2, codec_data=(buffer)1190, level=(string)2, base-profile=(string)lc, profile=(string)lc
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:18Z
video codec: H.264
audio codec: MPEG-4 AAC
nominal bitrate: 0
Codec:
audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)48000, channels=(int)2, codec_data=(buffer)1190, level=(string)2, base-profile=(string)lc, profile=(string)lc
Additional info:
None
Stream ID: 15f8ddece27f1b7e75f5ef82441eb3381b643d66b82791ec7a8c32e0be455d85/audio
Language: <unknown>
Channels: 2 (front-left, front-right)
Sample rate: 48000
Depth: 32
Bitrate: 0
Max bitrate: 0
video: video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)640, height=(int)360, framerate=(fraction)30/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:18Z
video codec: H.264
nominal bitrate: 2097152
audio codec: MPEG-4 AAC
Codec:
video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)640, height=(int)360, framerate=(fraction)30/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3
Additional info:
None
Stream ID: 15f8ddece27f1b7e75f5ef82441eb3381b643d66b82791ec7a8c32e0be455d85/video
Width: 640
Height: 360
Depth: 24
Frame rate: 30/1
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 2097152
Max bitrate: 0
Properties:
Duration: 0:00:33.233000000
Seekable: yes
Live: no
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:18Z
video codec: H.264
audio codec: MPEG-4 AAC
nominal bitrate: 0
filedump with nvv4l2h264enc
$ gst-launch-1.0 -e -v \
flvmux name=mux streamable=true latency=100000000 \
! filesink location=h264.flv \
videotestsrc num-buffers=1000 \
! "video/x-raw ,width=(int)640 ,height=(int)360 ,framerate=(fraction)30/1, format=(string)NV12" \
! nvvidconv ! nvv4l2h264enc profile=4 bitrate=2000000 insert-vui=true insert-aud=true \
! h264parse \
! mux. \
audiotestsrc num-buffers=1000 \
! "audio/x-raw,format=(string)S32LE,rate=48000,channels=2" \
! audiorate \
! queue \
! audioconvert \
! voaacenc \
! aacparse \
! mux.
$ gst-discoverer-1.0 -v h264.flv
Analyzing file:///home/aile/h264.flv
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Done discovering file:///home/aile/h264.flv
Topology:
container: video/x-flv
audio: audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)48000, channels=(int)2, codec_data=(buffer)1190, level=(string)2, base-profile=(string)lc, profile=(string)lc
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:31Z
video codec: H.264
audio codec: MPEG-4 AAC
nominal bitrate: 0
Codec:
audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)48000, channels=(int)2, codec_data=(buffer)1190, level=(string)2, base-profile=(string)lc, profile=(string)lc
Additional info:
None
Stream ID: 71f87fc66c2230d8e68c6737aec2cf46759d969b01b97835f3c698470f476cc3/audio
Language: <unknown>
Channels: 2 (front-left, front-right)
Sample rate: 48000
Depth: 32
Bitrate: 0
Max bitrate: 0
video: video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)640, height=(int)360, framerate=(fraction)30/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:31Z
video codec: H.264
nominal bitrate: 0
audio codec: MPEG-4 AAC
Codec:
video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)640, height=(int)360, framerate=(fraction)30/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3
Additional info:
None
Stream ID: 71f87fc66c2230d8e68c6737aec2cf46759d969b01b97835f3c698470f476cc3/video
Width: 640
Height: 360
Depth: 24
Frame rate: 30/1
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 0
Max bitrate: 0
Properties:
Duration: 0:00:33.300000000
Seekable: yes
Live: no
Tags:
encoder: GStreamer 1.14.5 FLV muxer
datetime: 2021-10-14T02:45:31Z
video codec: H.264
audio codec: MPEG-4 AAC
nominal bitrate: 0