Streaming two video files while being recorded, using tee element
Sebastian Dröge
sebastian at centricular.com
Fri Jan 8 05:02:13 PST 2016
On Di, 2016-01-05 at 07:54 -0800, sina_sh wrote:
> Hi,
>
> I've developed two pipelines two record simultaneously, one from a
> frame-grabber and the other one, from a webcam, then put the recorded
> files into two separate containers (.mkv and .mp4). I'd like to
> stream these video files (preferably, while being recorded (even a
> couple of seconds of delay is acceptable) into two html video objects
> to have some kind of observation on the process of recording.
MP4 can't be streamed while it is still being written. You need to
finalize the file before it can be used.
That's why things like DASH where implemented, which are basically lots
of small MP4 files which are played one after another (not 100%
accurate, there are some improvements on top of this naive approach but
that's the idea).
Also browsers will likely only support WebM, not generic Matroska. And
only with VP8/9/10 and Vorbis/Opus codecs.
> I'm aware that this can be done via tee element
> of gstreamer but sadly I don't know how to use it within these
> pipelines...
> (I'm newbe to gstreamer)
Simplified version here:
gst-launch-1.0 -e v4l2src ! tee name=t
t. ! queue ! videoconvert ! vp8enc ! matroskamux !
filesink location=test.mkv
t. ! queue ! videoconvert ! x264enc ! mp4mux !
filesink location=test.mp4
This should give you an idea how it works :)
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160108/23f7a536/attachment.sig>
More information about the gstreamer-devel
mailing list