Gstreamer transcoding issue

I’m trying transcode video from h264 to h265, but some problems happened.

I use:
gst-launch-1.0 filesrc location=h264.avi ! avidemux name=demux demux.video_0 ! h264parse ! omxh264dec ! nvvidconv ! 'video/x-h265, width=(int)640, height=(int)480 ’ !omxh265enc ! filesink location=H265.mp4 -e

but the output video H265.mp4 cannot displayed by
gst-launch-1.0 filesrc location=H265.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e

I want to konw where the mistake happend?

Hi,
The output of omxh265enc is h265 bitstream, not mp4. Please refer to
https://devtalk.nvidia.com/default/topic/979908/jetson-tx1/gstreamer-transcoding-performance-issue/post/5033461/#5033461