I have a existing C Linux / x86-64 application with uses the FFMPEG libraries (libavcodec libavformat etc) to do video encoding, using h264_nvenc, which has worked on the x86-64 platform and the Quadro family.
I have tried to port this application to the Jetson, but I am running into stumbling blocks. It appears that the h264_nvenc encoders are not supported by the FFMPEG libraries on the Jetson. My application works with software encoding on the jetson, but its impractically slow when using the FFMPEG software encoding.
My application has been designed for a specific use case where I have a raw yuv 420 buffer, which is encoded into a h264 compressed packet. This is explicitly controlled on a frame by frame and packet by packet basis, rather than a stream.
My questions are,
- As GStreamer is recommended, is there a C sample somewhere which has a discrete function where you can pass it a raw yuv420 buffer and obtain a single h264 compressed packet?
- Is the recommended Jetson Multimedia API only for C++? or if is there some C version somewhere? Its just when looking in it, there appears to be a rules.mk file which specifies the link libraries and directories, and a common directory full of C++ classes. ie are all underlying libraries C++? The samples work, but are there some instructions on the recommended way of using it into an existing application? Or do you just read the make files and rules.mk and include the common directory in your application? Will I have to just recompile my application as a C++ application and interface it with the Jetson Multimedia API as is?
- It appears that when running the ffmpeg -encoders command, it shows the h264_vaapi encoder, does this work with the hardware encoders on the jetson using libavcodec? I would think this would only work with the NV12 pix format.