[MPlayer-users] pipe /dev/video0 to fifo

Peter White peter.white at posteo.net
Sat Jun 11 16:20:27 CEST 2016


Am 11.06.2016 um 15:21 schrieb Peter Irbizon:
 > when I run $ mplayer tv:///dev/video0 I get picture ok. And with
 > other commands like "mplayer tv:// -tv
 > driver=v4l2:norm=PAL:device=/dev/video0 -hardframedrop" too.

All right, so mplayer can play it. Check.

 >>> $ mplayer tv:///dev/video0 -dumpstream -dumpfile test_output.raw 
-endpos 10
 >>>
 > This gives me just 0 byte file and closes mplayer immediatelly.

So there is the culprit. Apparently, mplayer does not like to dump a
stream from v4l2-devices. Searching the man page for dumpstream
reveals:

"-capture [...]
	... Same as  for -dumpstream, this will likely not produce
	usable results for anything else than MPEG streams. ..."

Maybe there is nothing that can be done, for now. It might be a bug in
mplayer, or a "feature" judging by this statement. If you think it is
a bug that needs fixing, I suggest filing a report:
https://www.mplayerhq.hu/MPlayer/DOCS/HTML/en/bugreports.html

But, maybe there are other options outside of using mplayer. Certainly,
these would be off-topic for this list, but at least there are some.
Someone in the Pi-community seems to have faced the same problem:

https://www.raspberrypi.org/forums/viewtopic.php?f=35&t=69322

The last reply suggests cvlc could be a solution, only the script
needed adjusting.

Also, ffmpeg comes to mind:
https://www.ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2

But that is as far off-topic as I am willing to go. :)


More information about the MPlayer-users mailing list