Cannot find a proper format for codec 'h264' (id 28), pixel format 'none'

I downloaded jocover’s git hub ffmpeg and compiled it to stream the video to the web on the Jetsonano board
However, i tried
ffmpeg -c:vh264_nvmpi -i /dev/video -f null -

Cannot find a proper format for codec ‘h264’ (id 28), pixel format ‘none’ (id-1)

Assertion *codec_id != AV_CODEC_ID_NONE failed at src/libavdevice/v4l2.c:811

I got this error

and I tried ./ffmpeg -encoders |grep 264

As a result of this console, the output is as follows:

v… h264_nvmpi nvmpi H.264 encoder wrapper (codec h264)
v… h264_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264)
v… h264_vaapi H.264/AVC (VAAPI) (codec h264)

The camera specs are like this maybe Sony IMX219, a model called Raspberry Pi Camera Module V2

ioctl: VIDIOC_ENUM_FMT

Index : 0

Type : Video Capture

Pixel Format: ‘RG10’

Name : 10-bit Bayer RGRG/GBGB

I’d really appreciate your help

thx

Hi,
If you use Raspberry Pi camera v2, we would suggest use gstreamer for video encoding. You can run:

$ gst-launch-1.0 nvarguscamerasrc num-buffers=300 ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=test.mkv

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.