[FFmpeg-trac] #6279(avdevice:new): can't request rgb24 (uvc over dshow, unknown compression type)

FFmpeg trac at avcodec.org
Mon Jun 24 22:57:00 EEST 2019


#6279: can't request rgb24 (uvc over dshow, unknown compression type)
-------------------------------------+------------------------------------
             Reporter:  Djfe         |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:  avdevice
              Version:  git-master   |               Resolution:
             Keywords:  dshow        |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by Djfe):

 now that I finally got around to compiling ffmpeg for windows:

 so the detection works fine with your patch, in addition to yuyv422 it now
 lists the second half of all entries as "rgb24"
 nice
 (for some reason all entries seem to be duplicated, but maybe there is a
 difference, that isn't visible here)
 {{{
 ffmpeg -list_options true -f dshow -i video="USB Capture HDMI"
 ffmpeg version N-94089-gbc3306fd5b Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 7.3-win32 (GCC) 20180312
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=i686-w64-mingw32-
   libavutil      56. 29.100 / 56. 29.100
   libavcodec     58. 53.100 / 58. 53.100
   libavformat    58. 28.100 / 58. 28.100
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 55.100 /  7. 55.100
   libswscale      5.  4.101 /  5.  4.101
   libswresample   3.  4.100 /  3.  4.100
 [dshow @ 01f53400] DirectShow video device options (from video devices)
 [dshow @ 01f53400]  Pin "Capture" (alternative pin name "0")
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1920x1080 fps=25 max
 s=1920x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1920x1080 fps=25 max
 s=1920x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=640x360 fps=25 max
 s=640x360 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=640x360 fps=25 max
 s=640x360 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=640x480 fps=25 max
 s=640x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=640x480 fps=25 max
 s=640x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=720x480 fps=25 max
 s=720x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=720x480 fps=25 max
 s=720x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=720x576 fps=25 max
 s=720x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=720x576 fps=25 max
 s=720x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=768x576 fps=25 max
 s=768x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=768x576 fps=25 max
 s=768x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=800x600 fps=25 max
 s=800x600 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=800x600 fps=25 max
 s=800x600 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=856x480 fps=25 max
 s=856x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=856x480 fps=25 max
 s=856x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=960x540 fps=25 max
 s=960x540 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=960x540 fps=25 max
 s=960x540 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1024x576 fps=25 max
 s=1024x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1024x576 fps=25 max
 s=1024x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1024x768 fps=25 max
 s=1024x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1024x768 fps=25 max
 s=1024x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x720 fps=25 max
 s=1280x720 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x720 fps=25 max
 s=1280x720 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x800 fps=25 max
 s=1280x800 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x800 fps=25 max
 s=1280x800 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x960 fps=25 max
 s=1280x960 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x960 fps=25 max
 s=1280x960 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x1024 fps=25 max
 s=1280x1024 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1280x1024 fps=25 max
 s=1280x1024 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1368x768 fps=25 max
 s=1368x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1368x768 fps=25 max
 s=1368x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1440x900 fps=25 max
 s=1440x900 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1440x900 fps=25 max
 s=1440x900 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1600x1200 fps=25 max
 s=1600x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1600x1200 fps=25 max
 s=1600x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1680x1050 fps=25 max
 s=1680x1050 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1680x1050 fps=25 max
 s=1680x1050 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1920x1200 fps=25 max
 s=1920x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=1920x1200 fps=25 max
 s=1920x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=2048x1080 fps=25 max
 s=2048x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=yuyv422  min s=2048x1080 fps=25 max
 s=2048x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1920x1080 fps=25 max
 s=1920x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1920x1080 fps=25 max
 s=1920x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=640x360 fps=25 max
 s=640x360 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=640x360 fps=25 max
 s=640x360 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=640x480 fps=25 max
 s=640x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=640x480 fps=25 max
 s=640x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=720x480 fps=25 max
 s=720x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=720x480 fps=25 max
 s=720x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=720x576 fps=25 max
 s=720x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=720x576 fps=25 max
 s=720x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=768x576 fps=25 max
 s=768x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=768x576 fps=25 max
 s=768x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=800x600 fps=25 max
 s=800x600 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=800x600 fps=25 max
 s=800x600 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=856x480 fps=25 max
 s=856x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=856x480 fps=25 max
 s=856x480 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=960x540 fps=25 max
 s=960x540 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=960x540 fps=25 max
 s=960x540 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1024x576 fps=25 max
 s=1024x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1024x576 fps=25 max
 s=1024x576 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1024x768 fps=25 max
 s=1024x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1024x768 fps=25 max
 s=1024x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x720 fps=25 max
 s=1280x720 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x720 fps=25 max
 s=1280x720 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x800 fps=25 max
 s=1280x800 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x800 fps=25 max
 s=1280x800 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x960 fps=25 max
 s=1280x960 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x960 fps=25 max
 s=1280x960 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x1024 fps=25 max
 s=1280x1024 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1280x1024 fps=25 max
 s=1280x1024 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1368x768 fps=25 max
 s=1368x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1368x768 fps=25 max
 s=1368x768 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1440x900 fps=25 max
 s=1440x900 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1440x900 fps=25 max
 s=1440x900 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1600x1200 fps=25 max
 s=1600x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1600x1200 fps=25 max
 s=1600x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1680x1050 fps=25 max
 s=1680x1050 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1680x1050 fps=25 max
 s=1680x1050 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1920x1200 fps=25 max
 s=1920x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=1920x1200 fps=25 max
 s=1920x1200 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=2048x1080 fps=25 max
 s=2048x1080 fps=59.9999
 [dshow @ 01f53400]   pixel_format=rgb24  min s=2048x1080 fps=25 max
 s=2048x1080 fps=59.9999
 video=USB Capture HDMI: Immediate exit requested
 }}}

 But I can't save the rawvideo, yet. It shows "[125][235]6[228]" instead of
 RGB and errors "Invalid pixel format."
 {{{
 ffmpeg -f dshow -video_size 1280x720 -framerate 25 -pixel_format rgb24 -i
 video="USB Capture HDMI" -c:v qtrle test.mov
 ffmpeg version N-94089-gbc3306fd5b Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 7.3-win32 (GCC) 20180312
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=i686-w64-mingw32-
   libavutil      56. 29.100 / 56. 29.100
   libavcodec     58. 53.100 / 58. 53.100
   libavformat    58. 28.100 / 58. 28.100
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 55.100 /  7. 55.100
   libswscale      5.  4.101 /  5.  4.101
   libswresample   3.  4.100 /  3.  4.100
 [rawvideo @ 022bedc0] Invalid pixel format.
 Input #0, dshow, from 'video=USB Capture HDMI':
   Duration: N/A, start: 751073.323000, bitrate: N/A
     Stream #0:0: Video: rawvideo ([125][235]6[228] / 0xE436EB7D), none,
 1280x720, 25 fps, 25 tbr, 10000k tbn, 10000k tbc

 [rawvideo @ 01f52580] Invalid pixel format.
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> qtrle (native))
 Error while opening decoder for input stream #0:0 : Invalid argument
 }}}

 yuyv422 still works fine (yes I'm saving as rgb here, but that was only as
 a test to see if everything still works as expected, which it does)
 {{{
 ffmpeg -f dshow -video_size 1280x720 -framerate 25 -pixel_format yuyv422
 -i video="USB Capture HDMI" -c:v qtrle test.mov
 ffmpeg version N-94089-gbc3306fd5b Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 7.3-win32 (GCC) 20180312
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=i686-w64-mingw32-
   libavutil      56. 29.100 / 56. 29.100
   libavcodec     58. 53.100 / 58. 53.100
   libavformat    58. 28.100 / 58. 28.100
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 55.100 /  7. 55.100
   libswscale      5.  4.101 /  5.  4.101
   libswresample   3.  4.100 /  3.  4.100
 Input #0, dshow, from 'video=USB Capture HDMI':
   Duration: N/A, start: 751105.511000, bitrate: N/A
     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
 25 fps, 25 tbr, 10000k tbn, 10000k tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> qtrle (native))
 Press [q] to stop, [?] for help
 Output #0, mov, to 'test.mov':
   Metadata:
     encoder         : Lavf58.28.100
     Stream #0:0: Video: qtrle (rle  / 0x20656C72), rgb24, 1280x720,
 q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.53.100 qtrle
 frame=   67 fps= 25 q=-0.0 Lsize=    5244kB time=00:00:02.64
 bitrate=16271.0kbits/s dup=13 drop=0 speed=0.997x
 video:5243kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.019857%
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6279#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list