You are not logged in.

#1 2017-04-21 09:57:59

Modeler
Member
From: United Kingdom
Registered: 2011-07-28
Posts: 70

Video4Linux / FFMPEG Simultaneous Play / Record?

Hi,

I'm using FFMPEG to capture from my WebCam on /dev/video0 and it works great, but the problem is I can't monitor what's being recorded. ffplay can't attach to /dev/video0 because it's in use, so just wondered if anyone knew an easy way around this?

I know VLC can stream and capture from V4L devices at the same time, but there is a noticeable lag. Ideally I'd like to record a piece to camera for a YouTube video.

Thanks.


Wirth's law: "Software is getting slower more rapidly than hardware becomes faster"

Offline

#2 2017-04-21 18:27:06

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Video4Linux / FFMPEG Simultaneous Play / Record?

Can't you simply play the file that the recording is being saved on? I guess, it won't be realtime, but it should be doable with mpv or such.

Offline

#3 2017-04-27 21:31:35

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: Video4Linux / FFMPEG Simultaneous Play / Record?

Use the tee muxer:

ffmpeg -f v4l2 -i /dev/video0 -map 0 -c:v libx264 -f tee "output.mkv|[f=nut]pipe:" | ffplay pipe:

Last edited by DrZaius (2017-04-27 21:33:13)

Offline

Board footer

Powered by FluxBB