[Spice-devel] Is the data after USB camera redirection compressed?

Frediano Ziglio freddy77 at gmail.com
Tue Feb 2 14:14:34 UTC 2021


Il giorno mar 2 feb 2021 alle ore 12:51 lx <lxlenovostar at gmail.com> ha scritto:
>
>
>
> Uri Lublin <uril at redhat.com> 于2021年1月31日周日 下午9:48写道:
>>
>> On 1/30/21 1:25 PM, lx wrote:
>> > Frediano Ziglio <freddy77 at gmail.com> 于2021年1月29日周五 下午6:39写道:
>> >
>> >> Il giorno gio 28 gen 2021 alle ore 01:45 lx <lxlenovostar at gmail.com> ha
>> >> scritto:
>> >>>
>> >>>
>> >>> Uri Lublin <uril at redhat.com> 于2021年1月27日周三 下午11:47写道:
>> >>>>
>> >>>> On 1/27/21 4:22 AM, lx wrote:
>> >>>>> Hi all:
>> >>>>>          If I redirect USB camera to virtual machine, I think we send
>> >>>>> original URB to virtual machine by USB channel.
>> >>>>> Is this understanding correct? If we want to improve the user
>> >> experience,
>> >>>>> we need to compress URB data?
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> If you build with lz4 enabled (both client and server),
>> >>>> then it should use lz4 to compress the data.
>> >>>>
>> >>>> There is no functionality to create
>> >>>> a video stream out of raw data.
>> >>>>
>> >>>> Can the USB camera be configured to send a compress stream?
>> >>>>
>> >>>> Uri.
>> >>>>
>> >>>
>> >>>    Hi:
>> >>>     USB camera can support MJPG and YUV.   I think H264 is better than
>> >> MJPG. So Can we
>> >>> let spice support H264 ? Is this feasible?
>> >>>
>> >>
>> >> This is independent from SPICE, if the camera send compressed data
>> >> already SPICE will just
>> >> forward compressed data in whatever format is in USB.
>> >> If the camera supports MJPEG and YUV choose MJPEG, YUV is not
>> >> compressed (just a different color
>> >> space than RGB, often taking less bits but still not compressed).
>> >>
>> >> Frediano
>> >>
>> >
>> > If the camera chooses YUV, can we encode it to H264 in SPICE? Is this
>> > feasible?
>>
>> Currently, SPICE does not do look at USB data.
>
>
> Hi:
>
> What do you mean spice just forward USB protocol data?
>
> Thank you
>

We take data from USB protocol, encapsulate, send to the other side,
decapsulate and send to (remote) USB.

In this case I think it would be bad to get bound to a specific USB
protocol (I don't think camera protocol is standard like mouse,
keyboard and base storage) to add encoding.
Maybe it would be worth (but is not implemented or planned) to use OS
access to camera and emulate a more powerful camera protocol to add
the encoding, but that's not easy job.

Frediano


More information about the Spice-devel mailing list