Webcam : stream a file that is being recorded, tried .avi and mp4 but nonthing worked...

mardmlhr mardmlhr at gmail.com
Wed Mar 25 10:00:28 PDT 2015


Hi everybody !I'm a bit new at GStreamer, it looks like it could be a nice
framework even if you get mad at it most of the times...So, I'm trying to do
the following thing : I'd like to stream from my webcam but make a backup of
this stream in a file. But I would like to "seek" in the stream with a
custom made program (in C) that also sends the stream over UDP. So, as it is
not possible to directly seek in a stream, I decided to record what my
webcam can see in file, then stream the file and try to seek it (this is
done with a C program). I really want to use the H.264 codec.I've tried two
containers : AVI and MP4.Here are the pipelines (and the problems I
encountered) :AVI : Recording : gst-launch -v -e v4l2src ! videoscale !
videorate !
"video/x-raw-yuv,width=(int)320,height=(int)240,framerate=(fraction)15/1" !
x264enc byte-stream=true ! avimux ! filesink location=test.avi & Streaming :
gst-launch -v -e filesrc location=test.avi ! avidemux name=demux
demux.video_00 ! queue !  decodebin ! x264enc byte-stream=true ! rtph264pay
! udpsink host=192.168.1.12 port=1234 &/Problems : I can stream the "being
recorded" file and see it with totem and a sdp file but I can't seek
backward. I tried the nice gst-rtsp-server library that helps you easily set
up a RTSP server but it didn't work. And my program that streams the file
over UDP (which contains this pipeline in C) doesn't let me seek backward
(and I tried the official GStreamer tutorial "Time Management")./MP4 :
Recording : gst-launch -e -v v4l2src ! videoscale ! videorate !
"video/x-raw-yuv,width=320,height=240,framerate=15/1" ! ffmpegcolorspace !
x264enc byte-stream=true ! h264parse ! mp4mux ! filesink
location=test.mp4Streaming : gst-launch -v filesrc location=test.mp4 !
qtdemux name=d d. ! queue !  decodebin ! x264enc byte-stream=true !
rtph264pay ! udpsink host=192.168.1.12 port=1234 &/Problems : This time I
cannot stream the "being recorded" file. I tried the second pipeline, then
my custom program, then the gst-rtsp-server example test-mp4 and all worked
with a "finished" file. But not with a "being recorded" file./So I'm pretty
much lost because each of the solutions does part of the job but not
completely.Do you have any idea? Maybe my pipelines are wrong or the
muxers/demuxers/codec can't make it work... Thanks in advance for every
single answer I'll get :)



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Webcam-stream-a-file-that-is-being-recorded-tried-avi-and-mp4-but-nonthing-worked-tp4671330.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150325/75e5cb2c/attachment.html>


More information about the gstreamer-devel mailing list