Gstreamer H265 transcode file size issue

Hi all,

I have been experimenting with Jetson Nano’s hardware decode/ encode engine with H265 codec. Particularly, I use the following pipeline to transcode H264 mp4 files to H265 mp4 files.

gst-launch-1.0 -e qtmux name=mx ! progressreport update-freq=1
! filesink location=output_h265.mp4 filesrc location=input_h264.mp4
! qtdemux name=dmx
dmx. ! queue ! h264parse ! nvv4l2decoder ! nvv4l2h265enc bitrate=10000000 ! h265parse ! mx.
dmx. ! queue ! aacparse ! faad ! audioresample ! audioconvert ! voaacenc ! mx.

It functioned properly with HD (1920 x 1080) videos but stopped working when the input file was in 4k resolution with approximately 20 mbps bitrate. The source file is approximately 2 hrs in lengths (some 7000 secs). Gstreamer stopped responding when transcode process hits 152 seconds:

**
progressreport0 (00:01:00): 152 / 7270 seconds ( 2.1 %)
**

Odd enough, I tried to cut the input files (in 4k with same bitrate) to approximately 30 mins (some 1500 secs) and the transcode process works like a charm.

Greatful for any advice, many thanks!

Hi,
Could you try video-only transcoding? Would like to know it it happens without audio part. And please provide release version( $ head -1 /etc/nv_tegra_release ).

Thanks for the advise.

Tried with video encode only with the following pipeline:

gst-launch-1.0 -e qtmux name=mx ! progressreport update-freq=1
! filesink location=output_h265_video_only.mp4 filesrc location=input_h264.mp4
! qtdemux name=dmx
dmx. ! queue ! h264parse ! nvv4l2decoder ! nvv4l2h265enc bitrate=10000000 ! h265parse ! mx.

But the it stopped working at the exact same position. Nevertheless, I tried to use the pipeline on a VP9 mp4 file as input (also 4k resolution with same bitrate) and it worked flawlessly.

The release version is:

R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t210ref, EABI: aarch64, DATE: Fri Oct 16 19:44:43 UTC 2020

Thank you!

Hi,
We try to generate a 5-min 4K video file and run transcoding:

$ gst-launch-1.0 videotestsrc num-buffers=9000 ! video/x-raw,width=3840,height=2160 ! nvvidconv ! nvv4l2h264enc maxperf-enable=1 ! h264parse ! qtmux ! filesink location=a.mp4
$ gst-launch-1.0 -e qtmux name=mx ! progressreport update-freq=1 ! filesink location=output_h265_video_only.mp4 filesrc location=a.mp4 ! qtdemux name=dmx dmx. ! queue ! h264parse ! nvv4l2decoder ! nvv4l2h265enc bitrate=10000000 ! h265parse ! mx.

It can be run successfully and doesn’t get stuck at 152 second. Do you observe it with other 4K files? Probably it is only specific to the video file.