GRAY16_LE Video Encoding/Decoding

Hello, I’ve read from other discussions that I need to convert GRAY16_LE to I420 for H264/265 encoding. However, when I run this command to check the video conversion, I get a black screen:

v4l2src device=/dev/video0 ! video/x-raw,format=GRAY16_LE,width=1280,height=1024 ! videoconvert ! videoscale ! video/x-raw,format=I420,width=640,height=512 ! xvimagesink -e

I have also tried to follow the example pipelines in the Accelerated GStreamer User Guide:

Encoding: gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY16_LE,width=1280,height=1024 ! videoconvert ! videoscale ! video/x-raw,format=I420,width=640,height=512 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=I420’ ! omxh264enc ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=test.mp4 -e

Decoding: gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! nveglglessink -e

But to no avail. All I get is a black screen/window. Please help!

Hi,
It looks like the v4l2 source does not generate good frames. Please check if you can see good frames with videotestsrc:

gst-launch-1.0 videotestsrc ! video/x-raw,format=GRAY16_LE,width=1280,height=1024 ! videoconvert ! videoscale ! video/x-raw,format=I420,width=640,height=512 ! xvimagesink -e

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