Red picture errors appert when using a resolution of 1920x1080 and the omxh264enc on a RaspberryPi 4B
I am using the following command to record an input from a capture-card and its audio on a RaspberryPi 4B
gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! omxh264enc ! video/x-h264,width=1920,height=1080,framerate=15/1,profile=high ! h264parse ! queue ! mkv. alsasrc device=hw:2,0 ! audioconvert ! queue ! mkv. matroskamux name=mkv ! filesink location=gstreamer.mp4 sync=false
This is the output of that command:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstMatroskaMux:mkv.GstMatroskamuxPad:audio_0: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)01640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)01640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mkv.GstMatroskamuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)01640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)01640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mkv.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mkv.GstPad:src: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4903aaea500e9fed103fb0f7c5d322ded3e2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188089b25f2ee114e001654ae6b01000000000000c6ae0100000000000069d7810183810173c588ef7611eadf53553e23e3838403f940aa536e86566964656f00e00100000000000008b0820780ba8204388690565f4d504547342f49534f2f4156430063a2a101640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0ae010000000000004bd7810283810273c588927eb20009b3313823e38383989680536e86417564696f00e10100000000000011b58840e77000000000009f810262648110868e415f50434d2f494e542f4c495400 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4903aaea500e9fed103fb0f7c5d322ded3e2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188089b25f2ee114e001654ae6b01000000000000c6ae0100000000000069d7810183810173c588ef7611eadf53553e23e3838403f940aa536e86566964656f00e00100000000000008b0820780ba8204388690565f4d504547342f49534f2f4156430063a2a101640028ffe1001127640028ac2b403c0113f2e0203c489a8001000528ee025cb0ae010000000000004bd7810283810273c588927eb20009b3313823e38383989680536e86417564696f00e10100000000000011b58840e77000000000009f810262648110868e415f50434d2f494e542f4c495400 >
handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:06.161657689
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Even when there is just a black input from the capture card red pixels appear in the bottom of the image: gstreamer-1
This also happens when there is an input: gstreamer-2
When I change the resolution to something smaller like 1280x720 everything works.
I already tested different capture cards and different Raspberry Pis so Hardware is not the problem.
The pixels don't appear when using the software encoder (x264enc) - but it is to slow to record the audio simultaneously.
Thanks for your help!