<p>With</p>
<pre><code>ffmpeg -f video4linux2 -list_formats all -i /dev/video0
</code></pre>
<p>you can query all available formats and resolutions</p>
<p>With</p>
<pre><code>ffplay -f video4linux2 -input_format raw -i /dev/video0
</code></pre>
<p>you can access the raw video stream of the UVC device</p>

CC BY-SA 4.0
2022-10-20T10:36:31.287Z
Thanks for your reply!


I am using Windows and was able to stream RAW8 video by reporting the pixel_format  as gray.

( I used  ffmpeg -f dshow -pix_fmt gray -video_size 1280x720 -i video="UVC" -f nut - |  fplay -flags low_delay - )


However, I do not see any way to stream RAW10. I am not sure which pixel_format to use in this case. Do you know? 

Thanks!
light
CC BY-SA 4.0
2022-10-21T10:59:51.900Z
What output do `-pix_fmts` and `-list_formats` show?
sebix
CC BY-SA 4.0
2022-09-14T15:36:47.590Z
2022-09-14T15:36:47.590Z
sebix
<p>I have a image sensor that streams 640x480 in RAW8 format. A USB controller is receiving this data, packing two pixels of 8-bits each and sending to USB as a 16-bits per pixel YUV422 format (this is because currently UVC does not support RAW8 format).</p>
<p>I was checking if I can use ffmpeg to receive the UVC stream and decode it as RAW8 video.</p>
<p>Has anyone tried this before?</p>

CC BY-SA 4.0
2022-08-17T14:12:05.520Z
How do you access the sensor? With UVC?
sebix
CC BY-SA 4.0
2022-09-14T14:38:25.137Z
Yes. its a UVC class device.
light
<ffmpeg><video><windows><linux><raw>
Use ffmpeg to stream rawvideo from a USB camera
light
# Use ffmpeg to stream rawvideo from a USB camera

(Asked by: username_0 on 2022-06-27)

I have a image sensor that streams 640x480 in RAW8 format. A USB controller is receiving this data, packing two pixels of 8-bits each and sending to USB as a 16-bits per pixel YUV422 format (this is because currently UVC does not support RAW8 format).

I was checking if I can use ffmpeg to receive the UVC stream and decode it as RAW8 video.

Has anyone tried this before?

**Tags:** ffmpeg, video, windows, linux, raw

> **Comments:**
> **username_1**: How do you access the sensor? With UVC?  
> **username_0**: Yes. its a UVC class device.  

---

## 1 answers

### Answer by username_1 on 2022-09-14. Score: 0

With
ffmpeg -f video4linux2 -list_formats all -i /dev/video0

you can query all available formats and resolutions
With
ffplay -f video4linux2 -input_format raw -i /dev/video0

you can access the raw video stream of the UVC device

> **Comments:**
> **username_0**: Thanks for your reply!   I am using Windows and was able to stream RAW8 video by reporting the pixel_format  as gray.  ( I used  ffmpeg -f dshow -pix_fmt gray -video_size 1280x720 -i video="UVC" -f nut - |  fplay -flags low_delay - )   However, I do not see any way to stream RAW10. I am not sure which pixel_format to use in this case. Do you know?   Thanks!  
> **username_1**: What output do `-pix_fmts` and `-list_formats` show?  

---

