OpenCV: FFMPEG: tag 0x34363258/‘X264’ is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)
OpenCV: FFMPEG: fallback to use tag 0x31637661/‘avc1’
’
Sorry for the mess. With ffmpeg the issue is selecting AVI or MKV container.
MJPG encoding with HW is not easy because of a different version of jpg library.
I’ve edited my post with better answers.
gave video file that is not totally corrupted, but the video still looks distorted and multiplied.
the output was:
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 0
NVMEDIA: Need to set EMC bandwidth : 564000
NVMEDIA: Need to set EMC bandwidth : 564000
My loop is basically:
Mat mIn;
Mat mOut;
cv::VideoCapture* cap = new cv::VideoCapture(videoFile); // .mp4 file, plays fine in all players.
cv::VideoWriter* videoWriter = new cv::VideoWriter(MAGIC_LINE-ONE_OF_THE_SUGGESTIONS_ABOVE)
while (!finished) {
…
(*cap)>>mIn;
videoWriter->write(mIn)
…
}
videoWriter->release();
I also did cv::imwrite to sample output frames for debugging, looks ok.
Am I missing something ? Need to install anything other than the Jetpack* ? Specific resolution ratios ?
Thanks again for your help, really appreciate it !