<    June 2018     >
Su Mo Tu We Th Fr Sa  
                1  2  
 3  4  5  6  7  8  9  
10 11 12 13 14 15 16  
17 18 19 20 21 22 _2_3  
24 25 26 27 28 29 30
01:06 CoreX left
01:56 Extrems joined
02:48 chewey joined
05:22 ivanich joined
05:25 theholyduck joined
06:20 theholyduck joined
06:31 michaelni joined
07:11 kelnoky joined
09:15 chewey joined
11:47 krabador joined
12:22 amarsh04 joined
14:10 debianuser joined
14:52 kelnoky joined
14:52 poody joined
15:11 hfb joined
15:27 amarsh04 joined
16:03 krabador joined
17:37 psychicist__ joined
17:38 hfb joined
19:24 kelnoky joined
19:27 ivanich joined
19:29 hfb joined
20:20 ntd joined
20:22 <ntd> Can mplayer create a fifo, loopback, etc device playing from a v4l device so that multiple other processes can access the deinterlaced video?
20:22 mutin-s joined
20:23 <ntd> any of the other processes will claim/lock the v4l device and their deinterlacing leaves much to be desired :)
20:29 <debianuser> ntd: Actually, yes, it can!
20:30 <ntd> sounds wonderful, care to elaborate? :)
20:30 <* debianuser> is typing...
20:35 <debianuser> ntd: There's v4l2loopback kernel module (many distros have it in repository), and you can write to that with a rather small yuv4mpeg_to_v4l2 tool as `./yuv4mpeg_to_v4l2 < /tmp/pipe` and then play to that pipe with `mplayer movie.mp4 -vo yuv4mpeg:file=/tmp/pipe` Examples, tools, sources: https://github.com/umlaeute/v4l2loopback/wiki/Mplayer
20:37 <debianuser> (that page also mentions a command to do that with `mencoder movie.mp4 -nosound -noskip -ovc raw -vf scale=640:480,format=yuy2 -of rawvideo -rawvideo w=640:h=360:format=yuy2 -cache 8192 -o /dev/video0`, assuming that /dev/video0 is a v4l2_loopback device file.)
20:38 <ntd> hmm
20:39 <ntd> was thinking more like... mplayer -vo vdpau -nosound -nocache -tv driver=v4l2:width=720:height=576:device=/dev/video0 tv:// > /tmp/loop1
20:40 <ntd> actually, your approach kinda might solve a diff problem
20:41 <ntd> if mplayer could create a mp4/h264 loopback the other processes could just do passthrough and i'd save a lot of cpu
20:42 <ntd> the input is bt878/bttv (/dev/video0/1/2/3)
20:42 <ntd> PAL, 50fps
20:46 <ntd> if mplayer could display the video sources in a grid view with -vo vdpau and create a h264 stream device/file/etc for the other processes to play with i'd actually save a lot of cpu
20:46 <ntd> thoughts?
20:50 <ntd> reason i'm asking: "mplayer -vo yuv4mpeg". what is the actual output video format?
21:12 <debianuser> It's just mplayer/mencoder can't create v4l device file. Those can only be created by the kernel module. So if your "other process" expects a v4l device file, i.e. /dev/video*, it won't work with a regular file or a pipe, as v4l assumes some ioctl()s, that regular files/pipes don't use.
21:13 <ntd> the other processes can read from file, carrier pigeon, anything
21:13 <ntd> it's just their v4l handing that leaves a lot to be desired
21:17 <ntd> but, if your way can create a progressive, full-res virtual v4l device fed by mplayer i might be able to pull this off
21:17 <debianuser> I mean _if_ the "other process" needs a v4l device file, then you need a kernel module. But if it can read from a file/pipe - then you can write to a file/pipe. :)
21:17 <debianuser> I don't think mplayer/mencoder can write to carrier pigeons ;)
21:17 <ntd> heh :)
21:19 <ntd> but can it be done how i suggested? have mplayer pull /dev/video*, play in a grid with vdpau, create X x264 pipes for the other process to do passthrough with?
21:19 <debianuser> You want to see and play it to a file at the same time?
21:20 <debianuser> ("yuv4mpeg" what is the actual output video format -- According to https://github.com/sherpya/MPlayer/blob/master/libvo/vo_yuv4mpeg.c the "format" boils down to fwrite(ptr, 1, num_bytes, yuv_out))
21:21 <debianuser> (i.e. it's a bunch of raw yuv4 frames one by one)
21:21 <ntd> the other process can do x264 encode of the input
21:22 <debianuser> (probably that's why `mencoder -of rawvideo ...` works too)
21:22 <ntd> but right now i'm restriced to 384x288 4fps when having the other process do the v4l
21:23 <debianuser> Well, you can encode it with mencoder too. Or ffmpeg. Or whatever encoding tool you prefer... I mean do you need "the other process" at all?
21:23 <ntd> yes, doing motion detection etc
21:24 <ntd> having the other process do the v4l handling: crazy combing and artifacts. think when john connor gets trapped by that MRI machine in "terminator genisys"
21:24 <ntd> pulling more than 384x288 4fps
21:25 <ntd> mplayer deinterlaces and displays at full res, rate flawlessly
21:27 <ntd> right now i *can* have other sw do this, create a mjpeg stream for each input at localhost, use a ffmpeg filtergraph for generating the grid view and playing it with mplayer
21:27 <ntd> but this way i'm wasting so much cpu i might as well just start mining bitcoin
21:29 <ntd> also, i'm stuck at 384x288 4fps. if i could pull video from the v4l devices, create a loopback sink for each (preferably in h264/x264) i could have the other sw read and handle that, play them in a grid with ffmpeg and mpayer with -vo vdpau
21:31 <ntd> and save a lot of cpu/wattage
21:34 <debianuser> why encoding in h264 and then decoding it back in "the other sw" if you could just pass raw video from v4l (via mplayer/mencoder) to that other sw? Would it work if you dump a few minutes into a regular file, and then use that file as an input in that other sw?
21:35 <ntd> no, must be live an continuous
21:35 <ntd> cctv cams
21:36 <ntd> if mplayer/mencodes encodes the v4l input to a h264 sink the other software just passes through the video
21:36 <ntd> modifies some headers, splits into segments
21:38 <ntd> actually, i'd like to be able to do just this with more than just v4l inputs, i have a few digital/network cams which only allow one streaming client
21:38 <ntd> which also forces me to turn to my current approach/rube goldberg machine
21:40 <ntd> so: pull video from a v4l device or rtsp source, encode as x264 sink (or just pass through for h264 sources) and that way let multiple processes handle the same video
22:39 iive joined
22:42 Dagger joined