On Aug 23 15:38:17, m...@patrick-wildt.de wrote:
> Try using ffmpeg on /dev/video1

On Aug 23 15:56:00, s...@spacehopper.org wrote:
> >   $ doas video -f /dev/video1 -v         
> >   doas (h...@dell.stare.cz) password: 
> >   video: /dev/video1 has no usable YUV encodings
> >
> > The device itself works, in that "doas cat /dev/video1 > /tmp/video.raw"
> > spews out data, presumably frames captured by the camera. I can even
> > play that back with "video -i /tmp/video.raw", but it's garbage,
> > not being in one of the "YUV encodings". file(1) says
> >
> > /tmp/video.raw: JPEG image data, JFIF standard 1.01,
> >     baseline, precision 0, 4360x720
> >
> > so is it some format based on a sequence of jpges?
> > (Please excuse my video ignorance.)
> 
> MJPEG? that's possible.
> 
> Try some of these:

Thanks for the tips. Here is what they do
on video0 (the built-in laptop webcam) and
on video1 (the USB microscope camera).

> ffplay -f video4linux2 /dev/video0

Works, even without the -f video4linux2 (which seems to be default);
looks much like what video(1) does.

(Is -f video4linux a catch-all codec
to recognize any format it knows?)

$ ffplay -f video4linux2 /dev/video1
[...]
[video4linux2,v4l2 @ 0x1f74a6354800] Cannot find a proper format for
codec 'none' (id 0), pixel format 'none' (id -1)
Assertion *codec_id != AV_CODEC_ID_NONE failed at libavdevice/v4l2.c:815
Abort trap (core dumped) 

> gst-launch-1.0 v4l2src \! xvimagesink

I have libv4l-1.16.6 and gstreamer-plugins-good-0.10.31p25v0
- is there something else I need to run this?

> mplayer tv:// 

Works, looks like video(1), but full-screen
(which is how my mplayer is configured).

$ mplayer -tv device=/dev/video1 tv://
MPlayer SVN-r38138 (C) 2000-2019 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschew...@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was 
used instead.
Selected device: MikrOkularHD
 Capabilities:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = Camera Terminal;
 Current input: 0
 Current format: MJPEG
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

It does not play, but it recognizes the device
and apparently, it is a MJPEG stream. Thanks.

> mpv tv://

Displays 640x480 worth of garbage.

Playing: tv://
[tv] Selected driver: v4l2
[tv]  name: Video 4 Linux 2 input
[tv] your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was 
used instead.
[tv] Selected device: Integrated_Webcam_HD
[tv]  Capabilities:      video capture  read/write  streaming
[tv]  supported norms:
[tv]  inputs: 0 = Camera Terminal;
[tv]  Current input: 0
[tv]  Current format: RGB24
[tv] tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
[tv] ioctl enum norm failed: Inappropriate ioctl for device
[tv] Error: Cannot set norm!
[tv] Selected input hasn't got a tuner!
[tv] ioctl set mute failed: Invalid argument
(+) Video --vid=1 (rawvideo 640x480 30.000fps)
[gpu] 640x480 yuv420p


$ mpv  --tv-device=/dev/video1 tv:// 
Playing: tv://
[tv] Selected driver: v4l2
[tv]  name: Video 4 Linux 2 input
libv4l2: error setting pixformat: Invalid argument
[tv] your device driver does not support VIDIOC_G_STD ioctl,
VIDIOC_G_PARM was used instead.
[tv] Selected device: MikrOkularHD
[tv]  Capabilities:  video capture  read/write  streaming
[tv]  supported norms:
[tv]  inputs: 0 = Camera Terminal;
[tv]  Current input: 0
[tv]  Current format: MJPEG
libv4l2: error setting pixformat: Invalid argument
[tv] ioctl set format failed: Invalid argument
[tv] ioctl set mute failed: Invalid argument
[tv] 0 frames successfully processed, 0 frames dropped


Knowing I have a mjpeg stream, I will try
to massage the cmdlines some more.

        Thanks again for the tips,

                Jan

Reply via email to