4k (3840 x 2160, H265) live transcode to H.264

  • I need to transcode 4k (3840 x 2160, H265, 20MBit ) live signal ( UDP source) to H.264 (1920x1080) MPEG-TS with Jetson Nano. The source has only video stream for simplicity. I use the following pipeline for that:

gst-launch-1.0 udpsrc uri=udp://239.192.11.111:1234 ! tsdemux ! queue ! h265parse ! nvv4l2decoder ! queue ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080’ ! nvv4l2h264enc insert-vui=1 insert-sps-pps=1 insert-aud=1 maxperf-enable=1 bitrate=8000000 profile=0 ! queue ! mpegtsmux ! udpsink host=239.192.11.199 port=1234 sync=true

The result at the receiver - big fluctuation of bitrate, pixeling (frame lose). If I change the source to H.264 (1920x1080), output video looks good, bitrate is stable. Here is the picture of bitrates:
1st part is FullHD H.264 => H.264,
2nd part - 4k H.265 => H.264:
bitrates

I tried the same 4k content to play from file (filesrc) - output picture is good. So I think, this is the problem with synchronization between input and output.
I also tried add various “max-size-buffers” into queue - no influence.

What else could be added to the pipeline to get good 4k transcoded picture in the output?

  • Another question - only a Baseline profile of encoder shows video. If I change the profile to Main or High - none of players (streamXpert, VLC) plays. Why?

Hi,
You may run in CBR and set virtual buffer size for a try. Please refer to
Random blockiness in the picture RTSP server-client -Jetson TX2 - #5 by DaneLLL

Not sure why only Baseline works for 3rd players. You may try to decode the stream by running gst-launch-1.0 command. There are sample commands in
Jetson 4k Encoding -> Decoding Pipeline and latency - #11 by DaneLLL

Thanks,
The key was “udpsink sync=false”, and I changed the udpsrc into urisourcebin. Also added vbv-size. Now it works.

But there is still a problem with high profile. It looks like a player does not receive some kind of headers about it?
If the player plays a Baseline, and I change the profile into High within few seconds, player continues to play, no problem. But if I open HP stream directly - just a black screen.

Hi,
Since it is behavior of 3rdparty players, we may not be able to provide more information about it. Somehow it is so sensitive to profile setting.

See if other users know it and can share the information.