[FFmpeg-user] HSV / RGB issue where picture is mostly Pink

Nikita Zlobin nick87720z at gmail.com
Tue Feb 15 08:34:40 EET 2022


"format=...(from `ffmpeg -pix_fmts`)" in the filtergraph should do it,
e.g. -filter:v="format = rgb24". Though I don't know, if there are
formats in the list, which are more like hsv than rgb (yuv could be
similar, because its luma channel is similar to hsv value or hsl
lightness channels).

In Mon, 14 Feb 2022 21:50:01 -0500
Jeffrey Carter <stealer at lesuorac.com> wrote:

> Hello,
> 
> I am trying to use FFMPEG to send the output from a MS2109 HDMI to USB
> capture device to a RTSP server and then to VLC.
> I've previously used an EasyCap device (composite instead of HDMI)
> without issue.
> 
> The problem is that after running the ffmpeg command and looking at
> the output in VLC the whites in the image appear pink and I believe
> it's the black that appear green. From my understanding this is a HSV
> vs RGB issue but I am unsure where the issue is originating from.
> Is there a way with FFMPEG to cast the image data so that it treats it
> as RGB/HSV without a conversion so I can get the color fixed?
> 
> I can add more parameters to the command but this is the simplest
> command that reproduces the issue. "-input_format
> (rawvideo|mjpeg|yuyv422)" all cause the same issue as well.
> $ ffmpeg -i /dev/video0 -f rtsp rtsp://192.168.6.1:8554/test.stream
> ffmpeg version git-2022-02-05-bedb4ba Copyright (c) 2000-2022 the
> FFmpeg developers
>   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
>   configuration: --arch=armel --target-os=linux --enable-gpl
> --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi
> --enable-libx264 --extra-ldflags=-latomic --enable-muxer=rtsp
> --enable-muxer=rtp --enable-protocol=tcp --enable-protocol=udp
>   libavutil      57. 19.100 / 57. 19.100
>   libavcodec     59. 20.100 / 59. 20.100
>   libavformat    59. 17.101 / 59. 17.101
>   libavdevice    59.  5.100 / 59.  5.100
>   libavfilter     8. 26.101 /  8. 26.101
>   libswscale      6.  5.100 /  6.  5.100
>   libswresample   4.  4.100 /  4.  4.100
>   libpostproc    56.  4.100 / 56.  4.100
> Input #0, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 182238.016035, bitrate: 147456 kb/s
>   Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
> 147456 kb/s, 10 fps, 10 tbr, 1000k tbn
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
> Press [q] to stop, [?] for help
> [udp @ 0x35ac270] attempted to set receive buffer to size 393216 but
> it only ended up set as 360448
> [udp @ 0x35abe10] attempted to set receive buffer to size 393216 but
> it only ended up set as 360448
> [rtsp @ 0x347c6d0] method SETUP failed: 461 Unsupported Transport
> Output #0, rtsp, to 'rtsp://192.168.6.1:8554/test.stream':
>   Metadata:
>     encoder         : Lavf59.17.101
>   Stream #0:0: Video: mpeg4, yuv420p(tv, progressive), 1280x720,
> q=2-31, 200 kb/s, 10 fps, 90k tbn
>     Metadata:
>       encoder         : Lavc59.20.100 mpeg4
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay:
> N/A frame=   87 fps= 10 q=31.0 Lsize=N/A time=00:00:08.60 bitrate=N/A
> speed=0.988x video:633kB audio:0kB subtitle:0kB other streams:0kB
> global headers:0kB muxing overhead: unknown
> Exiting normally, received signal 2.
> 
> I believe I should be able to use "-input_format=mjpeg" since it shows
> up as a format.
> $ ffmpeg -f v4l2 -list_formats all -i /dev/video0
> ffmpeg version git-2022-02-05-bedb4ba Copyright (c) 2000-2022 the
> FFmpeg developers
>   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
>   configuration: --arch=armel --target-os=linux --enable-gpl
> --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi
> --enable-libx264 --extra-ldflags=-latomic --enable-muxer=rtsp
> --enable-muxer=rtp --enable-protocol=tcp --enable-protocol=udp
>   libavutil      57. 19.100 / 57. 19.100
>   libavcodec     59. 20.100 / 59. 20.100
>   libavformat    59. 17.101 / 59. 17.101
>   libavdevice    59.  5.100 / 59.  5.100
>   libavfilter     8. 26.101 /  8. 26.101
>   libswscale      6.  5.100 /  6.  5.100
>   libswresample   4.  4.100 /  4.  4.100
>   libpostproc    56.  4.100 / 56.  4.100
> [video4linux2,v4l2 @ 0x1b22250] Compressed:       mjpeg :
> Motion-JPEG : 1920x1080 1600x1200 1360x768 1280x1024 1280x960 1280x720
> 1024x768 800x600 720x576 720x480 640x480
> [video4linux2,v4l2 @ 0x1b22250] Raw       :     yuyv422 :
> YUYV 4:2:2 : 1920x1080 1600x1200 1360x768 1280x1024 1280x960 1280x720
> 1024x768 800x600 720x576 720x480 640x480
> 
> Thanks,
> Jeff
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list