i want encode a raw file to H264 or H265, so i try some methods as follow:
- ffmpeg, refer to Hardware accelerated Ffmpeg on Jetson - Jetson & Embedded Systems / Jetson TX1 - NVIDIA Developer Forums, i build a ffmpeg with nvmpi on Orin, it run h264/265 encode success, but the fps is only 14fps, it is too slow; and in jtop, the NVENC is runing and freq is about 704MHz.
ffmpeg command:
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt bayer_rggb16 -s 3840*2160 -i cam-0.raw -f hevc -frames:v 2000 -c:v hevc_nvmpi test.h265 -y
2.jetson_multimedia_api samples, i run sample 01_video_encode and 15_multivideo_encode, get same result, encode 2000 frames raw data to H265 use 55 sec, about 36fps; in jtop, NVENC min freq is 665Mhz, max freq is 998Mhz.
3.gtreamer, the test command as follow:
gst-launch-1.0 filesrc location=cam-0.raw blocksize=24834048 ! video/x-raw,format=NV12, framerate=29/1,width=4128,height=3008 ! nvv4l2h265enc ! filesink location=out.265
run fail ,and get message:
WARNING: erroneous pipeline: could not link filesrc0 to nvv4l2h265enc0, nvv4l2h265enc0 can’t handle caps video/x-raw, format=(string)NV12, framerate=(fraction)29/1, width=(int)4128, height=(int)3008
1.whether it is ffmpeg 14fps or jetson_multimedia_api sample 36fps, it is not a expected result.how can increase the frame rate of encode?
2.how to use the gstreamer for encode a raw file to H265?
Please give me some advise, Thanks.